Thursday, March 22, 2018

windows - Mapped Network Shares Not Showing Up After Successful Batch Execution

Good evening,



I'm running into a strange issue on a Windows 7 machine. I'm working on deploying OpenVPN to our mobile workforce and they've requested the ability to have their home drive and another share automatically mapped when they log into the VPN.



So far, I'm using the following lines in a batch file:




net use O: \\172.23.6.127\shares /persistent:no
net use U: \\172.23.6.127\%USERNAME% /persistent:no


The command prompt opens as expected and the script executes successfully, however, I cannot see the network drives listed. If I immediately attempt to run the script manually, I get an error 53 telling me that the name is already in use.



As the image below shows, if I disconnect the VPN tunnel then reconnect without running the script automatically (i.e., by removing the UP script on the config folder), then run the batch file manually, the shares are mapped and they show up.



Image showing successful manual share mapping




Any assistance would be really appreciated, thanks.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...