Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 2

Runing an external SQL script during the installation?

Hello Guys,

I was just wondering if there's a way to execute an SQL script (it contains some insert statements) that is on the installation media but not part of the setup executable. What I'm trying to do is to build the install project once and include an SQL script in the CD together with the installer. Each client can potentially have different content for this script, and I like the installer to locate this file at a particular location (for example, the file is called "custom.sql" located in the same place as setup.exe).

From the Installation Designer under SQL scripts, if I choose "Insert script files..." or "Import script files", the content will be static. Is Installshield 2008 capable of doing this or is there a workaround?

PS: The project type is Web Project.

Labels (1)
0 Kudos
(1) Reply
Level 2

One workaround that I can think of right now is to:

1. Create a dummy script in the Installation Designer and the script will contain only a placeholder for text replacement.
2. Configure the Text Replacement to replace that placeholder with an installer property.
3. Create a custom action that, during the installation, reads the content of the "extra\custom.sql" and store it in that installer property.

But i'm afraid the content of custom.sql might be too large for an installer property to hold.
0 Kudos