Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 20

GetCommandLine via PSHELL

$
0
0
I was having problems using the Kernel32.dll GetCommandLine function via @WINAPI, so I developed an alternate method using PowerShell.

Here is the .BTM;
Code:
@setlocal
@echo off
type <<- endtext > GetCommandLine.ps1
[Environment]::CurrentDirectory = $pwd

Add-Type -TypeDefinition @'
    using System;
    using System.Runtime.InteropServices;

    public static class Kernel32
    {...

Read more

Viewing all articles
Browse latest Browse all 20

Trending Articles