I have a msi installer that needs to be run in silent mode. For that I need to run the installer in silent mode through an elevated command prompt. How can I launch the cmd in elevated mode and then run the command to execute installer from that elevated cms using a batch file?
0
votes
same question : stackoverflow.com/questions/11525056/…
– r3ap3r
I need to schedule the batch file on a daily basis.So, I cannot enter the password every time. It has to be automated. Is there any other way out?
– Siddhant
This might help you : stackoverflow.com/questions/7044985/…
– r3ap3r
nah..nothing..What if I schedule my batch file to run with highest privileges? What happens in that case?
– Siddhant
That should probably work.
– r3ap3r
2 Answers
1
votes
1
votes
If you want all programs (including command prompt) to run in admin mode by default, then disable UAC by making enableLUA=0 in registry. Note that this change will prompt for system restart.
EnableLUA can be found under HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System.
Once the system comes up, then all programs will run in elevated (admin) mode by default.