Calling CreateProcess from PowerShell Calling CreateProcess from PowerShell powershell powershell

Calling CreateProcess from PowerShell


Try using a real CurrentDirectory instead of $null:

[Kernel32]::CreateProcess("c:\windows\notepad.exe", $null, [ref] $pSec, [ref] $tSec, $false, [CreationFlags]::NONE, [IntPtr]::Zero, "c:", [ref] $si, [ref] $pi)