Hi folks,
I need to install the MSDE during a setup of one of our apps.
The online help of SQL server 2000 suggests to use CreateProcess() and WaitForSingleObject() for this and supplies a sample code, too. No prob. This is an easy task. I do this all the time when I have to run something synchronously.
So I do the following in the VB6 setup routine:
...
RC = CreateProcess(vbNullString, "D:\MSDE\setup.exe /settings IC-SBE-MSDE.INI /l D:\MSDE\IC-SBE-MSDE.log /qb /wait", 0, 0, True, NORMAL_PRIORITY_CLASS, 0, Directory, StartupInfo, ProcessInfo)
[or in another attempt]
RC = CreateProcess(vbNullString, "D:\MSDE\setup.exe /settings IC-SBE-MSDE.INI /l D:\MSDE\IC-SBE-MSDE.log /qb /wait", 0, 0, 0, 0, 0, vbNullString, StartupInfo, ProcessInfo)
...
RC = WaitForSingleObject(ProcessInfo.hProcess, INFINITE)
...
The MSDE-Setup starts, the progress bar goes to "Time remaining: [varying from 20 to 15] seconds" ... and stucks there :-(
The processes setup.exe, setupre.exe and sqlredis.exe can be seen in the Task Manager with no CPU activity.
The last line in D:\MSDE\IC-SBE-MSDE.log shows:
...
Executing "C:\Programme\Microsoft SQL Server\80\Tools\Binn\sqlredis.exe /q:a"
Pressing 'Cancel' in the Setup dialog lowers the button but nothing else happens. If I 'shoot down' sqlredis.exe in TaskMgr the setup comes up with "Installation of the MDAC package failed" and ends with return code 1603.
The corresponing lines in D:\MSDE\IC-SBE-MSDE.log are:
...
Starting custom action InstallSqlRedis
Executing "C:\Programme\Microsoft SQL Server\80\Tools\Binn\sqlredis.exe /q:a"
Installation of the Microsoft Data Access Components package failed.
Action ended 21:08:25: InstallFinalize. Return value 3.
...
---------------------------------------------------------
And to bring a little fun into it: It works with the VB6 Shell command. But this runs the setup asynchronously...
I tried this with SQL2KDeskSP3.exe on Win2K Prof/SP3.
As far as I'm concerned I do everything that is suggested in the docs / sample codes.
Does anybody have any ideas?
Thank you in advance for any assistance.
Geri
I need to install the MSDE during a setup of one of our apps.
The online help of SQL server 2000 suggests to use CreateProcess() and WaitForSingleObject() for this and supplies a sample code, too. No prob. This is an easy task. I do this all the time when I have to run something synchronously.
So I do the following in the VB6 setup routine:
...
RC = CreateProcess(vbNullString, "D:\MSDE\setup.exe /settings IC-SBE-MSDE.INI /l D:\MSDE\IC-SBE-MSDE.log /qb /wait", 0, 0, True, NORMAL_PRIORITY_CLASS, 0, Directory, StartupInfo, ProcessInfo)
[or in another attempt]
RC = CreateProcess(vbNullString, "D:\MSDE\setup.exe /settings IC-SBE-MSDE.INI /l D:\MSDE\IC-SBE-MSDE.log /qb /wait", 0, 0, 0, 0, 0, vbNullString, StartupInfo, ProcessInfo)
...
RC = WaitForSingleObject(ProcessInfo.hProcess, INFINITE)
...
The MSDE-Setup starts, the progress bar goes to "Time remaining: [varying from 20 to 15] seconds" ... and stucks there :-(
The processes setup.exe, setupre.exe and sqlredis.exe can be seen in the Task Manager with no CPU activity.
The last line in D:\MSDE\IC-SBE-MSDE.log shows:
...
Executing "C:\Programme\Microsoft SQL Server\80\Tools\Binn\sqlredis.exe /q:a"
Pressing 'Cancel' in the Setup dialog lowers the button but nothing else happens. If I 'shoot down' sqlredis.exe in TaskMgr the setup comes up with "Installation of the MDAC package failed" and ends with return code 1603.
The corresponing lines in D:\MSDE\IC-SBE-MSDE.log are:
...
Starting custom action InstallSqlRedis
Executing "C:\Programme\Microsoft SQL Server\80\Tools\Binn\sqlredis.exe /q:a"
Installation of the Microsoft Data Access Components package failed.
Action ended 21:08:25: InstallFinalize. Return value 3.
...
---------------------------------------------------------
And to bring a little fun into it: It works with the VB6 Shell command. But this runs the setup asynchronously...
I tried this with SQL2KDeskSP3.exe on Win2K Prof/SP3.
As far as I'm concerned I do everything that is suggested in the docs / sample codes.
Does anybody have any ideas?
Thank you in advance for any assistance.
Geri