Solved

InstallShield Skip SQL Login Page

Posted on 2011-02-24
13
2,282 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

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…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 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