Our forums are currently in maintenance mode and the ability to post is disabled. We will be back up and running as soon as possible. Thanks for your patience!

General discussion


login script with runas command

By jgallihe ·
I have an application for a user that requires certain network drives to be mapped. I know with runas I can specify the profile the process will use. Is there any way using the runas command I can have the process "execute" the login script or something similiar so when the process runs it has access to the same drive mappings as when the user actually runs the process?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by Joseph Moore In reply to login script with runas c ...

I'm sorry, but it is late Friday evening for me, I am tired, it has been a long week, and your question is not making much sense.
What are you trying to do, exactly? Are you asking how to map drives like USERX when USERY runs the app?
If so, then you can do this from withing a BAT file. You can use the NET USE command with the /U switch to specify a username/password to mape the drives as.

For example, when BOB is logged in, he can run a script that maps drive G to \\SERVER1\SHARE1. Normally, it looks like this:


Now,that will run with BOB's permissions. Now, say that BOB wants to map the drive, but use TOM's account, since TOM has more rights then BOB. Now, the security issues asside, it would be done like this:


That's it.

Related Discussions

Related Forums