Isaac
Lifelong Learner
- Local time
- Today, 02:18
- Joined
- Mar 14, 2017
- Messages
- 8,777
Ok you command line geniuses .... what am I doing wrong?
Bat file contents:
When I double click the bat file to run it, it does successfully open up the command window, and asks me to enter credentials for MyUsername
I enter them (I know what they are, because it's my own username - I'm just testing this out) and hit Enter.
That's it. The command window disappears, nothing else happens. I am positive the path for excel.exe is right (I can Paste it into a Run window and hit Enter and Excel opens), and I'm positive the path for u:\test\test.xlsx is right.
What am I missing here, I know next to nothing about command line stuff.
I'm using advice from here:
excel - Runas a certain xls file - Stack Overflow
under the "Hence, your line should be as follows" example
Bat file contents:
Code:
runas /profile /user:MyUsername "\"C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE\" /r \"U:\Test\Test.xlsx\""
When I double click the bat file to run it, it does successfully open up the command window, and asks me to enter credentials for MyUsername
I enter them (I know what they are, because it's my own username - I'm just testing this out) and hit Enter.
That's it. The command window disappears, nothing else happens. I am positive the path for excel.exe is right (I can Paste it into a Run window and hit Enter and Excel opens), and I'm positive the path for u:\test\test.xlsx is right.
What am I missing here, I know next to nothing about command line stuff.
I'm using advice from here:
excel - Runas a certain xls file - Stack Overflow
under the "Hence, your line should be as follows" example