|
| |||||||||
| Tags: bat, privileges |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Running an Install from a .bat file with admin privileges?
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 |
|
#2
| |||
| |||
| Re: Running an Install from a .bat file with admin privileges?
Use the runas command: "Allows a user to run specific tools and programs with different permissions than the user's current logon provides." http://technet.microsoft.com/en-us/l.../cc772672.aspx ju.c "Broonie" <broonie27@hotmail.com> wrote in message news:303cb7ed-2e7e-42ee-8b2c-b15dd323923e@z8g2000prd.googlegroups.com... > 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 |
|
#3
| |||
| |||
| Re: Running an Install from a .bat file with admin privileges?
On Mar 27, 3:23*pm, "ju.c" <bibidybubidyb...@mailinator.com> wrote: > Use the runas command: > > "Allows a user to run specific tools and programs with different > permissions than the user's current logon provides." > > http://technet.microsoft.com/en-us/l.../cc772672.aspx > > ju.c > > "Broonie" <brooni...@hotmail.com> wrote in messagenews:303cb7ed-2e7e-42ee-8b2c-b15dd323923e@z8g2000prd.googlegroups.com... > > 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 I meant to add that I don't want the user to have to enter a password. I want to to pass the password to UAC in the batch file. I realise that means the user can see the password. |
|
#4
| |||
| |||
| Re: Running an Install from a .bat file with admin privileges?
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 "Broonie" <broonie27@hotmail.com> wrote in message news:6eda9a11-86b6-4ac4-b074-93eb552ddd60@s12g2000prc.googlegroups.com... > On Mar 27, 3:23 pm, "ju.c" <bibidybubidyb...@mailinator.com> wrote: >> Use the runas command: >> >> "Allows a user to run specific tools and programs with different >> permissions than the user's current logon provides." >> >> http://technet.microsoft.com/en-us/l.../cc772672.aspx >> >> ju.c >> >> "Broonie" <brooni...@hotmail.com> wrote in messagenews:303cb7ed-2e7e-42ee-8b2c-b15dd323923e@z8g2000prd.googlegroups.com... >> > 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 > > I meant to add that I don't want the user to have to enter a password. > I want to to pass the password to UAC in the batch file. I realise > that means the user can see the password. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Running an Install from a .bat file with admin privileges?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Admin Privileges Not present At the start For Linux Mint | Ossi | Operating Systems | 4 | 10-01-2011 10:06 PM |
| Software cannot install itself, even though running as Admin | Grieg | Windows Security | 4 | 30-12-2010 02:40 AM |
| 1406 error requiring admin privileges to install? | Erika | Vista Help | 4 | 11-09-2009 08:55 AM |
| Not having admin privileges on Laptop | jeffcoo | Operating Systems | 4 | 14-03-2009 09:27 AM |
| Lost Admin Privileges in Vista | Charles Nuglene | Vista Help | 8 | 10-07-2008 05:19 AM |