Schedule Task

Common questions about using Actual Installer.
Post Reply
Always Learning
Posts: 9
Joined: Sat Sep 04, 2010 4:44 pm

Schedule Task

Post by Always Learning »

Hi There,

I have a couple of questions if you could help please.

Is there a way I can run an SQL Server 2005 script. It need to target a local database and run the script on that database.

Also is there a way to install an .exe and then add a scheduled task refering to the installed .exe

Thanks for your help.

Best Regards,
Leo
Site Admin
Posts: 403
Joined: Fri Jan 22, 2010 12:40 pm
Contact:

Re: Schedule Task

Post by Leo »

Is there a way I can run an SQL Server 2005 script. It need to target a local database and run the script on that database.
You can run scripts from the command line by using the SQLCMD command line utility and passing it either the script.
In Actual Installer go to System-Command and click Add:

Code: Select all

Command: <SystemDir>\cmd.exe
Parameters: /C sqlcmd -S myServer\instanceName -i C:\myScript.sql
Show: Normal
Timing: After Installation
Also is there a way to install an .exe and then add a scheduled task refering to the installed .exe
This option is not supported.
Leo,
Actual Installer Team
http://www.actualinstaller.com
Always Learning
Posts: 9
Joined: Sat Sep 04, 2010 4:44 pm

Re: Schedule Task

Post by Always Learning »

Hi There,

I have tried your suggestion and it does work if I specifically name where the script is located. I.E C:\Temp\Angtest.sql
What I want to do is use the installer to write all the files to the installDir and then reference the SqlScript in that directory.
I have tried "/C sqlcmd -S MatrixPC6\MatrixPC6_2000 -d TestInstaller -i <InstallDir>Angtest.Sql" but it does not work.
If I use "/C sqlcmd -S MatrixPC6\MatrixPC6_2000 -d TestInstaller -i C:\Temp\Angtest.Sql", where I give the location of the input file, it works.

How would I get over this.

Thanks for the help.

Best Regards,
Leo
Site Admin
Posts: 403
Joined: Fri Jan 22, 2010 12:40 pm
Contact:

Re: Schedule Task

Post by Leo »

In the first cmmand line you've lost the slash (\):
<InstallDir>Angtest.Sql
change to
<InstallDir>\Angtest.Sql
Leo,
Actual Installer Team
http://www.actualinstaller.com
Post Reply