http://bugs.winehq.org/show_bug.cgi?id=12079
--- Comment #6 from Anastasius Focht focht@gmx.net 2008-03-24 15:55:54 --- Hello,
there is a small typo in ControlService() which lets the service action fail.
--- snip dlls/msi/action.c --- static UINT ITERATE_StopService(MSIRECORD *rec, LPVOID param) { .. if (!ControlService(service, SERVICE_STOP, &status)) WARN("Failed to stop service (%s): %d\n", debugstr_w(name), GetLastError()); .. --- snip dlls/msi/action.c ---
SERVICE_STOP (access right type) vs. SERVICE_CONTROL_STOP (control type)
Additional "review" comments ... please don't take it as nitpicking, I acknowledge your work ;-)
SCM connect failure in ITERATE_StopService is WARN. I think SCM connect failures should be always treated as serious, while having a lasterror printout (lasterror printout is missing in ITERATE_StartService SCM connect failure case).
The ITERATE_StopService:OpenServiceW() WARN following the SCM connect is fine because in case of "stop services" actions, non-existing services are expected and service open failures shouldn't be treated as "there is a big problem" (in contrast to ITERATE_StartService where a failing OpenServiceW should be treated serious because it might indicate a previous service install problem).
For stopping services I think it's sufficient to open SCM with SC_MANAGER_CONNECT (currently opened with SC_MANAGER_ALL_ACCESS).
BTW ... I'm eagerly watching your progress on fusion. It seems the importance of fusion and msi publishing assemblies is now generally acknowledged. And ... congratulations on becoming a millionaire. ;-)
"For the record, if I were a millionaire, this is what I would work on" (quote from wine-devel).
Regards