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

How to run script when you don't have admin rights 1

Status
Not open for further replies.

JonnyRep

MIS
Feb 13, 2003
32
GB
I have several users I have created a script to configure several tools in XP as they don't have admin rights to the PC.

Unfortunately only way I have managed to to use the runas command:

runas /user:computer\administrator "C:\mytool.cmd"

however this prompts them for a password

is there any way I could get this to automate and fill in the password without them having to manually type it?
 
I use AutoIt ( ) which has its own scripting language. Very simple to create 3 line script which sets user credentials (administrator), then calls external program as that user, then closes.

There is also RunAsUser from gpalmer711 found here on Tek-Tips ( ).

I had a DLL conflict with RunAsUser (sorry, don't remember exact details right now - it may have been a problem with Macro Express program). That was a while back. It may have been fixed and it was something that most people would not run across.
 
Thanks wcburton,

I don't think I'd like to go down a 3rd party route however. I prefer if I could just script it myself so that it automates, even if that means exposing the password within the script.
 
Scrap my last comment, I'll be looking into AutoIt!

Cheers wcburton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top