[OpenAFS-win32-devel] Problems concerning the Windows MSI Package, AFSAdminGroup on non-english Windows versions

Michael Sievers msievers@upb.de
Tue, 25 Jan 2005 15:21:43 +0100


Hi,

My name ist Michael Sievers from University of Paderborn ( Germany ). My 
English isn't that perfect, so please excuse possible spelling mistakes.

OpenAFS ist our primary storage solution, where everything we use is stored. 
We wanted to deploy the OpenAFS MSI package over ActiveDirectory, but 
experienced several problems.

First, the MSI package tries to create a new group, called AFSAdminGroup. 
The first members of that group are the members of the Administrators group 
of the machine OpenAFS is installed to.

The Problem is, that thte package stops at this point with an error message. 
I logged the installation and cutted that message.

Product: OpenAFS for Windows -- Error 4007. Can't add members to AFS Client 
Admin group. NET_API_Error 2220

 I tracked it down to the source code of an custome action used by the MSI 
package. The file is named

src\WINNT\install\wix\custom\afscustom.cpp

There is a function inside of that file that causes the failure.

--- start of source code ---

UINT initializeAfsAdminGroup(void) {
    ...
    status = NetLocalGroupGetMembers(NULL, L"Administrators", 0, (LPBYTE *) 
&gmAdmins, MAX_PREFERRED_LENGTH, &dwNEntries, &dwTEntries, NULL);

   ...
    }

--- end of source code ---

I left parts out, but that line is the problem. The name of the 
Administrators group is hard coded to "Administrators". If you use a german 
version of Windows XP like we do, that group is called slightly different, 
not "Administrators" but "Administratoren".

I changed that source file, replaced the english name with the german one, 
compiled it and it runs.

Thats more a dirty hack than a good solution of that problem. I think that 
the MSI package in its current fashion can not install on any version of 
Windows where the Administrators group is not called "Administrators".

Michael Sievers

IMT University of Paderborn