
thomas.gyllencreutz1.5524934192904094E12 asked a question.
SQLRTGetServers2() returns empty list
Hi, Im writing a Custom Action[CA] that executes method SQLServerSelectLogin2(). I have done everything according to the manual and KB. SQLRT.obl and SQLCONV.obl is set in Build/Settings. I load the dlls (ISSQLSRV.DLL, SQLRT.DLL) from Binary table and executes SQLRTInitialize2() before SQLServerSelectLogin2(). Everything compiles with no errors and when debugging the dialog fires up but when I press the Browse database server button the list is empty. When I add the SQLLogin dialog the same dialog is presented and when I press the button this time the Database server list is populated with our networks DB servers. I did a processmon last night to see what happens in these 2 scenarios and the result is this: ******* Processmon on MsiExec.exe with my own CA *********** 16:43:30,4955332MsiExec.exe7852QueryOpenC:\Windows\System32\odbc32.dllFAST IO DISALLOWED 16:43:30,4957302MsiExec.exe7852CreateFileC:\Windows\System32\odbc32.dllSUCCESSDesired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 16:43:30,4959417MsiExec.exe7852QueryBasicInformationFileC:\Windows\System32\odbc32.dllSUCCESSCreationTime: 2009-07-14 01:12:09, LastAccessTime: 2009-07-14 01:12:09, LastWriteTime: 2009-07-14 02:16:11, ChangeTime: 2009-09-10 09:30:54, FileAttributes: A 16:43:30,4959672MsiExec.exe7852CloseFileC:\Windows\System32\odbc32.dllSUCCESS 16:43:30,4962051MsiExec.exe7852CreateFileC:\Windows\System32\odbc32.dllSUCCESSDesired Access: Read Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened 16:43:30,4963968MsiExec.exe7852CreateFileMappingC:\Windows\System32\odbc32.dllFILE LOCKED WITH ONLY READERSSyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE 16:43:30,4964790MsiExec.exe7852CreateFileMappingC:\Windows\System32\odbc32.dllSUCCESSSyncType: SyncTypeOther 16:43:30,4973835MsiExec.exe7852Load ImageC:\Windows\System32\odbc32.dllSUCCESSImage Base: 0x66560000, Image Size: 0x8a000 16:43:30,4974393MsiExec.exe7852CloseFileC:\Windows\System32\odbc32.dllSUCCESS 16:43:30,4978738MsiExec.exe7852RegOpenKeyHKLM\SOFTWARE\Microsoft\BidInterface\LoaderNAME NOT FOUNDDesired Access: Read 16:43:30,4995231MsiExec.exe7852QueryOpenC:\Windows\System32\odbcint.dllFAST IO DISALLOWED 16:43:30,4996941MsiExec.exe7852CreateFileC:\Windows\System32\odbcint.dllSUCCESSDesired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 16:43:30,4998814MsiExec.exe7852QueryBasicInformationFileC:\Windows\System32\odbcint.dllSUCCESSCreationTime: 2009-07-14 01:11:56, LastAccessTime: 2009-07-14 01:11:56, LastWriteTime: 2009-07-14 02:09:14, ChangeTime: 2009-09-10 09:30:54, FileAttributes: A 16:43:30,4998938MsiExec.exe7852CloseFileC:\Windows\System32\odbcint.dllSUCCESS 16:43:30,5001132MsiExec.exe7852CreateFileC:\Windows\System32\odbcint.dllSUCCESSDesired Access: Read Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened 16:43:30,5003488MsiExec.exe7852CreateFileMappingC:\Windows\System32\odbcint.dllFILE LOCKED WITH ONLY READERSSyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE 16:43:30,5003963MsiExec.exe7852CreateFileMappingC:\Windows\System32\odbcint.dllSUCCESSSyncType: SyncTypeOther 16:43:30,5012674MsiExec.exe7852Load ImageC:\Windows\System32\odbcint.dllSUCCESSImage Base: 0x669a0000, Image Size: 0x38000 16:43:30,5013571MsiExec.exe7852CloseFileC:\Windows\System32\odbcint.dllSUCCESS 16:43:30,5026036MsiExec.exe7852RegOpenKeyHKCU\SOFTWARE\ODBC\ODBC.INI\ODBCNAME NOT FOUNDDesired Access: Read 16:43:30,5026502MsiExec.exe7852RegOpenKeyHKLM\SOFTWARE\ODBC\ODBC.INI\ODBCNAME NOT FOUNDDesired Access: Read 16:43:30,5026766MsiExec.exe7852RegOpenKeyHKCU\SOFTWARE\ODBC\ODBC.INI\ODBCNAME NOT FOUNDDesired Access: Read 16:43:30,5026885MsiExec.exe7852RegOpenKeyHKLM\SOFTWARE\ODBC\ODBC.INI\ODBCNAME NOT FOUNDDesired Access: Read 16:43:32,7212433msiexec.exe1072Thread CreateSUCCESSThread ID: 2316 ******************* Full process list ********************* ******* Processmon on MsiExec.exe with SQLLogin *********** 16:44:46,9362877MsiExec.exe7852QueryOpenC:\Windows\System32\odbc32.dllFAST IO DISALLOWED 16:44:46,9362952MsiExec.exe7852CreateFileC:\Windows\System32\odbc32.dllSUCCESSDesired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 16:44:46,9362974MsiExec.exe7852QueryBasicInformationFileC:\Windows\System32\odbc32.dllSUCCESSCreationTime: 2009-07-14 01:12:09, LastAccessTime: 2009-07-14 01:12:09, LastWriteTime: 2009-07-14 02:16:11, ChangeTime: 2009-09-10 09:30:54, FileAttributes: A 16:44:46,9362992MsiExec.exe7852CloseFileC:\Windows\System32\odbc32.dllSUCCESS 16:44:46,9370075MsiExec.exe7852CreateFileC:\Windows\System32\odbc32.dllSUCCESSDesired Access: Read Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened 16:44:46,9370673MsiExec.exe7852CreateFileMappingC:\Windows\System32\odbc32.dllFILE LOCKED WITH ONLY READERSSyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE 16:44:46,9377146MsiExec.exe7852CreateFileMappingC:\Windows\System32\odbc32.dllSUCCESSSyncType: SyncTypeOther 16:44:46,9395270MsiExec.exe7852Load ImageC:\Windows\System32\odbc32.dllSUCCESSImage Base: 0x66560000, Image Size: 0x8a000 16:44:46,9400335MsiExec.exe7852CloseFileC:\Windows\System32\odbc32.dllSUCCESS 16:44:46,9404970MsiExec.exe7852RegOpenKeyHKLM\SOFTWARE\Microsoft\BidInterface\LoaderNAME NOT FOUNDDesired Access: Read 16:44:46,9430147MsiExec.exe7852QueryOpenC:\Windows\System32\odbcint.dllFAST IO DISALLOWED 16:44:46,9430323MsiExec.exe7852CreateFileC:\Windows\System32\odbcint.dllSUCCESSDesired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened 16:44:46,9430565MsiExec.exe7852QueryBasicInformationFileC:\Windows\System32\odbcint.dllSUCCESSCreationTime: 2009-07-14 01:11:56, LastAccessTime: 2009-07-14 01:11:56, LastWriteTime: 2009-07-14 02:09:14, ChangeTime: 2009-09-10 09:30:54, FileAttributes: A 16:44:46,9430754MsiExec.exe7852CloseFileC:\Windows\System32\odbcint.dllSUCCESS 16:44:46,9436413MsiExec.exe7852CreateFileC:\Windows\System32\odbcint.dllSUCCESSDesired Access: Read Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened 16:44:46,9438370MsiExec.exe7852CreateFileMappingC:\Windows\System32\odbcint.dllFILE LOCKED WITH ONLY READERSSyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE 16:44:46,9438950MsiExec.exe7852CreateFileMappingC:\Windows\System32\odbcint.dllSUCCESSSyncType: SyncTypeOther 16:44:46,9449468MsiExec.exe7852Load ImageC:\Windows\System32\odbcint.dllSUCCESSImage Base: 0x669a0000, Image Size: 0x38000 16:44:46,9450127MsiExec.exe7852CloseFileC:\Windows\System32\odbcint.dllSUCCESS 16:44:46,9460517MsiExec.exe7852RegOpenKeyHKCU\SOFTWARE\ODBC\ODBC.INI\ODBCNAME NOT FOUNDDesired Access: Read 16:44:46,9460935MsiExec.exe7852RegOpenKeyHKLM\SOFTWARE\ODBC\ODBC.INI\ODBCNAME NOT FOUNDDesired Access: Read 16:44:46,9461177MsiExec.exe7852RegOpenKeyHKCU\SOFTWARE\ODBC\ODBC.INI\ODBCNAME NOT FOUNDDesired Access: Read 16:44:46,9461296MsiExec.exe7852RegOpenKeyHKLM\SOFTWARE\ODBC\ODBC.INI\ODBCNAME NOT FOUNDDesired Access: Read 16:44:46,9522450MsiExec.exe7852RegOpenKeyHKLM\SOFTWARE\Microsoft\Microsoft SQL ServerSUCCESSDesired Access: Read 16:44:46,9522841MsiExec.exe7852RegQueryValueHKLM\SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstancesSUCCESSType: REG_MULTI_SZ, Length: 24, Data: SQLEXPRESS 16:44:46,9523092MsiExec.exe7852RegQueryValueHKLM\SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstancesSUCCESSType: REG_MULTI_SZ, Length: 24, Data: SQLEXPRESS 16:44:46,9523650MsiExec.exe7852RegCloseKeyHKLM\SOFTWARE\Microsoft\Microsoft SQL ServerSUCCESS 16:44:46,9534766MsiExec.exe7852RegOpenKeyHKLM\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectToNAME NOT FOUNDDesired Access: Read 16:44:46,9538512MsiExec.exe7852CreateFileC:\Windows\System32\sv-SE\KernelBase.dll.muiSUCCESSDesired Access: Generic Read, Disposition: Open, Options: , Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened 16:44:46,9538565MsiExec.exe7852CreateFileMappingC:\Windows\System32\sv-SE\KernelBase.dll.muiFILE LOCKED WITH ONLY READERSSyncType: SyncTypeCreateSection, PageProtection: PAGE_WRITECOPY 16:44:46,9538600MsiExec.exe7852QueryStandardInformationFileC:\Windows\System32\sv-SE\KernelBase.dll.muiSUCCESSAllocationSize: 811*008, EndOfFile: 808*448, NumberOfLinks: 2, DeletePending: False, Directory: Fals
Hope that helps.
I had one problem with that though and its the possibility to move the dialog where I want it to appear or rather When to appear. I don't want my users to be obligated to fill in the SQL information instead I want it to be shown when the user choose custom setup. I tried to change the order of SQLLogin to appear after custom setup but I get a message that some SQL information is missing before the dialog appears.
I rearranged the order in ControlEvent Table to show SQLLogin after 'Next' click on CustomSetup and the order looks fine in MSI debugger Window but something is wrong I guess.
Is there some other way to rearrange the dialog order other than ControlEvent Table? I cant do it from Custom Actions and Sequences window. Its only possible to move top lvl dialogs and actions up and down but sub dialogs aren't. Why is that?
//G
And maybe I'm doing something wrong :rolleyes:.
Anyway.
Thanks for the help and pointers Hidenori! :)