File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -12,5 +12,15 @@ param (
12
12
[string ] $Command
13
13
)
14
14
15
- # https://superuser.com/questions/1749696/parameter-is-incorrect-when-using-runas-with-trustlevel-after-windows-11-22h2
15
+ <#
16
+ https://superuser.com/questions/1749696/parameter-is-incorrect-when-using-runas-with-trustlevel-after-windows-11-22h2
17
+
18
+ The workaround with /machine:x86|amd64|arm|arm64 works. If you are on a 64bit intel machine and
19
+ want to execute a batchfile there is no machine option that will work since cmd.exe is a 64 bit
20
+ application. There is a 32bit version for cmd.exe at C:\Windows\sysWOW64\cmd.exe, so a command
21
+ could be as follows:
22
+
23
+ runas /machine:x86 /trustlevel:0x20000 "C:\Windows\sysWOW64\cmd.exe <yourBatchfileHere>"
24
+ #>
25
+
16
26
runas / machine:x86 / trustlevel:0x20000 " C:\Windows\sysWOW64\cmd.exe /c `" $Command `" "
You can’t perform that action at this time.
0 commit comments