I have a batch that is being run with administrative privileges on a Windows 7 machine. That batch has to run another batch, which should access a mapped network drive. However, network drives are only mapped for the non-administrator part of the logged-in user. Since the second batch doesn't need the administrative rights, I'd like it to run as a limited user, and that will let it access the mapped drives. Is there any way to do that?
To make what I want clear, I'd like to get the following flow:
- User eran logs into PC. eran is a local administrator.
- eran runs b1.bat as administrator.
- b1.bat runs b2.bat with eran's limited user credentials (how? that's what I'm asking...)
- b2.bat accesses some mapped drives is now has access to.