Log in

View Full Version : VPN /MAP drive



neo_philiac
11-24-2006, 05:50 AM
Ok guys!

Here is the deal. I need to find a way to make a file or just a way (like a .bat file or something) that would setup the vpn automatically and map my drive and whenever I restart it will connect automatically without the users help. Basically we are trying to eliminate the users involvement in the setup of VPN and MAPPING DRIVE so that they don’t have to know any of the server address. Here is a sample of automatic ‘map drive’ batch file. All the user has to do is just run the file.

rem this file will remove all current drive mappings on the respective
rem drive letter then remap the connections

@echo off

cls
echo.
echo If you are using this from home
echo.
echo Please make sure you have connected your vpn connection to IUP First
echo Please press a key on the keyboard to continue with the connection process...
Pause > nul
cls

c:
cd\windows\system32

rem delete all the drives potentially in use
net use g: /d
net use h: /d
net use i: /d
net use n: /d
net use o: /d
net use p: /d
net use w: /d
net use x: /d

rem remap the drives

net use g: \\ecbs\aps$ /persistent:Yes
net use h: /hrmn /persistent:Yes
net use i: \\aaaa1\ins$ /persistent:Yes
net use n: \\abbbb\com /persistent:Yes

neo_philiac
11-24-2006, 05:52 AM
Is there any other forums where I can ask question about network, VPN, map drive question? where you guys would go!!

codeexploiter
11-24-2006, 06:04 AM
Why don't you try using WSH instead of using bat files. You can do the programming using VBScript mostly to tackle even the OS level operations.

I used to visit http://www.security-forums.com (http://www.security-forums.com/viewforum.php?f=13&sid=892c58eef3ed2983cae73954607796f3) they have a good network forums in it.

neo_philiac
11-24-2006, 11:39 PM
ok!! how do i do that (using wsh)?

codeexploiter
11-28-2006, 04:03 AM
This link has an article (http://www.computerperformance.co.uk/ezine/ezine30.htm) about using VBScript for mapping a drive.

Check this.

The following are some good areas where you can learn starting and using Windows Scripting Host operations.

MSDN Online (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/d78573b7-fc96-410b-8fd0-3e84bd7d470f.asp)

Microsoft Technet (http://www.microsoft.com/technet/scriptcenter/guide/sas_wsh_overview.mspx?mfr=true)

WSH Reference MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/60f96092-6021-42f3-9a27-6848f4c38f64.asp)

chrispeddler
06-13-2019, 12:12 AM
Hi. Typically, most well known VPN providers offers automatic setup. But as to mapping your drive I think you need to change protocols to map it. Perhaps this guide (https://thebestvpn.com/troubleshoot-vpn-connection/#disconnect) will give you an idea to setting up VPN.

Xenzal
07-04-2019, 02:17 PM
Here's also an extremely useful article on VPN services: https://vpn-review.com/ It helped me a lot while I was trying to configure all the settings to make it work properly.

DevinSmith
08-22-2019, 08:55 AM
Hi. Typically, most well known VPN providers offers automatic setup. But as to mapping your drive I think you need to change protocols to map it. Perhaps this guide (https://thebestvpn.com/troubleshoot-vpn-connection/#disconnect) will give you an idea to setting up VPN.

Agreed. Change in the protocol is required in order to map it. I would also suggest looking a few other online privacy-related options as VPN itself is not the only solution to protect from online threats.

james438
08-22-2019, 06:52 PM
Locking this thread as it is 13 years old.