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.
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 "run this program" 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.
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 "script error failed to find/open script.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.