Daily Shaarli

All links of one day in a single page.

February 3, 2023

cmd - How to run exe available on shared drive using command prompt - Stack Overflow
thumbnail

You can reference the executable directly using a UNC path wrapped in quotes, such as

"\server\share\path\file.extention"
The \ at the beginning denotes it's a UNC path wrapping it in quote sis just good practice in case there are any spaces in the path.

"\domain.com\folder\test.exe" will work UNLESS the test.exe file needs to have it's cmd environment local to the program itself because it doesn't properly set itself on run.

in which case you might prefer to use:

MKLINK /D "C:\Link" "\domain.com\folder"
CD "C:\Link"
test.exe
OR

net use y: "\domain.com\folder"
CD /D "Y:\"
test.exe