http://bugs.winehq.org/show_bug.cgi?id=15748
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #4 from Anastasius Focht focht@gmx.net 2008-11-24 17:10:58 --- Hello,
it's actually services component that needs to be fixed. Only happens when no WINEPREFIX exist.
When Msiexec registers itself for the first time it creates MsiServer service entry. At the time it does this, services has already created/loaded the SCM database.
When the installer queries for the MsiServer service state, it will encounter all service entry status fields reset to zero. This is because svcctl_CreateServiceW() doesn't explicitly initialize status fields to meaningful values - in contrast to scmdatabase_load_services() which does this.
The installer looks for "SERVICE_STOPPED" but encounters zero and subsequently tries to stop the service. This obviously fails because status.dwControlsAccepted is also zero - like all other status fields.
You need to initialize at least some status fields in svcctl_CreateServiceW() to meaningful values, like
--- snip --- .. entry->status.dwServiceType = dwServiceType; entry->status.dwCurrentState = SERVICE_STOPPED; entry->status.dwWin32ExitCode = ERROR_SERVICE_NEVER_STARTED; .. --- snip ---
so any service state query which might immediately follow service creation will return correct state.
Regards