cancel
Showing results for 
Search instead for 
Did you mean: 
NihadOb
Pilgrim

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?
Labels (1)
0 Kudos
4 Replies
hidenori
Pilgrim

Re: Patch and SQL login dialog

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.
0 Kudos
NihadOb
Pilgrim

Patch and SQL login dialog

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
0 Kudos
hidenori
Pilgrim

Re: Patch and SQL login dialog

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.
0 Kudos
NihadOb
Pilgrim

Minor update and sql ingo

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:
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-upg... , 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.
0 Kudos