General discussion

Locked

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.

1 total post (Page 1 of 1)  
| 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:

NET USE G: \\SERVER1\SHARE1

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:

NET USE G: \\SERVER1\SHARE1 /U:DOMAINNAME\TOM "TOM's password"


That's it.

Back to Windows Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums