Solved

InstallShield Skip SQL Login Page

Posted on 2011-02-24
13
2,203 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

One of the frequent problems with the installations is when some file or registry entry is not removed from the system upon un-installation of the product. Clean removal is always highly desirable. One major reason for that is badly authored inst…
If you don't know how to downgrade, my instructions below should be helpful.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

22 Experts available now in Live!

Get 1:1 Help Now