cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
TimStVCS
Level 7

Manually Executing SQL scripts

Hello, I have an InstallScript/MSI project in which I would like to manually control the execution of SQL scripts by using the LaunchApplication function rather than listing the SQL scripts I want to execute in the SQL scripts view. Does anybody know if this can be done? If so, how would you do it? I have written an InstallScript Custom Action to do this, but it seems that Custom Action never gets executed regardless of where I put it in either the install UI or install Execute sequence.

Any advice would be appreciated!

Tim
Labels (1)
0 Kudos
(7) Replies
RobertDickau
Flexera Alumni

If it's an InstallScript MSI project, can you put your code in one of the events, instead of using an InstallScript custom action?

Otherwise, if you create an MSI log file during deployment, is your action being called (or is the reason it's not being called listed)?
0 Kudos
TimStVCS
Level 7

Thanks for the reply Robert. By one of the events do you mean one of the InstallScript events like OnMoving or OnMoved?

Thanks!

Tim
0 Kudos
RobertDickau
Flexera Alumni

Tim,

Yes, those are the events I mean; you can see them in those drop-down lists in the InstallScript view, and the documentation (and in-script comments) should have details about any specific ones you're interested in.

Good luck,

Robert
0 Kudos
TimStVCS
Level 7

Thanks Robert, I will give it a shot.

Tim
0 Kudos
TimStVCS
Level 7

That worked Robert. Now, I have two different issues I could use some help with. 1. The text displayed on the dialog while the SQL scripts are executing says "calculating disk space" or something like that. I would like to update that text to say something like "Executing SQL scripts". I tried using the SetStatusExStaticText function but the text appeared at the top of the dialog box, and did not overwrite the existing displayed message.

2. At the end of the install, a dialog informing the end-user that the installation was successful and prompting them to restart the computer appears eventhough I have set the REBOOT property to ReallySuppress. I am not sure why this is happening.

Thanks in advance!

Tim
0 Kudos
TheTraveler
Level 8

Take a look at SdShowMsg.

SdShowMsg("Show my message...", TRUE);
SdShowMsg("Show my message...", FALSE);
0 Kudos
TimStVCS
Level 7

Thanks, that did the trick!

Tim
0 Kudos