Solved

InstallShield Skip SQL Login Page

Posted on 2011-02-24
13
2,226 Views
Last Modified: 2013-11-14
I created an installer which will also install sql server express as a prerequisite. And after installation, it will run some sql scripts to create a database.

Everything works fine except that during the installation, the user is prompted an sql login page. Is there a way to skip/remove the login page since I already supplied all the required info to connect to sql server (i.e. instance name, authentication name/pass)?
0
Comment
Question by:Thomasian
  • 5
  • 5
  • 3
13 Comments
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 34970981
on the page "sql scripts", when you create sql connection, you can specify login, password, etc. Good practice is to use [PROPERTYNAMES] rather than hardcoded values, and you will find them on the tab "advanced".
Capture-02-24-00002.png
0
 
LVL 22

Author Comment

by:Thomasian
ID: 34971042
Actually, I was able to supply the login, password. But the problem is, the user is prompted a login page which allows the user to change the values I provided.

What I wanted to know is how to skip/remove the login page during the installation.
0
 
LVL 12

Accepted Solution

by:
jmcmunn earned 333 total points
ID: 34974878

If you know you have the properties set properly (which it sounds like you do) then you can modify the behavior and interface of the install by going to the "Custom Actions and Sequences" node in the Installation Designer.  This is under the Behavior and Logic folder.

You will need to find the SQLLogin Dialog (if I am remembering the name correctly) and change the behavior of the dialog BEFORE that in the User Interface sequence and change some behaviors.  Essentially, what you are going to do is make the previous dialog redirect to whatever dialog follows the SQL login form, passing the same values along as it does.

As an example, check the events on the "Next" button and you will see that it has an event (or more than one) that is of type NewDialog.  This is the one that sends it along to whatever dialog is next.

Assuming the Sql properties are indeed set (which they must be if they show in the form) then you can safely skip the one that prompts for them by redirecting past the login form...you may need to set an additional value from your previous dialog by adding a new event there (you can see what the login dialog sets in it's events and mimic those).  It looks like the only one is "ISSQLServerValidate" needs to be set when leaving the login page.

This may be confusing...but if you get into the dialogs section and start glancing around it will make a lot more sense.
0
 
LVL 22

Author Comment

by:Thomasian
ID: 34976250
I was able to make it work without changing anything but the "New Dialog" property of the dialog previous to "SQL Login" dialog.

What does "ISSQLServerValidate" do and is it really required to make it work properly?
0
 
LVL 12

Expert Comment

by:jmcmunn
ID: 34976405

It may not be required for you, I believe it is simply a property telling Installshield to call a validation custom action using the provided SQL connection information.
0
 
LVL 12

Expert Comment

by:jmcmunn
ID: 34976432

Here's a reference page for Installshield custom actions...

http://kb.flexerasoftware.com/doc/Helpnet/installshield12helplib/Ref-ISCustomActions.htm
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 34976439
ISSQLServerValidate is a custom action that is called by pressing button "next" in sqllogin dialog, and which obviously validates if the values entered by the user on sqllogin dialog are correct. Since you skip the dialog, you don't have to worry about it.

Note that whenever you visit sql scripts page in Installshield, it will reinsert sqllogin dialog.
0
 
LVL 22

Author Comment

by:Thomasian
ID: 34976496
Does it automatically validates whether the login is valid or do I have to write my own code to do the tests?

>on the page "sql scripts", when you create sql connection, you can specify login, password, etc. Good practice is to
>use [PROPERTYNAMES] rather than hardcoded values, and you will find them on the tab "advanced".

I actually hardcoded the server instance name and login info. Can you explain how to use [PROPERTYNAMES]? I looked at the Advanced tab but I don't see anywhere I can enter those info.
0
 
LVL 12

Expert Comment

by:jmcmunn
ID: 34976533
The custom action will validate that it can connect, but won't run any specific commands.  If you hard coded the correct user/password then validation seems like overkill to me.  But you could check it if you think you want to.

If you have your scripts in the install correctly, then everything should be working?  or is there something in addition to the skipping of the dialog?  Based on the question, I assumed that everything was already running properly and you were just trying to save showing a step?
0
 
LVL 40

Assisted Solution

by:Vadim Rapp
Vadim Rapp earned 167 total points
ID: 34976753
I think it's good idea to put that validation even separately in the sequence, just to make sure that sql server has been installed correctly and is working, before executing the scripts. Not necessary, but looks like sound practice.

Advanced tab of SQL Scripts shows the properties assigned to what you have typed on the page "General". If you go to Property Manager, you will find there those properties with the values you typed. So what I mean is if your scripts, or anything else in the installation, are using, say, database name, you refer to it by property value rather than hardcode it again. For example, if you also store database name in the Registry, you specify that registry value as [IS_SQLSERVER_DATABASE] (which is the property assigned on SQLScripts/Advanced page to the database name).
0
 
LVL 22

Author Comment

by:Thomasian
ID: 34985186
jmcmunn,

Yes, everything actually works fine. I just want to skip the login page since I don't really want the users to change anything and it could confuse them.


vadimrapp1,

Do you mean that I can just enter the server name, user name, etc.. at the property manager and just leave them blank at the sql connection under sql scripts?
0
 
LVL 12

Assisted Solution

by:jmcmunn
jmcmunn earned 333 total points
ID: 34985245

That is correct, in fact you can see that if you change the associated properties in one place it also updates the other.

They are all of the ones with names IS_SQLSERVER_XXXX

Once you have the dialog actions set, you can change the properties (or do it from the SQL connection setup) and you should be good to go.
0
 
LVL 22

Author Closing Comment

by:Thomasian
ID: 34985260
Both of you have been very helpful.

Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows 7 installation issues with an HP Z800 Workstation 7 275
MS Visual Studio 2015 - Install Error 5 85
How to setup Redhat on HP server? 3 14
Sound 1 30
Installations often have prerequisites, such as “Microsoft .Net framework is required for this product”. The usual implementation in MSI installations is system search for a particular registry setting representing the required prerequisite, followe…
Among others, I monitor the Windows Installer zone and Installer zone. I find that many of the questions could be answered much more quickly if a Windows Installer verbose log were submitted with the question.   However, I do not always have t…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now