General discussion

Locked

run as statement in a batch file

By mroche ·
What is the correct syntax for supplying the password when using a runas statmen?

This conversation is currently closed to new comments.

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

All Comments

Collapse -

run as statement in a batch file

by maxwell edison In reply to run as statement in a bat ...

One option:

The Runas utility is primarily designed to allow administrators to logon as an ordinary user, but to invoke a seconary logon, without logging off, in order to run administrative tools with administrator rights and permissions

TheRunAs utility prompts for a password when run and can NOT be pre-configured with the password.

The Microsoft solution is to use the SU.EXE tool.

There is another alternative, if the task may be run in the backround:

See this link for the full explanation:

http://www.jsifaq.com/SUBG/TIP3000/rh3063.htm

----------

Another option:

RunAs
Configures a class to run under a specific user account when activated by a remote client without being written as a Win32 service. To do this, the RunAs named-value is set for the class to a user-name and optionally a password. These are then used when the Service Control Manager launches its local server process.

To establish a password for a RunAs class, you must use the DCOMCNFG administrative tool installed in the system directory.

See this link for this whole explanation:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/reg_7nar.asp

----------

REMOVE SPACES from the pasted URLs.

Maxwell

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums