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

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
 
J

ju.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top