Powershell - Start Process on Different Drive from Batch CMD

0

Problem: From the CMD or Batchfile, calling powershell and starting a process from a different drive or the -FilePath is failing.

enter image description here

semtex41

Posted 2014-12-05T16:52:55.257

Reputation: 945

Answers

0

Solution: Use the following syntax, with Single Quotes Only (double quotes do not work)-

powershell start-process -FilePath 'E:\Trunk Monkey\Utilities\SkypePortable\SkypePortable.exe'

Details: I was having no luck with other parameters, to include...

powershell -Command "& {}

as listed here: http://technet.microsoft.com/en-us/library/hh847736.aspx

Hopes this helps.

semtex41

Posted 2014-12-05T16:52:55.257

Reputation: 945

3

You need to quote the path to your executable:

powershell -Command "& { Start-Process -FilePath 'E:\Trunk Monkey\Utilities\SkypePortable\SkypePortable.exe' }"

krumel

Posted 2014-12-05T16:52:55.257

Reputation: 31

Excellent. While this was intended to be a KB type question, you provided an answer to my example question. Thanks! – semtex41 – 2014-12-05T17:56:17.353