Link to home
Start Free TrialLog in
Avatar of Irfyy
Irfyy

asked on

Run a Exe after Successful VPN Connect

Hi,

I have a exe that needs to be executed automatically after every successful VPN connect. We all have Laptops here and we connect to the network thru VPN dial up. And I want one particular exe to run after every successful VPN connection. Cld anyone help me in achieving this? Its very urgent and I wld be very thankful to U all if this problem of mine is solved.

Regards
Irfyy
Avatar of ShineOn
ShineOn
Flag of United States of America image

Where do you want this application to run?  On a server, or on the laptop?  Or does it matter?

What OS are you using, both server and laptop?

After a successful connection, what is the first activity by a laptop?  Is it, perhaps, authenticating to a tree or domain?  I HOPE you are forcing these VPN users to log in after establishing their connection, before allowing access to any network services.

You should be able to formulate a login script that runs conditionally when a user logs in through a VPN connection, that would execute your program.  It would be easiest, of course, to have it execute on the laptop in such a case.

There may be a way (I don't recall) to force execution of a program on a server from a client login script.  If there is a way, I'm sure another Expert here will give you appropriate advice.  Otherwise, there are ways to trigger execution based on various events, which could be caused by the login script.
Avatar of Irfyy
Irfyy

ASKER

Hi,

I want the Application to run on the users Laptop. And this is very much necessary that the Appln runs on the users Laptop.

OS used is Win 2k.

Can we get help on which event can trigger this execution.

Or else, Experts cld U pls shower Ur thoughts on this so that it wld be helpfull for me?

Thanx
Irfyy



If your users are authenticating as users on a Win2K server after making their VPN connection, they should be able to run a login script as part of their login to your domain.  

The login script would contain the command to run the executable.  It would go faster if the laptop already had the executable, but then you have to devise a way to keep the executable up-to-date on all the laptops.  A slow VPN link, especially if it's analog dialup, will make the launch of the program rather slow unless it does reside on the laptop.

Like I said, you should be able to make execution of the program conditional depending on whether the user is connected directly to the LAN or through the VPN.
otherwise create a batchfile that uses rasdial to establish the connection and then executes your application

RASDIAL /PHONEBOOK:phonebookfile
myapp.exe
Avatar of Irfyy

ASKER

Hey,

if U are talking abt putting this exe in the domain login script, then I wld like to tell U that this exe shld not execute on all domain users desktop. Well let me explain the scene first.

My Appln will be installed on some client desktops' startup folder so that irrespective of whether the user logs in using domain userid or not, the exe will be called on all logons.

So I shld make the exe execute when this user connects to VPN also. All the install details are available in Registry.

Hope the picture is clear now. I want this exe to be executed only on some client desktops who have installed my appln when they connect thu VPN.

Pls help.

And Chicagoan, what is the batch file U were talking abt? Will that serve my purpose now? Cld U pls elaborate?

Thanx
Irfyy
That is why I am saying that this should be conditional on whether or not the user is logging in via VPN.

I know it can be done, but I have to leave for work for about 16 hours, so I will leave it up to the other Experts to help you figure out how.
ASKER CERTIFIED SOLUTION
Avatar of chicagoan
chicagoan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Irfyy

ASKER

Chicagoan,
Wht will this do? Execute my exe? How?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perhaps Chicagoan's comment and my comment can be combined to get a solution.  

The .bat file shortcut Chicagoan recommends could have a SET command in it to set a custom environment variable value that indicates that, since the BAT file was run to make the connection via VPN, the connection is a VPN connection, which then would trigger execution of the program via an IF conditional statement in your login script.

Make more sense now?  Anyone else have more details to help Irfyy get this done?