Computing.Net > Forums > Windows XP > CMD: Running batch under diff user

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

CMD: Running batch under diff user

Reply to Message Icon

Name: blink
Date: August 4, 2006 at 00:58:26 Pacific
OS: XP/2003
CPU/Ram: Present
Product: -
Comment:

I'm currently coding a batchfile that does some modifications on user groups. For this to work, an administrative account is needed. All users that will be using this tool logon on using their normal account that does not have administrative rights.

Of course its an option to rightclick the bat file and do a run as, but it would be much easier and cleaner if, when the file is opened, it automatically runs as the administrative account.

Is there a way to implement the runas command and the actual code in one batch file?



Sponsored Link
Ads by Google

Response Number 1
Name: Jennifer SUMN
Date: August 4, 2006 at 07:39:00 Pacific
Reply:

You can do it, but you'd have to type in the username and password of the Administrator account. Doubtful you want that anywhere in Plain text.

Why not just use a GPO to make the changes?

Life is more painless for those who are brainless.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: CMD: Running batch under diff user

ncpa.cpl under limited user www.computing.net/answers/windows-xp/ncpacpl-under-limited-user/144563.html

Assigned my own limited user acct.. www.computing.net/answers/windows-xp/assigned-my-own-limited-user-acct/146391.html

admin can't run msconfig www.computing.net/answers/windows-xp/admin-cant-run-msconfig/83317.html