General discussion

  • Creator
    Topic
  • #2280360

    login script with runas command

    Locked

    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?

All Comments

  • Author
    Replies
    • #3387640

      Reply To: login script with runas command

      by joseph moore ·

      In reply to login script with runas command

      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.

Viewing 0 reply threads