This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Get values from SQLLogin Dialog
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 04, 2011
03:22 PM
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.
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.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 05, 2011
11:13 PM
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
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
