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
- :
- You do the work
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
Aug 07, 2009
05:10 AM
Problem in Version Number of Installscript Project while re-installing
Hi,
I am using an Installscript project and using the product version number from the string tables. It is working fine till installshield 12. Now i need to migrate to installshield 2010 professional.
When i build my project with IS 2010 and then try to install it for the first time, everything runs fine. However, if i try to reinstall it, it asks to upgrade the version number and updates the version number stored in the general information window.
Is there any way by which i can disable the use of product version number from the general informatio and only use the version number from string tables??
Thanks
I am using an Installscript project and using the product version number from the string tables. It is working fine till installshield 12. Now i need to migrate to installshield 2010 professional.
When i build my project with IS 2010 and then try to install it for the first time, everything runs fine. However, if i try to reinstall it, it asks to upgrade the version number and updates the version number stored in the general information window.
Is there any way by which i can disable the use of product version number from the general informatio and only use the version number from string tables??
Thanks
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 01, 2009
09:53 AM
Yes - but you have to code it. We had to do the same this because we use the microsoft FOUR digit version numbering A.B.C.D, not a 3 digit number the Installshield requires. So in OnSetUpdateMode() we had to remove the IS code and code our own version number checks and set nResult appropriately prior to:
UPDATEMODE = ( nMediaFlags & MEDIA_FLAG_FORMAT_DIFFERENTIAL || ( MAINTENANCE && ( nResult != VERSION_COMPARE_RESULT_SAME ) ) );
This is the code we added. Once UPDATEMODE is set correctly, everything else in IS works fine.
// Since we use a 4 digit versioning system, the built in InstallShield
// flow, checks, etc doesn't work. We need to create our own.
// For us, IFX_INSTALLED_VERSION and IFX_INSTALLED_DISPLAY_VERSION are always
// going to be null by default.
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szBaseRegInstallKey = "\\SOFTWARE\\Zygo Corporation\\" + IFX_PRODUCT_NAME;
listData = ListCreate(STRINGLIST);
if (listData = LIST_NULL) then
Sprintf(szMessage, "Unable to check previously installed versions.");
nResult = WriteLine(glLogFile, szMessage);
//MessageBox(szMessage, INFORMATION);
else
nResult = RegDBQueryKey(szBaseRegInstallKey, REGDB_KEYS, listData);
//SdShowInfoList("", "REGDB_KEYS", listData);
nResult = ListGetFirstString(listData, szInstalledVersion);
szMostRecent = "";
while (nResult != END_OF_LIST)
if (szInstalledVersion > szMostRecent) then
szMostRecent = szInstalledVersion;
endif;
nResult = ListGetNextString(listData, szInstalledVersion);
endwhile;
ListDestroy (listData);
endif;
IFX_INSTALLED_VERSION = szMostRecent;
IFX_INSTALLED_DISPLAY_VERSION = IFX_INSTALLED_VERSION;
RegDBSetDefaultRoot(HKEY_CLASSES_ROOT);
// Verify that the installed version is valid.
if( !StrLengthChars( IFX_INSTALLED_VERSION ) && MAINTENANCE ) then
// If this error occurs, IFX_INSTALLED_VERSION needs to be set manually.
szMsg = SdLoadString( IDS_IFX_ERROR_UPDATE_NO_INSTALLED_VERSION );
MessageBox( szMsg, SEVERE );
//mpx_Cleanup(): ??
abort;
endif;
// Verify that the product version is valid.
if( !StrLengthChars( IFX_PRODUCT_VERSION ) ) then
// If this error occures, IFX_PRODUCT_VERSION was not initialized correctly.
szMsg = SdLoadString( IDS_IFX_ERROR_UPDATE_NO_PRODUCT_VERSION );
MessageBox( szMsg, SEVERE );
//mpx_Cleanup(): ??
abort;
endif;
#if 0 // Remove this code since we use a different version numbering scheme
// Want to make sure this doesn't cause any errors
// InstallShield code:
// Do the version comparison.
// Compares the values of the system variables IFX_INSTALLED_VERSION and IFX_PRODUCT_VERSION
nResult = VerProductCompareVersions();
// Make sure that valid data was returned by VerProductCompareVersions
if( nResult < ISERR_SUCCESS ) then
szMsg = SdLoadString( IDS_IFX_ERROR_UPDATE_VERSION_COMPARE_FAILURE );
MessageBox( szMsg, SEVERE );
abort;
endif;
#endif
if (IFX_PRODUCT_VERSION = IFX_INSTALLED_VERSION) then
Sprintf(szMessage, "Installation detected that the current version (%s) is the same as the installed version (%s).", IFX_PRODUCT_VERSION, IFX_INSTALLED_VERSION);
WriteLine(glLogFile, szMessage);
nResult = VERSION_COMPARE_RESULT_SAME;
elseif (IFX_PRODUCT_VERSION > IFX_INSTALLED_VERSION) then
Sprintf(szMessage, "Installation detected that the current version (%s) is newer than the installed version (%s).", IFX_PRODUCT_VERSION, IFX_INSTALLED_VERSION);
WriteLine(glLogFile, szMessage);
nResult = VERSION_COMPARE_RESULT_NEWER;
else // case (IFX_PRODUCT_VERSION < IFX_INSTALLED_VERSION) then
Sprintf(szMessage, "Installation detected that the current version (%s) is older than the installed version (%s).", IFX_PRODUCT_VERSION, IFX_INSTALLED_VERSION);
WriteLine(glLogFile, szMessage);
nResult = VERSION_COMPARE_RESULT_OLDER;
endif;
UPDATEMODE = ( nMediaFlags & MEDIA_FLAG_FORMAT_DIFFERENTIAL || ( MAINTENANCE && ( nResult != VERSION_COMPARE_RESULT_SAME ) ) );
This is the code we added. Once UPDATEMODE is set correctly, everything else in IS works fine.
// Since we use a 4 digit versioning system, the built in InstallShield
// flow, checks, etc doesn't work. We need to create our own.
// For us, IFX_INSTALLED_VERSION and IFX_INSTALLED_DISPLAY_VERSION are always
// going to be null by default.
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szBaseRegInstallKey = "\\SOFTWARE\\Zygo Corporation\\" + IFX_PRODUCT_NAME;
listData = ListCreate(STRINGLIST);
if (listData = LIST_NULL) then
Sprintf(szMessage, "Unable to check previously installed versions.");
nResult = WriteLine(glLogFile, szMessage);
//MessageBox(szMessage, INFORMATION);
else
nResult = RegDBQueryKey(szBaseRegInstallKey, REGDB_KEYS, listData);
//SdShowInfoList("", "REGDB_KEYS", listData);
nResult = ListGetFirstString(listData, szInstalledVersion);
szMostRecent = "";
while (nResult != END_OF_LIST)
if (szInstalledVersion > szMostRecent) then
szMostRecent = szInstalledVersion;
endif;
nResult = ListGetNextString(listData, szInstalledVersion);
endwhile;
ListDestroy (listData);
endif;
IFX_INSTALLED_VERSION = szMostRecent;
IFX_INSTALLED_DISPLAY_VERSION = IFX_INSTALLED_VERSION;
RegDBSetDefaultRoot(HKEY_CLASSES_ROOT);
// Verify that the installed version is valid.
if( !StrLengthChars( IFX_INSTALLED_VERSION ) && MAINTENANCE ) then
// If this error occurs, IFX_INSTALLED_VERSION needs to be set manually.
szMsg = SdLoadString( IDS_IFX_ERROR_UPDATE_NO_INSTALLED_VERSION );
MessageBox( szMsg, SEVERE );
//mpx_Cleanup(): ??
abort;
endif;
// Verify that the product version is valid.
if( !StrLengthChars( IFX_PRODUCT_VERSION ) ) then
// If this error occures, IFX_PRODUCT_VERSION was not initialized correctly.
szMsg = SdLoadString( IDS_IFX_ERROR_UPDATE_NO_PRODUCT_VERSION );
MessageBox( szMsg, SEVERE );
//mpx_Cleanup(): ??
abort;
endif;
#if 0 // Remove this code since we use a different version numbering scheme
// Want to make sure this doesn't cause any errors
// InstallShield code:
// Do the version comparison.
// Compares the values of the system variables IFX_INSTALLED_VERSION and IFX_PRODUCT_VERSION
nResult = VerProductCompareVersions();
// Make sure that valid data was returned by VerProductCompareVersions
if( nResult < ISERR_SUCCESS ) then
szMsg = SdLoadString( IDS_IFX_ERROR_UPDATE_VERSION_COMPARE_FAILURE );
MessageBox( szMsg, SEVERE );
abort;
endif;
#endif
if (IFX_PRODUCT_VERSION = IFX_INSTALLED_VERSION) then
Sprintf(szMessage, "Installation detected that the current version (%s) is the same as the installed version (%s).", IFX_PRODUCT_VERSION, IFX_INSTALLED_VERSION);
WriteLine(glLogFile, szMessage);
nResult = VERSION_COMPARE_RESULT_SAME;
elseif (IFX_PRODUCT_VERSION > IFX_INSTALLED_VERSION) then
Sprintf(szMessage, "Installation detected that the current version (%s) is newer than the installed version (%s).", IFX_PRODUCT_VERSION, IFX_INSTALLED_VERSION);
WriteLine(glLogFile, szMessage);
nResult = VERSION_COMPARE_RESULT_NEWER;
else // case (IFX_PRODUCT_VERSION < IFX_INSTALLED_VERSION) then
Sprintf(szMessage, "Installation detected that the current version (%s) is older than the installed version (%s).", IFX_PRODUCT_VERSION, IFX_INSTALLED_VERSION);
WriteLine(glLogFile, szMessage);
nResult = VERSION_COMPARE_RESULT_OLDER;
endif;