Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

?? Run logon script after connecting using Cisco VPN

Status
Not open for further replies.

tdoma

IS-IT--Management
Aug 13, 2003
94
0
0
US
IS there a way to have a logon script to run once a user connects to the LAN using a Cisco VPN client?
 
I haven't try this but I found it in another newgroup:

I have a Windows login script called login.exe that I want to run after the VPN tunnel is up. I created the following batch file and have the VPN client configured to autolaunch it.

echo off
cd\program files\login
cls
echo Please wait until VPN connection is complete
echo Then press the Enter Key to continue
echo Plese wait for login script to process
pause >null
login.exe
echo
echo
end

When you start the VPN client, a CMD window opens and displays the echo comments in the batch file. The pause >null statement makes the batch file stop and wait until you press the enter key. Once you finish your VPN connection, press Enter and the batch file calls login.exe and runs the login script. When the login script completes, it closes the CMD window.
 
I am assuming the login.exe script is in the following path C:\Program Files\Login ? Is that correct?
 
There is a better way.

Just make a batch file with the logon script you wish to use, put a timer in at the beginning like

x = 1
While x<10000
Do x + 1 = x

Adjust that as required to fit the time it takes the client to connect on long connects by upping the number it counts to. Then make a shortcut to it, set the shortcut to run minimized, give it the Icon of the vpn client and set the VPN client to &quot;run this program&quot; and point that to where ever you have the script, which should probably just be the cisco vpn client folder.

Now when the user opens the VPN client and connects the script does what you want without the user having to touch anything. Plus no ugly console box or windows of any kind to click on or see.

I have used this in the past to great success, now I know very little of script programming, and tend to use batch files which I do know well enough. But this trick has never failed me. I even set up similar batch files in Task scheduler to run a script and connect the VPN client then run another script, wait 9 hours and close it all down. No user intervention at all, no mess, no fuss, no complaints at all.

good luck with all this, it is fun if you are new to it like I was when I embarked on it. Well I am still new to the script stuff, so I am sure someone has one even better, but good luck none the less.

Eddie Venus
 
I'm Using Sonicwall VPN Client. I was wondering if there is a way to make a shortcut do the login script without getting a &quot;script error failed to find/open script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top