I’m executing a command as another user on the same machine using
cmd like this:
PsExec.exe -u myuser -p mypass timeout 4
When I do so, a new cmd window opens and stays open until the command passed to
PsExec has completed. How do I prevent this new window from opening or showing?
The closest I got was with the following, but this is still unsatisfactory, as the new window is visible for a few moments before minimizing:
PsExec.exe -u myuser -p mypass cmd.exe /c "start /min timeout 4"
The only other question I found regarding this was starting from
PowerShell, but I’m in the standard
cmd. I’m on Windows 10,