I'm executing a command as another user on the same machine using PsExec from cmd like this:
PsExec.exe -u myuser -p mypass timeout 4
When I do so, a new cmd window opens containing the output of timeout 4, which stays open until the command completes. 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, PsExec v2.2.