Running an Install from a .bat file with admin privileges?

  • Thread starter Thread starter Broonie
  • Start date Start date
B

Broonie

Is there any way to run an application installation with elevated
privileges from a bat file residing on a CD?

We have an application that requires DotNet 3.5 so we were thinking of
creating CDs which contain both the application installer (an .msi)
and the DotNet installer (an .exe) along with a .bat file that starts
the whole thing of. The idea is that the users (all in remote offices
with very little bandwidth) put the CD the drive, double-click on
the .bat file then walk away while a silent install of .Net and the
applcation takes place. None of the users will have install privileges
though, so is there anything I can do in the .bat file to run both the
installs with elevated privileges?

Cheers
C
 
Do they have the right-click option "Run as Administrator" ?

If not you can add it and test it yourself first.

[HKEY_CLASSES_ROOT\batfile\shell\runas]
@="Run as Administrator"

[HKEY_CLASSES_ROOT\batfile\shell\runas\command]
@="\"%1\" %*"


ju.c
 
Back
Top