Google Answers Logo
View Question
 
Q: Need a way to AutoRun a VPN connection before running Outlook ( Answered 5 out of 5 stars,   2 Comments )
Question  
Subject: Need a way to AutoRun a VPN connection before running Outlook
Category: Computers > Operating Systems
Asked by: sherpaj-ga
List Price: $25.00
Posted: 12 Aug 2003 21:03 PDT
Expires: 11 Sep 2003 21:03 PDT
Question ID: 244083
Need a way to AutoRun a VPN connection before running Outlook.

OVERVIEW:
Because of the Blaster virus scare affecting port 135 (exchange) I
have just been forced to use a VPN connection to check my exchange
acct(s).

Our exchange hosting company has given us directions for setting up
the VPN connection with XPs built-in VPN client.

I have made a VPN connection with a shortcut out on the desktop.  The
pass, ip, and everything is saved in the connection.


The only problem is that the users have to remember to run the
shortcut to the VPN connection before launching Outlook.  If they
quick outlook, lose connection, or reboot, they have to the shortcut
again.

WHAT WE WANT TO DO:
Is there a script or something that can fire off this VNC connection
and THEN launch outlook?   This way the users could double-click on
one thing, and be connected.  This thing could have a shortcut on the
desktop.

We have 3 types of configurations at 3 different locations.  All use
Outlook XP and WinXP (1 laptop in location A uses Win2000) PCs.  I
think the solution would be different for each location.

LOCATION A:  single user, single XP laptop
This one would be easy, they just click on the script (or whatever)
from a shortcut on the desktop.  It connects the VPN and fires up
Outlook.

LOCATION B:  3 users, single XP desktop
(with separate XP logins, fast user switching is Off)
This is a bit more complicated.  When one user logs out of XP, another
logs in.  Each has a separate VPN shortcut, because the way our
exchange hosting company works is that they need each user’s exchange
username in the VPN connect.  John cannot open his outlook if the VPN
is logged in as Jane.

LOCATION C:  9 users, using a Terminal server
- Each with their own desktops, on a LAN, logging into a Win Server
2003 file server (running terminal services).  I believe this would be
like a domain controller on a LAN situation.
- When I go into the Users/Group management console, I can enter all
kinds of things for each user.  User profile, Home Profile, Terminal
Services Home Folder, Terminal Services User profile.
- When a user logs in, it never brings up the XP desktop, it only lets
them work in Outlook.  This was accomplished by going into the user’s
Environment tab and setting the “Start the following program at login”
field to:
"C:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE"  /recycle
- Since they never hit the desktop, there is no chance to run the VPN
script.
- The if we could pop something into that “OUTLOOK.EXE"  /recycle”
that would include the VPN script for that particular user.  Each
users needs their own VPN username/password (that matches their
exchange username/password).


SOME LEADS:
Here was what I was able to find, but I didn’t understand it and am
not sure if it applies.
http://www.experts-exchange.com/Operating_Systems/Win2000/Q_20102863.html

OTHER:
I know that I am asking a lot for a mere 500 pt (can I grant more
somehow), and my time frame is 24-48 hours, but any solutions would be
most appreciated.  If you only have a solution for one location, but
not the others

Clarification of Question by sherpaj-ga on 12 Aug 2003 22:39 PDT
I tried draging a shortcut to ithe VPN into the statrup folder but it
didn't work.  This was under Location 3.

Request for Question Clarification by cyclometh-ga on 12 Aug 2003 22:57 PDT
I believe I can provide you with some assistance, but I'd like to get
some clarfication on your question first:

-What version(s) of Outlook do you use at your locations?

-Is this VPN setup going to be a permanent one (i.e., do you
anticipate that at some time you will no longer be using the VPN)?

-Would a solution that relied on changing the settings of Outlook
itself be appropriate, rather than an external script?

-Does each user, when they obtain access to the environment they will
be logging into outlook from (XP Desktop, Terminal Services session,
etc) use their own login, or are they using some form of shared login?

Thanks, and I look forward to hearing from you,

Cyclometh (cyclometh-ga)

Request for Question Clarification by cyclometh-ga on 12 Aug 2003 22:58 PDT
One other item (sorry that I missed it in my previous clarification
request)

How many users are you dealing with, and can you make this change on a
per-user basis without incurring massive amounts of administrative
overhead?
Answer  
Subject: Re: Need a way to AutoRun a VPN connection before running Outlook
Answered By: cyclometh-ga on 13 Aug 2003 00:19 PDT
Rated:5 out of 5 stars
 
Hi sherpaj-ga!

I realize I'm posting this answer before you responded to my
clarification requests, but I believe that I have found a better
answer than the one I had initially considered. I will provide both my
initial thoughts and what I think is a better solution, based on your
stated needs. If you have any further clarifications you require, I'll
be happy to provide what I can.

First, I had considered that with most versions of Outlook, it is
possible to configure them to be automatically in "offline" mode, and
to automatically connect using a Dial-up Networking connection, such
as your VPN connection.

In Outlook 2000, this is accomplished by opening Tools -> Email
Accounts, selecting View or Change Email accounts, then selecting the
account you want to modify (probably only one in your case), then
clicking "Change". From the resulting dialog box, you can set options
that configure Outlook to be in a disconnected state and use DUN
(Dial-up Networking) on the first tab, titled "General". The
"Connection" tab allows you to specify the DUN connection you wish to
use.

