This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Repair mode
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 22, 2008
05:07 PM
Repair mode
I have an installscript msi project that installs new, deploys a database .bak file and runs a sql script to create and restore this database.
When I run my install in repair mode, I would like to skip the sql component that creates and restores the database.
What condition can I use to do this?
I have tried REINSTALL="" but the script still tries to execute. When I look at the log file, REINSTALL=ALL so not sure why the condition is being ignored.
When I run my install in repair mode, I would like to skip the sql component that creates and restores the database.
What condition can I use to do this?
I have tried REINSTALL="" but the script still tries to execute. When I look at the log file, REINSTALL=ALL so not sure why the condition is being ignored.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 23, 2008
04:05 PM
If you want only for a first-time install, perhaps use "Not Installed"? Or tie the action to a feature condition?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 25, 2008
06:42 AM
I have just encountered similar problem which I have not noticed before
I use a pure MSI project. I run few SQL scripts during installation and one of them creates a database. I didn’t want the script to run during updates or repairs so I added a condition that includes “Not Installed”.
As you can see below, the install releases that the script should only run during installation (Script Execution=RunOnInstall).
---------------------------------------------------------------
Processing the SQL connection 'CreateLoggingDatabases'...
Determining if there is at least one SQL script scheduled to execute under the connection...
The SQL script 'Create_db_logging_SQLServer.sql' is not scheduled to execute. Script Execution=RunOnInstall,
---------------------------------------------------------------
However, later on, it changes its mind and runs it destroying any existing data that exist in the database.
---------------------------------------------------------------
Determining if the SQL script 'Create_db_logging_SQLServer.sql' will be executed...
The SQL script will be executed because no schema version is found on the target database.
Prepare executing SQL script file: 'Create_db_logging_SQLServer.sql'. Path:
---------------------------------------------------------------
Is this an InstallShield or an MSI feature?
I use a pure MSI project. I run few SQL scripts during installation and one of them creates a database. I didn’t want the script to run during updates or repairs so I added a condition that includes “Not Installed”.
As you can see below, the install releases that the script should only run during installation (Script Execution=RunOnInstall).
---------------------------------------------------------------
Processing the SQL connection 'CreateLoggingDatabases'...
Determining if there is at least one SQL script scheduled to execute under the connection...
The SQL script 'Create_db_logging_SQLServer.sql' is not scheduled to execute. Script Execution=RunOnInstall,
---------------------------------------------------------------
However, later on, it changes its mind and runs it destroying any existing data that exist in the database.
---------------------------------------------------------------
Determining if the SQL script 'Create_db_logging_SQLServer.sql' will be executed...
The SQL script will be executed because no schema version is found on the target database.
Prepare executing SQL script file: 'Create_db_logging_SQLServer.sql'. Path:
---------------------------------------------------------------
Is this an InstallShield or an MSI feature?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 28, 2008
07:49 AM
No replies so may be this is a bug.
I have got around the problem by placing all my SQL scripts in a feature and set its condition so that it only gets ‘installed’ if the package is installed for the first time.
I have got around the problem by placing all my SQL scripts in a feature and set its condition so that it only gets ‘installed’ if the package is installed for the first time.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 28, 2008
04:04 PM
I have the exact same problem, and it appears to be random because I have had this working in previous projects. But I'm at a loss of how to get around it in my current project and am really hoping I don't need to take the script out of the IDE and use launchappandwait with osql util in installscript custom action....
My problem is I do want these script to run in a modify or repair mode (depending on feature set chosen) so I can't just put them in a conditional feature.
My problem is I do want these script to run in a modify or repair mode (depending on feature set chosen) so I can't just put them in a conditional feature.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)