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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ending third party VPN

Status
Not open for further replies.

MJB969

Technical User
Jul 8, 2009
8
US
Hi. I'm both new here and to Aspect.

We use Procomm to dial out to telephone switches and pull traffic data for reports. However, things are moving away from dial-up to VPN.

I'm working on modifying a dial-up script to launch a Nortel VPN client, connect the VPN, telnet into the switch to pull the data and then disconnect. I've gotten everything to work, except disconnecting the VPN, so that the next script can call another switch. I've tried the "taskexit TaskId" route and running taskkill. Neither works. From a command prompt taskkill will not kill the task. It says the task is terminated, but it continues to run. I can kill the process in the Task Manager, but I don't think that helps me. I can't figure out how to switch the focus back to the Nortel VPN app from Procomm to try and send the key strokes to disconnect, or close the app.

Any help? Thanks.

Mike
 
Is there a command line you can send to the VPN app to have it close itself?

To switch focus, you can use the taskswitch command I believe (not at a machine with Procomm, but will be later), or use taskactivate if you launched the VPN client yourself using the run command and have the process id.

 
I am launching the VPN app using the run command. Do I need the process ID to use taskactivate? If so, how do I get the process ID?

I've just been informed that we may need to use the same VPN app for another client. Then we're going to need to disconnect the VPN, select another connection and connect, then disconnect.
 
When you launch the app via the run command, there is an optional integer variable you can specify that will hold the task ID (as opposed to process ID like I mentioned earlier) for the VPN app. You can then use that ID with the taskactivate command to hopefully bring the VPN app to the foreground. However, I would check the documentation of the app to see if there is a command line you could use to disconnect the current VPN session or exit the app entirely (and then run a second command line to select another connection as you mentioned you will need to do now). You might try running the app in a cmd window, by itself, or with /? /h -? -h etc. arguments, to see if there is some short documentation it will spit out that might guide you. I think this would be a better way to automate the process.

 
Thanks. I was getting compile errors when I tried "integer taskid" so I took that out. We only have Procomm on one production machine, so I have to kick that person off to get access to it to try stuff.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top