How do you start a program stored on a UNC share from the command line with parameters?
There's an in-house program we use and it's stored on a UNC share so that updates are transparent. I'd like to supply it some command line parameters like so:
\\server\share\in_house_thingy.exe myusername mypassword
But I can't seem to get it to work in either CMD or PowerShell or via a shortcut.
Anyone got any ideas?
For a shortcut, change the target to be like:
"\\server\share\in_house_thingy.exe" myusername mypassword
unless you really do want to have to use powershell to make this work.
You could use:
$app = '\\server\share\in_house_thingy.exe' $arguments = 'myusername mypassword' $process = [System.Diagnostics.Process]::Start($app, $arguments)
The $process object will give you a live process object if you want to get an exit code or other information from that process.