Jump to content

Recommended Posts

Posted

I wrote the following script. I have similar scripts to open internet explorer and excel when the user is not logged in and they work fine. The following script which opens an SSIS package and execute it is working fine when the user is logged in but stop working when the user is logged off. It stops after opening the SSIS package. I dont know why controlsend is working in the other two scripts but not in this one. Please help.

 

ShellExecute("C:\Users\xyz\Desktop\exescripts\PackageToUploadDataToSqlServer.dtsx")
sleep(5000)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(500)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(500)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(500)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(500)
ControlSend("Execute Package Utility", "", "", "{ENTER}")
sleep(50000)
ControlSend("Package Execution Progress", "", "", "{TAB}")
sleep(1000)
ControlSend("Package Execution Progress", "", "", "{ENTER}")
sleep(1000)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(1000)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(1000)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(1000)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(1000)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(1000)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(1000)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(1000)
ControlSend("Execute Package Utility", "", "", "{TAB}")
sleep(1000)
ControlSend("Execute Package Utility", "", "", "{ENTER}")
sleep(1000)


Exit

 

Posted

Thanks for the tip, I will try it.

I also found that there is a command line utility DTexec.exe, which can run the SSIS package from commandline. I created the batch script and added it to the task scheduler.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...