This configuration does work, although it is both slow and somewhat
clumsy, as it is primarily intended for remote use over real (modem)
DUN connections, and not for always-on connections such as LAN or VPN
systems. In this configuration, with the proper settings, the users
would start Outlook and be forced to connect via the VPN the first
time Outlook attempted to perform any network operations, such as
sending or receiving mail.

Other versions of Outlook use a slightly different configuration
system- I believe that withs ome versions, the appropriate dialogs are
accessed through Tools -> Services. The dialogs are somewhat different
in layout, but the options are there.

However, this is not an optimal solution. I'm only including it as an
alternative and to give you as much information as possible.

Since you are using Windows XP and 2000, I would recommend that you
take advantage of the command-line program "rasdial.exe".

[RASDIAL.EXE Knowledge Base Article]
http://support.microsoft.com/default.aspx?scid=KB;EN-US;244734

With RasDial, you can use a batch file to automatically connect to a
VPN or other dialup networking connection on demand.

Here is the usage for rasdial.exe on Windows XP Professional. It may
vary slightly on other operating systems.

C:\>rasdial /?
USAGE:
        rasdial entryname [username [password|*]] [/DOMAIN:domain]
                [/PHONE:phonenumber] [/CALLBACK:callbacknumber]
                [/PHONEBOOK:phonebookfile] [/PREFIXSUFFIX]

        rasdial [entryname] /DISCONNECT

        rasdial

Command completed successfully.

C:\>

You can also find information on rasdial.exe in the Windows XP and
Windows 2000 help system. Click Start, Help and search for
Rasdial.exe. It is in the commandline programs reference.

With this program, a batch file like the following:

--
@echo off
rasdial "Connection Name"
"c:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE" /recycle
--

will automatically start the VPN client and fire up Outlook. However,
this particular example assumes that the user is logged onto the local
machine with the same credentials they use on the network. If the
login name or password is different, you should consider storing the
username and password with the VPN connection, by checking "Save
Password" in the VPN connection dialog. This should enable automatic
logon.

This batch file can be placed in the StartUp folder for a given user
and should run whenever they log onto the system. If you prefer that
the user not be forced to have Outlook pop up when they log in, you
can simply eliminate the last line of the batch file, which will still
force the connection to the VPN.

You could also put a reference to the batch file in the registry:
HKEY_CURRENT_USER\Software\Microsoft\CurrentVersion\Run. A REG_SZ
entry with the command line you wish to execute placed in this
registry key will be automatically run at each logon. However, the
StartUp folder method is probably preferred.

For your Terminal Services system, you can use the same mechanism (I
believe). I have not tested this, but information I have found bears
it out.

For Windows 2000 (and possibly Windows 2003) you may wish to look at
the Connection Manager Administration Kit. See the links below for
more information. The CMAK is a toolkit and wizard that allows you to
customise how connections are managed, including automatic
connections, on Windows systems. I have not used the CMAK personally,
so I don't know for certain if it's suitable for your needs. Howver, I
would recommend taking a look.

[Install Connection Manager Administration Kit on Windows 2000
Professional]
http://support.microsoft.com/?id=271310

The information I have found indicates that the CMAK is installed by
default with Windows Server 2003.

[Create a Custom Connection Manager Service Profile in Windows 2000]
http://support.microsoft.com/?id=317593
http://support.microsoft.com/?id=317593


For your Terminal Services accounts, I believe you should be able to
specify the batch file as the startup program, which will
automatically connect the VPN and then start Outlook, or you can use
the CMAK to connect automatically.

I sincerely hope this information is of use to you, and if I can
provide any further clarification, please ask.

Best regards,

Cyclometh (cyclometh-ga)

Search strategy:

RAS VPN (on http://support.microsft.com)
Outlook automatic VPN (on http://support.microsoft.com)

Request for Answer Clarification by sherpaj-ga on 13 Aug 2003 04:34 PDT
This looks awesome.  I'll try it out right aways.  ne question.   How
do I create a batch file?

Also, where do I save it?

thanks

Request for Answer Clarification by sherpaj-ga on 13 Aug 2003 04:57 PDT
I wound this explaination of how to create batch file on the web:
  
Start any text editor(for examle Notepad) write batch file using any
command prompt commands and save file as <name>.bat.
Commands you can use for batch file described in ntcmds.hlp file.

That was all I needed!!! 

I created the batch file as you described, and then had the terminal
server run that batchfile by inserting "
"c:/batchfile.bat

It works great!
Thanks you so much!

Clarification of Answer by cyclometh-ga on 13 Aug 2003 10:02 PDT
You're welcome, and I'm happy to have been able to help.

Thanks for the feedback, and thanks for using Google Answers!

Regards,

Cyclometh (cyclometh-ga)
sherpaj-ga rated this answer:5 out of 5 stars and gave an additional tip of: $8.00
Awesome.  You just saved my skin.  That was the most helpfull and
complete answer I ever got.

Comments  
Subject: Re: Need a way to AutoRun a VPN connection before running Outlook
From: snsh-ga on 13 Aug 2003 02:44 PDT
 
hardware solution:

For location B and C, could you use a VPN endpoint router?
One VPN tunnel for the whole location.
This would be really easy and stable.

Configuring and maintaining so many VPN clients must really be a
hassle.  Policies get unassigned, IP addresses change, etc.
Subject: Re: Need a way to AutoRun a VPN connection before running Outlook
From: sherpaj-ga on 13 Aug 2003 04:35 PDT
 
We are using Outlook XP.  The terminal server is 2003 server.  The
workstations are 90% XP Pro, and 10% win 2000 Pro.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy