[AccessD] OT: Mapped drive on VPN

Drew Wutka DWUTKA at marlow.com
Thu Feb 6 00:26:01 CST 2003


Okay, a simple solution would be to make two batch files.

Have one batch file setup the network drive, and one to kill the network
drive.

To setup the network drive: (first line removes substitution)

subst T: /D
net use T: \\computername\sharename

To kill the network mapping:

net use T: /DELETE
subst T: C:\MyLocalTDrive

(MyLocalTDrive would be a folder in the root of your C: Drive)

Now you could probably get fancy, and write a routine that keeps checking
for the existance of the VPN network, but I think just putting those two
sets of lines into two simple batch files would be a simple AND easy
solution.

You can even go a bit further if you want.  If you have RAS turned on for
Windows 2000, it allows you to use command line 'dialing' for a VPN
connection.

To connect to a VPN source:

rasdial MyVPNName UserName Password /domain:VPN'sRemoteDomainName

To Disconnect:
rasdial MyVPNName /disconnect

If those work, you could just have two batch files to start and stop your
VPN connection.

Drew

-----Original Message-----
From: John W. Colby [mailto:jcolby at colbyconsulting.com]
Sent: Wednesday, February 05, 2003 11:14 PM
To: AccessD
Subject: [AccessD] OT: Mapped drive on VPN


Guys, I have a VPN setup to allow me to Remote Access into a client's
system.. Works great, highly recommended.

I also have a mapped drive on the client's system.  using that, whenever I
have the VPN connection going I can drag and drop from my hard disk to the
client's hard disk.  Also works well except... if I don't have the VPN up,
it wreaks havoc with many different things.  Basically any time that Windows
goes out to "scan" for available media, I have to endure a timeout.  This
means when any File Find dialog opens and I click the combo at the top to
display the hard disks... 10 (or more) seconds while it figures out it can't
see that drive.  IEs "autocomplete" in the address bar doesn't work any more
etc.

My question is, is there any way, using scripting or otherwise, to set up
something like a batch file to create the mapped drive.  This would allow me
to unmap the drive whenever I am not connected, the connect and remap the
drive whenever I want to connect to that client using the VPN.

I like the mapped drive and drag and drop from here to there soooo much I am
very hesitant to disable it, but it is a major PITA to endure the problems
whenever the VPN is not active.

John W. Colby
Colby Consulting
www.ColbyConsulting.com


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list