Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
ShellRunas expects the target program path and its arguments to be passed in a way that lets it correctly separate the executable from its parameters. The issues described are consistent with:
- Incorrect parsing of the target path and arguments
- Using ShellRunas in a way that does not match its documented syntax
From the documentation, the correct usage is:
shellrunas [/netonly] <program> [arguments]
So for the examples:
- Server Manager
Use:
shellrunas.exe /netonly "C:\Windows\System32\ServerManager.exe"
If the path contains spaces or if the shell is mis-parsing the command, quoting the full path to the executable is required. Without correct quoting, ShellRunas may treat part of the path as arguments, fail to locate the executable, and return “The system cannot find the file specified.”
- RSTRUI.EXE, RECDISC.EXE, and similar tools
Use the same pattern:
shellrunas.exe /netonly "C:\Windows\System32\rstrui.exe"
If these are 32‑bit vs 64‑bit redirection cases (on 64‑bit Windows), ensure the path is correct for the process bitness being used.
- Using ShellRunas in a shortcut (with arguments after the target)
ShellRunas only treats the first non-switch token after its own switches as the <program> and everything after that as arguments to that program. For:
shellrunas.exe /netonly c:\windows\system32\dsa.msc /domain=myDomain.fqdn
ShellRunas is being asked to run dsa.msc directly, which is not an executable. .msc files must be opened by mmc.exe. The correct form is:
shellrunas.exe /netonly "C:\Windows\System32\mmc.exe" "C:\Windows\System32\dsa.msc" /domain=myDomain.fqdn
Key points to avoid the “file not found” and argument‑ignored behavior:
- Always pass an actual executable as
<program>(e.g.,mmc.exe, not.mscdirectly). - Quote any path that contains spaces.
- Place all arguments after the
<program>; ShellRunas forwards them to that program. - For
.mscconsoles, explicitly callmmc.exeand pass the.mscas the first argument.
References: