Automatic "script" for drive mapping/disconnect/break connection

Now that I have the VPN connection running... I need to automate the steps the user has to do to get connected to the other end.

Now, there are 4 different ICONs plus a manual disconnect.

1.  The user "clicks" on "Connect To Office" ICON to make VPN connection
2.  When the connection is made, the user "clicks" on "Map Office Drive(.bat)" to do

net use I: \\\Drive_C

3. When completed user can "click" on shortcut to "I:\documents and settings\Username\my documents" and work on document files

4. When user is finished "clicks" on "Disconnect Office Drive(.bat)" to do

net use I: /d

5. Then user "right clicks" on "Connect To Office" in the Systray and selects "Disconnect"

Is there a way to simplify this into

  "Connect to Office"
  "Disconnect from Office"



Both systems XP
One side cable modem
Other side SBC DSL
2 WGT624 Wireless Routers

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi sijgs,
You could join the computer to the domain and get the users to log in directly to the domain across the VPN connection. I am assuming you are using the normal windows vpn client.

It sounds as if though you want someone to write a script for you to perform the tasks so you just have the single icon to connect and map the drives etc... You would be better off posting a question in one of the windows sections.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sijgsAuthor Commented:

Well, there is no domain, they are workgroup peers.

I think this entry from Microsoft Networking is all I need in the two .bat files

        rasdial entryname [username [password|*]] [/DOMAIN:domain]
                [/PHONE:phonenumber] [/CALLBACK:callbacknumber]
                [/PHONEBOOK:phonebookfile] [/PREFIXSUFFIX]

        rasdial [entryname] /DISCONNECT


So I can

rasdial "VPN NAME"
check error code
net use d: \\server\share

in on .bat file


net use D: /d
rasdial "VPN NAME" /disconnect

in the second.

Thanks for suggesting another area, I did it with "search" not limited to this area.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.