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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script run as admin

Status
Not open for further replies.

hannable80

Technical User
Apr 5, 2006
28
GB
Hi all,

Just looking for a simple way to run a script as an amdministrator?! I could enter a batch file calling the script under admin mode. Is there any way around this !?

Thanks
 
+ group policy startup script? runs as local system?

+ wrap it in an msi? that has some ability i think?

+ run it as a scheduled job? runs as local system but i think you can specify to run it as a user?

+ install your script as a service? and change the user accoutnt which the service is running under?

+ run your script from some sort of installation service, change the user account which the service runs under to administator

+ logon as an administrator

+ give your user account admin rights, then logon as your user

+ use the runas command?
 
it will be placed in the log on script is there some code in VBS to run as administrator on execution!?
 
no, there is no code in vbscript to runas an administrator.
if it is placed in the logonscript then it will run with the users permissions.
 
If you have Admin rights, I believe it will run as admin. Otherwise, I suggest opening Command Prompt as administrator, then starting it from there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top