General discussion

Locked

Scripting Run as different user

By greg.gotcher ·
Is it possible to script running a program as a different user. I have a program that needs admin privilages to run. Currently I have the program shortcut setup to use the run as different user. Then the Run as different user dialog box pops up and they enter the password for the admin privilages. Is there anyway that a username and password can be passed without the user ever having to do anything but click on the shortcut? Any help is greatly appreciated.

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Scripting Run as different user

by joncr In reply to Scripting Run as differen ...

Try the runas command. The problem is that the password will have to be in plain text in a batch file so there are security implications. A better example would be to put this in an AutoIt exe file (AutoIt is a program similar to ScriptIt but you can turn your scripts into exe's). This would hide the password.

Collapse -

Scripting Run as different user

by greg.gotcher In reply to Scripting Run as differen ...

Poster rated this answer

Collapse -

Scripting Run as different user

by shmaltz In reply to Scripting Run as differen ...

This is usualy only possible using SMS. What answer one suggests converting your script to exe will not help since if you open it in notepad you will still be able to see the password.

Collapse -

Scripting Run as different user

by greg.gotcher In reply to Scripting Run as differen ...

Poster rated this answer

Collapse -

Scripting Run as different user

by steve.timmons In reply to Scripting Run as differen ...

I have done what the first guy suggested with AutoIT and it works.

In SMS you can run jobs as an administrator because SMS has a facility to do just that.

Collapse -

Scripting Run as different user

by greg.gotcher In reply to Scripting Run as differen ...

Poster rated this answer

Collapse -

Scripting Run as different user

by greg.gotcher In reply to Scripting Run as differen ...

This question was closed by the author

Back to Windows Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums