Solved

Run a Exe after Successful VPN Connect

Posted on 2003-12-09
13
426 Views
Last Modified: 2010-08-05
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
0
Comment
Question by:Irfyy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
13 Comments
 
LVL 35

Expert Comment

by:ShineOn
ID: 9903087
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.
0
 

Author Comment

by:Irfyy
ID: 9903357
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



0
 
LVL 35

Expert Comment

by:ShineOn
ID: 9903562
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.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Expert Comment

by:chicagoan
ID: 9903581
otherwise create a batchfile that uses rasdial to establish the connection and then executes your application

RASDIAL /PHONEBOOK:phonebookfile
myapp.exe
0
 

Author Comment

by:Irfyy
ID: 9903634
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
0
 
LVL 35

Expert Comment

by:ShineOn
ID: 9903650
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.
0
 
LVL 18

Accepted Solution

by:
chicagoan earned 45 total points
ID: 9903678
Create a shortcut to the batch file and have the user use the batch file to connect.
You can use one rasdial isnatance to dial the isp and another to establish the vpn, if necessary.

rasdial /phonebook:isp
rasdial /phonebook:vpn
myapp.exe
0
 

Author Comment

by:Irfyy
ID: 9903743
Chicagoan,
Wht will this do? Execute my exe? How?
0
 
LVL 35

Assisted Solution

by:ShineOn
ShineOn earned 45 total points
ID: 9910681
Someone out there should be able to answer your question after this fashion:

Using a similar example of how conditional execution within a NetWare login script works - you should be able to set an environment variable somehow that indicates that the login is through the VPN - this might be based on a test of the IP address range assigned.

This environment variable must be set prior to execution of the login script.  When the script hits the "if" statement that tests for the environment variable, it would either run the program if the environment variable indicates it is a VPN connection, or it will not run the program if the environment variable indicates that it is not a VPN connection.

That SHOULD be translatable into a similar process for your Windows login script, which is essentially a glorified DOS .BAT file..  

If it CAN'T be done, then that's yet another indication of the superiority of NetWare networks over Windows networks.  If it CAN be done, then I expect to see a post from another Expert explaining to you HOW to do what I just described.

If you don't get a comment from another Expert with how to do what I described in a Windows network environment, then perhaps you can use the information I provided to devise your own solution using the logic-flow I recommended.
0
 
LVL 35

Expert Comment

by:ShineOn
ID: 9910704
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?
0

Featured Post

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question