0
votes

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?

2
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
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. Make a batch file and call the msi installer from it.
  2. Then create a shortcut to the batch file.
  3. Right click on the shortcut -> Properties -> Shortcut tab -> Advanced.
  4. Click Run as administrator. Execute the batch script from the shortcut.
  5. In the scheduler, give the path to this shortcut.
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.