[AccessD] OT: Mapped drive on VPN

Drew Wutka DWUTKA at marlow.com
Thu Feb 6 12:13:00 CST 2003


My bad on the Domain.  If you have a VPN 'connection icon' setup, in your
Connections window, as long as it has all of the settings needed to connect
saved, you would be just fine using rasdial MyVPNName (as you did.)  I just
copied what I was using for the AccessD Archiver, where I don't have my
'credentials' saved in the VPN connection icon.

A domain is an NT Network thing.  (For 2000 it's called Active Directory).
Essentially it's a workgroup, but instead of everything being on the local
machines, you have Domain Controllers, that authenticate users and groups.
Centralized security essentially.  At home, my Domain is Wolfwares, so when
I log in at home, I have the following boxes:

User Name: dwutka
Password: ************
Domain: wolfwares

At work, it's:

User Name: dwutka
Password: ************
Domain: marlow

So, when I make a VPN from home to work, the /Domain param is /Domain:marlow

Make sense?

I'm a little surprised you didn't use the SUBST command though, that is a
nifty little command that's been around since the DOS days, and would
'mimic' the drive for you for testing or work, when you aren't connected
with the VPN.

Anyhow, glad I could help!  (See, I knew there was a reason you let me stay
on the List! <VBG>)

Drew

-----Original Message-----
From: John W. Colby [mailto:jcolby at colbyconsulting.com]
Sent: Thursday, February 06, 2003 10:14 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] OT: Mapped drive on VPN


Drew,

You DA MAN!!!

The first part worked like a dream, net use.

The second part has too much stuff that needs an example for me to
understand.

rasdial MyVPNName UserName Password /domain:VPN'sRemoteDomainName

I'm assuming MyVPNName is what I call the connection on my machine - in this
case "Virtual Private Connection Beacon",
UserName Password  I understand

/domain:VPN'sRemoteDomainName though is not specific enough to figure out
(for me anyway)
/domain I assume is the 64.252.xxx.xxx stuff.

What is :VPN'sRemoteDomainName?  There is no domain, it is all A2K desktop.
I'm guessing the workgroup is "Workgroup" since that is the normal default.

However, in the end (after playing around) ... it seems all I need is

rasdial MyVPNName

I have to guess that all of those other params are already in the connection
widget that gets called.

I now have a batch file that looks like:

rasdial "Virtual Private Connection Beacon"
net use W: \\192.168.0.10\Database

That starts the VPN connection and maps the drive for me.

A second batch file:

net use w: /DELETE
rasdial "Virtual Private Connection Beacon" /disconnect

unmaps the drive and disconnects the VPN connection.

HOLY CRAP!  Is this cool or what?

DREW'S DA MAN! DREW'S DA MAN! DREW'S DA MAN! DREW'S DA MAN!

Ok, I got a bit carried away there, but it really was a PITA to have that
mapped drive there that wasn't real, slowing everything down.  And now I
know how to map my server stuff as well.

John W. Colby
Colby Consulting
www.ColbyConsulting.com

-----Original Message-----
From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com]On Behalf Of Drew Wutka
Sent: Thursday, February 06, 2003 1:26 AM
To: 'accessd at databaseadvisors.com'
Subject: RE: [AccessD] OT: Mapped drive on VPN


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
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.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