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: Create Catalog If Absent not Working
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
‎Apr 06, 2011
09:26 AM
Create Catalog If Absent not Working
History:I was new to Installshield when we did our first release and did not version any of my SQL scripts. In that install we created a database named: UserData
Current Change:Now we are sending out a new release and due to the complexity of the database and the fact that we did not version the data it will be easier for us to just create a new database named: UserData1_1
We have written scripts to copy over the data from the original "UserData" database to the new "UserData1_1". Going forward we have all the scripts versioned so we will not have this problem again.
Problem:When I install the new version of the application on a machine that does not have the old version everything works perfectly. If the older version is on the computer and we are trying to upgrade it will not create the new database even when the "Create Catalog If Absent" is checked.
I was able to create the new database in a script during the update, but because we are not connected to the new database the Installshield version table is being created inside fo the Master database. That of course has lead to a whole new host of problems.
Question: When doing an update Installshield looks to be assuming that the database was installed in a previous version is already there. Does anyone know where that flag is set or how to resolve this issue?
Current Change:Now we are sending out a new release and due to the complexity of the database and the fact that we did not version the data it will be easier for us to just create a new database named: UserData1_1
We have written scripts to copy over the data from the original "UserData" database to the new "UserData1_1". Going forward we have all the scripts versioned so we will not have this problem again.
Problem:When I install the new version of the application on a machine that does not have the old version everything works perfectly. If the older version is on the computer and we are trying to upgrade it will not create the new database even when the "Create Catalog If Absent" is checked.
I was able to create the new database in a script during the update, but because we are not connected to the new database the Installshield version table is being created inside fo the Master database. That of course has lead to a whole new host of problems.
Question: When doing an update Installshield looks to be assuming that the database was installed in a previous version is already there. Does anyone know where that flag is set or how to resolve this issue?
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 06, 2011
10:10 AM
Under the Connection it says:
"Specify the catalog name to work with and optionally the server name and authentication settngs to default to on the SQL Login dialog shown during the installation process. You can also enter any comments regarding this connection, launch the Database Import Wizard, and view the SQL Login end-user dialog."
The thing is on an update my login dialog is not showing. I've attached the dialog that does not show on an update.
I am using InstallShield 2011 Professional Edition and my project is an InstallScript Project
"Specify the catalog name to work with and optionally the server name and authentication settngs to default to on the SQL Login dialog shown during the installation process. You can also enter any comments regarding this connection, launch the Database Import Wizard, and view the SQL Login end-user dialog."
The thing is on an update my login dialog is not showing. I've attached the dialog that does not show on an update.
I am using InstallShield 2011 Professional Edition and my project is an InstallScript Project
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 06, 2011
10:44 AM
davidgid wrote:
The thing is on an update my login dialog is not showing. I've attached the dialog that does not show on an update.
Are you explicitly calling this dialog in the OnResumeUIBefore() (or similar) section of your Setup.rul?
HTH
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 06, 2011
10:58 AM
I have not manually edited my setup.rul. Should I? I was looking in that script file, but it is not obvious as to how I would call that dialog box on an update. Is that what you are suggesting?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 06, 2011
11:19 AM
I would recommend reading a few of the help files to get you started with custom dialogs. In my own limited experience, I can tell you that OnResumeUIBefore() is the "Patch" section for a minor upgrade. Here are a few links that might help you with getting custom dialogs to work:
http://kb.flexerasoftware.com/doc/Helpnet/installshield16helplib_sp1/Dialogs_CreateStandardDlgEd.htm
http://kb.flexerasoftware.com/doc/Helpnet/installshield16helplib_sp1/Dialogs_ImplementStandard.htm
http://kb.flexerasoftware.com/doc/Helpnet/installshield16helplib_sp1/mergedProjects/installshield16langref/LangrefEzDefineDialog.htm
http://kb.flexerasoftware.com/doc/Helpnet/installshield16helplib_sp1/Dialogs_ProcessControlsStandard.htm
I would also recommend getting to know how Setup.Rul and FeatureEvents.Rul work.
HTH
http://kb.flexerasoftware.com/doc/Helpnet/installshield16helplib_sp1/Dialogs_CreateStandardDlgEd.htm
http://kb.flexerasoftware.com/doc/Helpnet/installshield16helplib_sp1/Dialogs_ImplementStandard.htm
http://kb.flexerasoftware.com/doc/Helpnet/installshield16helplib_sp1/mergedProjects/installshield16langref/LangrefEzDefineDialog.htm
http://kb.flexerasoftware.com/doc/Helpnet/installshield16helplib_sp1/Dialogs_ProcessControlsStandard.htm
I would also recommend getting to know how Setup.Rul and FeatureEvents.Rul work.
HTH
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 06, 2011
02:23 PM
I see where in the OnFirstUIBefore() function originally called this:
I am guessing that I need to call that again on the update package to create the new database. I see a function called OnSetUpdateMode() but I do not see where it calls the dialogs. Do you know where the dialogs are called during an update?
Dlg_SQLServer:
nResult = OnSQLServerInitialize( nResult );
if( nResult = BACK ) goto Dlg_SdFeatureTree;
I am guessing that I need to call that again on the update package to create the new database. I see a function called OnSetUpdateMode() but I do not see where it calls the dialogs. Do you know where the dialogs are called during an update?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 07, 2011
08:25 AM
davidgid wrote:
Do you know where the dialogs are called during an update?
For a Minor Upgrade, I think they are called during OnResumeUIBefore() If you don't see that function in your Setup.Rul, select "Miscellaneous" from the left dropdown and "OnResumeUIBefore" in the second. That will add the function with some calls to the default dialogs.
HTH
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 07, 2011
09:13 AM
Hey thanks for the help. You most certainly pointed me in the right direction. What I ended up doing last night was editing the function OnSetUpdateMode().
At the very bottom of the function after this line:
I added this
I have some more testing to do today, but it seems to work okay.
At the very bottom of the function after this line:
UPDATEMODE = ( nMediaFlags & MEDIA_FLAG_FORMAT_DIFFERENTIAL || ( MAINTENANCE && ( nResult != VERSION_COMPARE_RESULT_SAME ) ) );
I added this
if(UPDATEMODE) then
nResult=OnSQLServerInitialize( nResult );
endif;
I have some more testing to do today, but it seems to work okay.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 07, 2011
10:09 AM
Glad it's working. I didn't know about OnSetUpdateMode. That might just be in InstallScript projects. I have only worked with InstallScript MSI projects.
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)