Question : Problem running SSIS Package (containing Execute Process Task) with SQL Server Agent

Ive developed an SSIS package containing an  Execute Processs Task  that runs  a file called StartVPN.EXE. This file starts a CISCO VPN connection and contains the following  Windows Script which has been compiled using a Windows Macro Recorder:
Run C:\Program Files\Cisco Systems\VPN Client\vpngui.exe
WinWait, status: Disconnected | VPN Client - Version 4.8.02.0010,
IfWinNotActive, VPN Client  |  User Authentication for "myClientConnection", , WinActivate, VPN Client  |  User Authentication for " myClientConnection ",
WinWaitActive, VPN Client  |  User Authentication for " myClientConnection ",
Send, myPassword{ENTER}
The above works fine as long as I run the package manually. When I try to use SQL Server Agent (2005) to run it, the job pauses at the last statement i.e. Send, myPassword{ENTER}. This statement is supposed to enter a password in a dialog box, after which the OK button (or ENTER) is pressed to establish the connection.
Any comments to help solving the above problem will be appreciated.

Answer : Problem running SSIS Package (containing Execute Process Task) with SQL Server Agent

Here are some more things to try:

1. Find a true command line VPN client that will work with command line switches or configuration files rather than one that needs stuff piped into it. i.e. in your C:\Program Files\Cisco Systems\VPN Client folder, can you find any other exe's? the one you are running specifically has 'gui' in its name. Maybe you can find an exe that loads configuration out of a file rather than needing it from the gui.

2. Can you go into the services Applet, find the sql agent service, double click, go to 'Log On' tab. If you have Local System selected, ensure 'allow interact with desktop' is selected. Restart the service and try again. (bit of a guesss this one)

3. We stil haven't established which part of the step it fails on... it may not really matter because it seems obvious that it is the gui interaction failing, but can you add some logging to that script to the windows script that writes out a line at each line. Then you can establish exactly which line its waiting for - it probably is the ENTER line, but its good to be certain.

Random Solutions  
 
programming4us programming4us