Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
gerold
Starting Member
4 Posts |
Posted - 2003-05-19 : 15:28:35
|
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 InstallSqlRedisExecuting "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 |
|
gerold
Starting Member
4 Posts |
Posted - 2003-05-21 : 16:01:29
|
got it!Have to use:Do RC = MsgWaitForMultipleObjects(1, ProcessInfo.hProcess, 0, INFINITE, (QS_POSTMESSAGE Or QS_SENDMESSAGE)) If RC = WAIT_FAILED Then Err.Raise 1 DoEventsLoop While RC <> WAIT_OBJECT_0...instead of WaitForSingleObject(...)But, now something else appears:"Setup failed to configure the server. Refer to the server error logs and setup error logs for more information."OK, I referred...server error log shows 2 Warnings:...2003-05-21 21:45:59.42 server Using dynamic lock allocation. [500] Lock Blocks, [1000] Lock Owner Blocks.2003-05-21 21:45:59.86 spid3 Warning ******************2003-05-21 21:45:59.86 spid3 SQL Server started in single user mode. Updates allowed to system catalogs. ...2003-05-21 21:46:03.37 spid3 SQL global counter collection task is created.2003-05-21 21:46:03.42 spid3 Warning: override, autoexec procedures skipped.2003-05-21 21:46:12.32 spid3 SQL Server is terminating due to 'stop' request from Service Control Manager....However, not very helpful ( to me ).setup error log shows:...Starting custom action ConfigServerExecuting "C:\Programme\Microsoft SQL Server\80\Tools\Binn\cnfgsvr.exe -V 1 -M 1 -U sa -I "MSSQLSERVER" -Q "Latin1_General_CI_AS""Setup failed to configure the server. Refer to the server error logs and setup error logs for more information.Action ended 21:48:08: InstallFinalize. Return value 3....AND?!? Do I have to patch setup.exe now to supply the proper arguments? Or is it another case of "Welcome to the world of Windows!"? :-)Edited by - gerold on 05/21/2003 16:02:59 |
|
|
gerold
Starting Member
4 Posts |
Posted - 2003-05-21 : 16:28:08
|
Got it, again! ( Hehe, not with me, guys! ;-)INSTANCENAME ist NOT an OPTIONAL parameter in the ini_file!Shame on doc writers and/or coders! |
|
|
gerold
Starting Member
4 Posts |
Posted - 2003-05-22 : 07:24:37
|
CORRECTION:INSTANCENAME is optional!But, if an error occurs during MSDE setup and the setup rollback is performed after confirming the error message,the instance sub-folders of C:\Program Files\Microsoft SQL Server\ ...MSSQL ... for a default instance MSSQL$[instance_name] ... for a named instance...are NOT removed! And if you then start the MSDE setup again with the same instance name ( or a default instance ) the 'failed to config server' error occurs.Deleting the instance folder yourself is the solution.Still shame on doc writers and/or coders! :-) |
|
|
yurcomputer
Starting Member
1 Post |
Posted - 2004-06-16 : 13:19:23
|
I got the same problem.I tried to use yur solution (delete the instance folder), but I got the same error during installation.Thanks.San |
|
|
|
|
|
|
|