cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
timhodgson
Level 3

Get values from SQLLogin Dialog

Basic MSI Project with IS 2011, using the SQLLogin dialog I want to take the values entered and put them in the system registry.

I have an InstallScript .rul file with a function that attempts to use the following. The script is deferred, synchronous, and runs after InstallInitialize:


sServer = ""; sDB = ""; sUser = ""; sPassword = ""; sAuth = "";
nSize = MAX_PATH; MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_SERVER", sServer, nSize );
nSize = MAX_PATH; MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_DATABASE", sDB, nSize );
nSize = MAX_PATH; MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_USERNAME", sUser, nSize );
nSize = MAX_PATH; MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_PASSWORD", sPassword, nSize );
nSize = 10; MsiGetProperty( ISMSI_HANDLE, "IS_SQLSERVER_AUTHENTICATION", sAuth, nSize );
if (sAuth = "1") then
bWinAuth = FALSE;
else
bWinAuth = TRUE;
endif;
MessageBox ("sServer="^sServer^" sDB="^sDB^" sUser="^sUser^" sPassword="^sPassword, INFORMATION);

The values returned are all blank.

I've tried using CustomActionData, to no avail. Seems like it should be so easy, but is a total pain.
Labels (1)
0 Kudos
(1) Reply
manomatt
Level 8

In a deferred CustomAction if you are trying to access Properties then use CustomActionData.

http://community.installshield.com/attachment.php?attachmentid=7220&d=1217951981 go through this and it will give you a fair idea of how to use CustomActionData
0 Kudos