Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running script as admin

Status
Not open for further replies.

jpgrim

MIS
Aug 19, 2003
26
US
I am doing a software installation with the following script, "call \\RLDC\PUBLIC\SAPgui62\setup\sapsetup.exe /p:"test" /install /noDialog". The script works great if you a part of the "administrators" group but will not install if you are a regular desktop user with no rights. Is there a way to run this as "administrator"?
 
you will probably find that running the sapsetup.exe performs user specific tasks, ie it does things like write to the users profile, writes to the HKCU hive etc etc.
if you dont run the setup.exe in the user context that will actually use the application then be prepared to run a user specific installation before the actual user wants to run the application.

or you could add the user to the local admins then remove them afterwards??
 
This is true. Although, I am only installing the GUI and some MS features. The package I created in sapadmin should take care of the user specific tasks. Most of users will be making no changes to the system and only need to logon. I've logged in as an admin user and ran the script. I later logged in as other users and was able to access the application and features with no issues. That's why I was hoping there was some type of "ran as" command for scripting.
 
we use sms to install software that needs admin rights if the user doesnt have them. it then runs using the sms service account which has admin rights.
failing that we re-package to msi which gives you the ability to install with admin rights.
sorry, never had to do it any other way. nt resource kit might have something of use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top