Schedule Task

Common questions about using Actual Installer.

Schedule Task

Postby Always Learning » Sat Sep 04, 2010 4:49 pm

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,
Always Learning
 
Posts: 9
Joined: Sat Sep 04, 2010 4:44 pm

Re: Schedule Task

Postby Leo » Wed Sep 08, 2010 7:13 am

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
Leo
Site Admin
 
Posts: 358
Joined: Fri Jan 22, 2010 12:40 pm

Re: Schedule Task

Postby Always Learning » Thu Sep 09, 2010 2:18 pm

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,
Always Learning
 
Posts: 9
Joined: Sat Sep 04, 2010 4:44 pm

Re: Schedule Task

Postby Leo » Sat Sep 11, 2010 3:52 am

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
Leo
Site Admin
 
Posts: 358
Joined: Fri Jan 22, 2010 12:40 pm


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 5 guests

cron