In Windows 8.1, I try to run the program from a batch file that is called at startup, and I want the program to run as an administrator. That's what I'm doing:
- I have prog.exe program in c: \ program \ MyProgram directory
- EXE is marked as "Run as administrator"
- There is a batch file RunexE.bat in the c: \ program \ MyProgram directory. It contains all kinds of things, and at the end it contains the line "start prog.exe"
- under "C: \ programdata \ Microsoft \ Windows \ Start Menu \ Programs \ StartUp" there is a shortcut for RunEXE.BAT.
- When rebooting the PC, I expect the shortcut to run RunexE.BAT, which in turn will launch PROG.EXE.
But this does not happen. There is a short βsoundβ sound, as if Windows displayed a message asking you to confirm that the program should work as an administrator, but nothing is visible on the screen.
a) If I mark the shortcut and exe NOT to run as administrator, then the EXE starts.
b) If I mark the shortcut and exe to run as administrator, then the exe does not start.
c) If I mark the shortcut NOT to run as administrator and EXE to run as administrator, then the EXE starts , but it does not start as an administrator .
d) Launching a shortcut for EXE. (No party). Label not marked as administrator, exe marked: exe does not work.
e) Launch shortcut for exe. (No party). Label not marked as administrator, EXE not marked: EXE is running, but not as administrator.
I tried to completely disable UAC - the same results. I also tried using another exe instead of a batch with the same results.
So - is there a way to run the shortcut for EXE at startup that will launch the EXE as an administrator?
source share