Hi, I don't have much experience with runas command. I need to install a windows service written in C++, such as:
C:\folder name with spaces>service.exe -install
since I need to use runas to run it as admin, the space within the file path gives me error. I've tried the following:
1. C:\folder name with spaces>runas /user:domain\admin "service.exe -install"
2. C:\folder name with spaces>runas /user:domain\admin "C:\folder name with spaces\service.exe -install"
3. C:\folder name with spaces>runas /user:domain\admin "\"C:\folder name with spaces\service.exe\" -install"
4. C:\folder name with spaces>runas /user:domain\admin "\"C:\folder name with spaces\service.exe -install\""
but non of above work. So I would like some advice to make the above code works. Thank you.