Quantcast
Viewing latest article 13
Browse Latest Browse All 20

GetCommandLine via PSHELL

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 latest article 13
Browse Latest Browse All 20

Trending Articles