Web Development

General discussion


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.

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:



Another option:

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:



REMOVE SPACES from the pasted URLs.


Related Discussions

Related Forums