[Wine] wineprefixcreate: msiexec.exe -- "Failed to open the service control manager"

Jeremy jcgarbage at comcast.net
Mon Mar 19 00:55:25 CDT 2007


When ~/.wine does not exist, or more specifically the system.reg does 
not yet exist, wineprefixcreate delivers the message "Failed to open the 
service control manager." I have tracked this down to the fact that 
HKLM\CurrentControlSet\Services does not yet exist when the msiexec.exe 
is registered and hence OpenSCManager fails.

What is the proper way to register this key. In DoRegServer I have 
prepended the following code

VVVVVVVV
     WCHAR const key[35] = {
         'S', 'y', 's', 't', 'e', 'm',
         '\\', 'C', 'u', 'r', 'r', 'e', 'n', 't', 'C', 'o', 'n', 't', 
'r', 'o', '
l', 'S', 'e', 't',
         '\\', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\\', 0
     };
     HKEY hkey;

     status = RegCreateKeyExW(HKEY_LOCAL_MACHINE, key,
                              0, NULL, 0, KEY_READ | KEY_WRITE,
                              NULL, &hkey, NULL);
     if (status == ERROR_SUCCESS) {
         RegCloseKey(hkey);
     }
^^^^^^^^

However, this seems kludgey and intuitively does not seem the proper way 
to do things. Putting it in the wine.inf won't work, because installing 
services (SPINST_REGSVR) comes before installing registry keys 
(SPINST_REGISTRY).

I have also commented out the msiexec.exe from the RegisterDllsSection, 
and added wine msiexec.exe /RegServer after the 
setupapi.dll,InstallHinfSection, and this works, but this also seems 
like a kludge.

What is the proper way to guarantee the key exists before encountering 
the msiexec.exe installation?

I'm using wine-0.9.31, non-packaged, on slackware 11.0.

Regards,
Jeremy


More information about the wine-users mailing list