VDesk
VDesk copied to clipboard
Can't open some apps through a .bat file, but when I call the directly in PowerShell
I have an issue that I'm not sure how to solve.
When I call some apps directly in Powershell written like this:
vdesk on:4 run:"C:\Program Files\Joplin\Joplin.exe"
vdesk on:5 run:"C:\Users\Name AnotherName\AppData\Local\Discord\Update.exe" --processStart "Discord.exe"
That works, however, when I try to do something similar in a .bat file I can't get it to wok (probably since there are space in the names).
powershell -command "vdesk on:4 run:C:\Program Files\Joplin\Joplin.exe"
powershell -command "Start-Sleep -s 10"
powershell -command "vdesk on:5 run:C:\Users\Name AnotherName\AppData\Local\Discord\Update.exe" --processStart "Discord.exe"
I also tried:
powershell -command "vdesk on:4 run:'C:\Program Files\Joplin\Joplin.exe'"
powershell -command "Start-Sleep -s 10"
powershell -command "vdesk on:5 run:'C:\Users\Name AnotherName\AppData\Local\Discord\Update.exe' --processStart 'Discord.exe'"
Neither of these worked. Does anyone know how I can solve this?
Did you try something like
vdesk on:4 run:"C:\Program Files\Joplin\Joplin.exe"
timeout 10
vdesk on:5 run:"C:\Users\Name AnotherName\AppData\Local\Discord\Update.exe" --processStart "Discord.exe"
in your *.bat without using any powershell command for vdesk?