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
- :
- Patch and SQL login dialog
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 07, 2014
04:50 AM
Patch and SQL login dialog
We are using Installscript project and it is time to patch our product. As I can see patch is using initial SQL configuration used on installation, that could be a problem for us in case someone changed password.
Is there a way to show SQL login dialog without changing installscript code?
Is there a way to show SQL login dialog without changing installscript code?
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 07, 2014
06:15 PM
Unfortunately, it looks there is not much options here. If you want to connect to your SQL server without changing InstallScript code, only solution I can think of is to change your SQL password on the server back to the one used by the original installation. If you want to show the SQLLogin dialog for specifying the new password, you are required to change your InstallScript code of the update installation.
Regards.
Regards.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 08, 2014
07:28 AM
When we are talking about changing InstallScript patch dialog sequence, what is the name of method that needs to be changed? Just to confirm, it will affect all my future patches?
Thanks
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 08, 2014
01:14 PM
OnUpdateUIBefore() is the InstallScript event that you need to modify. In order to display the SQLLogin dialog, you simply need to replace the OnSQLServerInitializeMaint() function call with OnSQLServerInitialize(). If you want to display the SQLLogin dialog only when the login credentials stored by the initial installation fails, you would need to change the event to call the OnSQLServerInitialize() function if the OnSQLServerInitializeMaint() function call returns a failure code.
As far as you use the modified InstallScript code, it will affect your future patches.
Hope that helps.
As far as you use the modified InstallScript code, it will affect your future patches.
Hope that helps.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 15, 2014
11:30 AM
I know this is not a right place for this question but it is almost the same scenario.
On minor update we need to verify connection info and I have modified OnResumeUIBefore method:
For some reason connection info from cache (registry) is not used and every time user is redirected to SQLLogin dialog. The same problem is mentioned here : https://community.flexerasoftware.com/showthread.php?167078-Trouble-with-IS_SQLSERVER_*-on-minor-upgrades/page2&highlight=SQLRTServerValidate , but different version of Installshield. Fix was to replace ISSQLSrv.dll.
Am I doing something wrong in the code or this bug is still active?
Thanks
On minor update we need to verify connection info and I have modified OnResumeUIBefore method:
function OnResumeUIBefore()
int nResult;
string szTitle, szMsg, sSqlValidationStatus, sDatabase;
number maxBufferSize;
begin
maxBufferSize = MAX_PATH;
Dlg_SdWelcome:
szTitle = SdLoadString(ISWI_RESUMEUI_TITLE);
szMsg = SdLoadString(ISWI_RESUMEUI_MSG);
nResult = SdWelcome(szTitle, szMsg);
Dlg_SQL:
SQLRTInitialize2();
nResult = SQLRTServerValidate( ISMSI_HANDLE );
maxBufferSize = MAX_PATH;
MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_STATUS", sSqlValidationStatus, maxBufferSize );
if( sSqlValidationStatus != "0" ) then
MsiGetProperty (ISMSI_HANDLE, "IS_SQLSERVER_STATUS_ERROR", sSqlValidationStatus, maxBufferSize);
MessageBox(sSqlValidationStatus, SEVERE);
MsiGetProperty(ISMSI_HANDLE, "REGISTRY_DATABASE", sDatabase, maxBufferSize);
MsiSetProperty( ISMSI_HANDLE, "IS_SQLSERVER_DATABASE",sDatabase);
nResult = OnSQLLogin( nResult );
if( nResult = BACK ) then
goto Dlg_SdWelcome;
endif;
MsiSetProperty( ISMSI_HANDLE, "IS_SQLSERVER_DO_NOT_USE_REG", "1" );
endif;
Dlg_Run:
// Added in IS 2009 - Set appropriate StatusEx static text.
szMsg = SdLoadString( IDS_IFX_STATUSEX_STATICTEXT_UPDATEUI );
SdSubstituteProductInfo( szMsg );
SetStatusExStaticText( szMsg );
Enable(STATUSEX);
end;
For some reason connection info from cache (registry) is not used and every time user is redirected to SQLLogin dialog. The same problem is mentioned here : https://community.flexerasoftware.com/showthread.php?167078-Trouble-with-IS_SQLSERVER_*-on-minor-upgrades/page2&highlight=SQLRTServerValidate , but different version of Installshield. Fix was to replace ISSQLSrv.dll.
Am I doing something wrong in the code or this bug is still active?
Thanks
hidenori wrote:
OnUpdateUIBefore() is the InstallScript event that you need to modify. In order to display the SQLLogin dialog, you simply need to replace the OnSQLServerInitializeMaint() function call with OnSQLServerInitialize(). If you want to display the SQLLogin dialog only when the login credentials stored by the initial installation fails, you would need to change the event to call the OnSQLServerInitialize() function if the OnSQLServerInitializeMaint() function call returns a failure code.
As far as you use the modified InstallScript code, it will affect your future patches.
Hope that helps.