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
- :
- BASIC MSI project : SQL Authentication error in Silent Mode
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
‎Jul 22, 2014
08:08 AM
BASIC MSI project : SQL Authentication error in Silent Mode
In my installer i am saving all user inputs in to an encrypted registry key including SQL credentials that user provided when user installing product first time.
Therefore, when user installing a major upgrade version for this product my installer get saved user inputs from registry and fill all installer property respectively along with SQL credentials with a custom action that I write in VBScript.
I have created a system search the read a specific registry key value and store values in a Property "REG_DATA"
Then I have wrote a Custom Action in VB Script that read Property "REG_DATA", Decrypt it and split it into array and then store values into respective Properties. See this,
preserveParam = Session.Property("REG_DATA")
preserveParam = Decrypt(preserveParam)
'MsgBox preserveParam
PropArray = Split(preserveParam, "|")
server = PropArray(0)
auth = PropArray(1)
user = PropArray(2)
pass = PropArray(3)
If (Len(server)>0) Then
Session.Property("IS_SQLSERVER_SERVER") = server
End if
If (Len(auth)>0) Then
Session.Property("IS_SQLSERVER_AUTHENTICATION") = auth
End if
If (Len(user)>0) Then
Session.Property("IS_SQLSERVER_USERNAME") = user
End if
If (Len( pass)>0) Then
Session.Property("IS_SQLSERVER_PASSWORD") = pass
End if
This is working fine when i am running application without silent mode but i am getting following error when i am running setup in Silent Mode
1: Attempting to establish the SQL connection... Server: , Database: Test1DB
1: ADO Error: Number: -2147467259 Description: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Source: Microsoft OLE DB Provider for SQL Server SQL State: 08001 Native Error: 17
MSI (s) (58!78) [14:36:29:104]: Product: VIDIZMO -- Error 27502. Could not connect to Microsoft SQL Server ''. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. (17)
MSI (c) (D0:C8) [14:36:10:139]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
Error 27502. Could not connect to Microsoft SQL Server ''. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. (17)
CustomAction ISSQLServerInstall returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
I am running my installer in Silent Mode using command
setup.exe /s /v"/l*v \"C:\setup\4.5.5.1\setup.log\" /qb"
Therefore, when user installing a major upgrade version for this product my installer get saved user inputs from registry and fill all installer property respectively along with SQL credentials with a custom action that I write in VBScript.
I have created a system search the read a specific registry key value and store values in a Property "REG_DATA"
Then I have wrote a Custom Action in VB Script that read Property "REG_DATA", Decrypt it and split it into array and then store values into respective Properties. See this,
preserveParam = Session.Property("REG_DATA")
preserveParam = Decrypt(preserveParam)
'MsgBox preserveParam
PropArray = Split(preserveParam, "|")
server = PropArray(0)
auth = PropArray(1)
user = PropArray(2)
pass = PropArray(3)
If (Len(server)>0) Then
Session.Property("IS_SQLSERVER_SERVER") = server
End if
If (Len(auth)>0) Then
Session.Property("IS_SQLSERVER_AUTHENTICATION") = auth
End if
If (Len(user)>0) Then
Session.Property("IS_SQLSERVER_USERNAME") = user
End if
If (Len( pass)>0) Then
Session.Property("IS_SQLSERVER_PASSWORD") = pass
End if
This is working fine when i am running application without silent mode but i am getting following error when i am running setup in Silent Mode
1: Attempting to establish the SQL connection... Server: , Database: Test1DB
1: ADO Error: Number: -2147467259 Description: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Source: Microsoft OLE DB Provider for SQL Server SQL State: 08001 Native Error: 17
MSI (s) (58!78) [14:36:29:104]: Product: VIDIZMO -- Error 27502. Could not connect to Microsoft SQL Server ''. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. (17)
MSI (c) (D0:C8) [14:36:10:139]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
Error 27502. Could not connect to Microsoft SQL Server ''. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. (17)
CustomAction ISSQLServerInstall returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
I am running my installer in Silent Mode using command
setup.exe /s /v"/l*v \"C:\setup\4.5.5.1\setup.log\" /qb"
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2014
09:21 AM
Please make sure that the custom action that sets the SQL login credentials is sequenced in the InstallExecuteSequence table. Custom actions in the InstallUISequence table are not executed in silent installations.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2014
12:37 AM
Yes custom action is sequenced in the InstallExecuteSequence table. even I placed a vbscript custom action just before ISSQLServerInstall in InstallExecutionSequence that popup alerts to check that values stored into properties (see custom action script bellow), which is showing correct values stored into desired properties but I am facing same issue and getting error "Error 27502. Could not connect to Microsoft SQL Server ''. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. (17)"
MsgBox "IS_SQLSERVER_SERVER :" & Session.Property("IS_SQLSERVER_SERVER")
MsgBox "IS_SQLSERVER_AUTHENTICATION :" & Session.Property("IS_SQLSERVER_AUTHENTICATION")
MsgBox "IS_SQLSERVER_USERNAME :" & Session.Property("IS_SQLSERVER_USERNAME")
MsgBox "IS_SQLSERVER_PASSWORD :" &Session.Property("IS_SQLSERVER_PASSWORD")
MsgBox "IS_SQLSERVER_SERVER :" & Session.Property("IS_SQLSERVER_SERVER")
MsgBox "IS_SQLSERVER_AUTHENTICATION :" & Session.Property("IS_SQLSERVER_AUTHENTICATION")
MsgBox "IS_SQLSERVER_USERNAME :" & Session.Property("IS_SQLSERVER_USERNAME")
MsgBox "IS_SQLSERVER_PASSWORD :" &Session.Property("IS_SQLSERVER_PASSWORD")
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2014
09:26 AM
Your custom action must be sequenced before the ISSQLServerCosting action where extracts operations to a temporary file for SQL scripts.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 25, 2014
04:38 AM
Thanks this issue has been resolved