SQL Server Express 2005 - using compiler variables

Got a problem you cannot solve? Try here.
dziebarth
Posts: 13
Joined: Thu Aug 03, 2006 3:08 pm

SQL Server Express 2005 - using compiler variables

Postby dziebarth » Thu Aug 03, 2006 3:29 pm

I've gotten the SQL Server Express 2005 install to work properly when I've provided hardcoded literals for the parameters - but I'd like to use either compiler variables or script variables so that I can pass in the password and instance name from a build script. I've tried the following:

(set the password in CVDATABASEPASSWORD from build script)

Set Variable SDATABASEPASSWORD to ""#CVDATABASEPASSWORD#""

Install SQL Express (command line: SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 SAPWD=$SDATABASEPASSWORD$ INSTANCENAME="SQLEXPRESS" ADDLOCAL=ALL, get result into variable RESULTCODE)

--- I also tried this...

Set Variable DATABASEPASSWORD to #CVDATABASEPASSWORD#

Install SQL Express (command line: SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 SAPWD=""$DATABASEPASSWORD$"" INSTANCENAME="SQLEXPRESS" ADDLOCAL=ALL, get result into variable RESULTCODE)

with no luck. The result code is zero, but the instance is not created. Is there a way of doing it without hardcoding the literals? Thanks!

Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Postby Gizm0 » Thu Aug 03, 2006 3:34 pm

Which version of InstallAWARE are you using?
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Aug 03, 2006 5:55 pm

Just try script variables, compiler variables will also work unless your script is loaded from a file at runtime.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

dziebarth
Posts: 13
Joined: Thu Aug 03, 2006 3:08 pm

Postby dziebarth » Thu Aug 03, 2006 7:48 pm

I am using InstallAware 5. In my setup InstallAware is launched from the command line by Visual Build Pro 6.0 (Kinook Software - http://www.visualbuild.com/). I can see that the compiler variables (in my example below CVDATABASEPASSWORD) are passed correctly from the build script to IA by using message boxes to display them them during the installation process.

I did attempt to use both compiler variables and script variables as indicated in the code as posted. From what was written I am guessing you are telling me that the plugin supports use of variables for those parameters.

What I need to know is: what am I doing wrong with the syntax of the variables and the code for the plugin in those examples shown in my first post that the proper string is not passed to the underlying Microsoft installer. Specifically the double quotes which surround the actual password parameter seem to be the cause of my confusion.

Thanks for your help!

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Aug 03, 2006 8:06 pm

I think some versions of 5.x had problems with variable substitution and resolution. I'm not sure if that is causing your problem. Do you have the opportunity to try with the latest 6.01 release?
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

dziebarth
Posts: 13
Joined: Thu Aug 03, 2006 3:08 pm

Postby dziebarth » Thu Aug 03, 2006 9:40 pm

I can try it using a trial version of 6.0

What is the correct syntax for the compiler and/or script variable that should be used to accomplish this? Because the syntax of the plugin requires the password and instance name to be in double quotes it is confusing to me wheter I should use option A, B or C (outlined below) assuming the password I desire is XYZ123. Also, do you know how I can tell what command line is actually executed for the underlying Microsoft installer (i.e. is there a way to log what scripts, batch files, executables, etc. - along with the parameters of those items - my installer launched on the target system during the installer execution?) Having that information would allow me to figure out how the compiler variables and double quoting are handled by IA during compile and run time.

A) Make the compiler variable CVDATABASEPASSWORD to be "XYZ123" (i.e. have the double quotes in the compiler variable) then use the plugin command line:

Install SQL Express (command line: SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 SAPWD=#CVDATABASEPASSWORD# INSTANCENAME="SQLEXPRESS" ADDLOCAL=ALL, get result into variable RESULTCODE)

Note that there are no quotes within the code for the invocation of the plugin for the SAPWD parameter.

B) Make the compiler variable CVDATABASEPASSWORD to be XYZ123. (i.e. have no double quotes in the compiler variable) then use the plugin command line:

Install SQL Express (command line: SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 SAPWD=""#CVDATABASEPASSWORD#"" INSTANCENAME="SQLEXPRESS" ADDLOCAL=ALL, get result into variable RESULTCODE)

Note the use of two double quotes on each end of the SAPWD parameter within the code for the invocation of the plugin.


C) Make the compiler variable CVDATABASEPASSWORD to be XYZ123. (i.e. have no double quotes in the compiler variable) then use the plugin command line:

Install SQL Express (command line: SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 SAPWD="#CVDATABASEPASSWORD#" INSTANCENAME="SQLEXPRESS" ADDLOCAL=ALL, get result into variable RESULTCODE)

Note the use of only one double quote on each side of the SAPWD parameter within the code for the invocation of the plugin.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Aug 04, 2006 6:21 am

I think option C will get the job done for you! You can show a MessageBox with the same command line at runtime to see what command line is being passed to the underlying setup.

I think if you use normal variables prior to 6.x, it will not work however.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 178 guests