eksime / VDesk

Launch programs on new virtual desktops.
GNU General Public License v3.0
625 stars 57 forks source link

Doesn't work with PowerShell #59

Open stefhol opened 5 years ago

stefhol commented 5 years ago

run:"Exe" throws Error File could not be found

Smagjus commented 4 years ago

Same problem. All paths containing spaces will throw a file not found error even when the path is in quotation marks when you use powershell.

mateusmedeiros commented 3 years ago

Because the program actually expects the quotes as part of it's processing, as opposed to relying on the command-line separation of parameters. So in shells that are not terribly broken like cmd.exe is (ie Powershell), it will correctly consider the string with spaces a single parameter but that won't make any difference.

Instead what you gotta do is escape the quotes or otherwise make sure that the quotes end there as characters.

In my case I did something like vdesk 'run:"C:\path with spaces\to file"' (aka enclosed the whole parameter with single quotes so that Powershell will actually consider the double quotes as part of the argument and send them as actual characters).