Windows BAT File to Auto Mount Drive
Posted: Sun Aug 30, 2015 1:35 am
I am using the windows openvpn GUI client to autorun a bat file to mount a network drive upon a successful connection. However, the BAT file does not actually mount the drive after executing via the open vpn gu,i but it will successfully mount it if run via windows explorer. What do I need to change to allow this to happen properly? I am running windows 8.1 if that helps!
The name is matching my config file with an _up suffix. Here is the contents of the bat file:
net use Y: \\IP\groupwork password /user:username /persistent:no
I attempted to run it in the client config using the following command string, with the corresponding BAT file:
script-security 2
route-up route-up.bat
This appeared to do nothing, so I reverted back to the previous method. Is it a permission issue that could be causing this? I am open to whatever solution, I am not sold on any particular method! Thanks for any help.
The name is matching my config file with an _up suffix. Here is the contents of the bat file:
net use Y: \\IP\groupwork password /user:username /persistent:no
I attempted to run it in the client config using the following command string, with the corresponding BAT file:
script-security 2
route-up route-up.bat
This appeared to do nothing, so I reverted back to the previous method. Is it a permission issue that could be causing this? I am open to whatever solution, I am not sold on any particular method! Thanks for any help.