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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With