diff --git a/Modules/Invoke-RunAs.ps1 b/Modules/Invoke-RunAs.ps1 index c2231c5..57ec070 100644 --- a/Modules/Invoke-RunAs.ps1 +++ b/Modules/Invoke-RunAs.ps1 @@ -259,10 +259,10 @@ echo "" # StartupInfo Struct $StartupInfo = New-Object STARTUPINFO + $StartupInfo.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($StartupInfo) $StartupInfo.dwFlags = 0x00000001 - $StartupInfo.wShowWindow = 0x0001 - $StartupInfo.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($StartupInfo) - + $StartupInfo.wShowWindow = 0x0001 + # ProcessInfo Struct $ProcessInfo = New-Object PROCESS_INFORMATION