OK, I've been looking over the WiX source code. Specifically, the file
Wix\src\ca\serverca\scaexec\scaexec.cpp.
I found the function called CreateUserTo(). This function creates the
user then attempts to add the user to any specified groups. It calls
the function AddUserToGroup().
This function includes logic to try active directory if the global
attempt fails. In the code is a call to CreateADsPath(). This function
concatenates (among other things) the group and the group's domain as
such: group_domain/group.
hr = StrAllocFormatted(&pwzAdsPath, L"%s/%s", wzObjectDomain,
wzObjectName);
Notice the forward slash. I believe that AD requires the slash be a
back slash. I haven't recompiled and retried this but I think this may
be the problem (at least, the problem that I am experiencing). The
error that I get is shown below. Notice the forward slash.
Action 10:31:07: CreateUser.
MSI (s) (6C:9C) [10:31:07:357]: Executing op:
CustomActionSchedule(Action=CreateUser,ActionType=11265,Source=BinaryDat
a,Target=**********,CustomActionData=**********)
MSI (s) (6C:18) [10:31:07:373]: Invoking remote custom action. DLL:
C:\WINDOWS\Installer\MSIF9.tmp, Entrypoint: CreateUser
CreateUser: Error 0x80004005: Failed to get group
'ADVECTIS/Development'.
CreateUser: Error 0x80004005: failed to add user: sqlserver to group
Development
Error 26403. Failed to add user to group. (-2147467259 sqlserver
Development )
MSI (s) (6C!D8) [10:31:15:592]: Product: BlitzDocs Databases -- Error
26403. Failed to add user to group. (-2147467259 sqlserver
Development )
__________________________________
Doug Watts
________________________________
From: Michael Osmond [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 28, 2006 11:43 PM
To: Rob Mensching; Douglas Watts; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] Creating Active Directory Users
Hi,
There are probably all the problems that Rob talked about, but you may
find it works on a domain controller.
However the group Everyone is not an AD group it is a special local
group for member servers and workstations (part of the old NT4 SAM
stuff).
Michael
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rob
Mensching
Sent: Friday, 29 December 2006 3:03 AM
To: Douglas Watts; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Creating Active Directory Users
I'm not an expert with the User CustomAction, but I think it was
discussed here recently that you can't create Domain Accounts with the
it. There is a lot of thigns to consider when creating a domain
account, like what happens when you remove the package from a client
machine... does the domain account get deleted... and other things. I
don't think all the scenarios were understood well enough to enable the
creation of domain accounts... I think that's why Groups can't be
created as well.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Douglas
Watts
Sent: Thursday, December 28, 2006 08:34
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Creating Active Directory Users
I am trying to create a domain user under Active Directory. Here is the
snippet from my Wix source:
<DirectoryRef Id="INSTALLDIR">
<Component Id="CreateUserComponent" DiskId="1"
Guid="MY_GUID_-GOES-HERE-0000-000000000000">
<User Id='SqlUserID' Name='[MYUSERID]'
Password='[MYUSERPASSWORD]' CreateUser='yes' Domain='[USERDOMAIN]'>
<GroupRef Id='MyUsersGroup' />
</User>
</Component>
</DirectoryRef>
<Group Id="SqlServicesUsersGroup" Name="[MYUSERGROUP]"/>
The properties are properly gathered from a dialog. I specify
"sqlserver" for MYUSERID. I specify the "Everyone" group for
MYUSERGROUP. The domain is correct. I run the MSI while logged in as a
domain administrator. I get the following error message which tells me
that the installer is attempting to locate the group on my local machine
rather than on the domain. How do I qualify the group so that Windows
Installer looks for it on the domain?
Action 11:02:33: CreateUser.
MSI (s) (84:C8) [11:02:33:369]: Executing op:
CustomActionSchedule(Action=CreateUser,ActionType=11265,Source=BinaryDat
a,Target=**********,CustomActionData=**********)
MSI (s) (84:0C) [11:02:33:384]: Invoking remote custom action. DLL:
C:\WINDOWS\Installer\MSI26.tmp, Entrypoint: CreateUser
CreateUser: Error 0x800708ac: Failed to get group
'WinNT://Localhost/Everyone'.
CreateUser: Error 0x800708ac: failed to add user: sqlserver to group
Everyone
Error 26403. Failed to add user to group. (-2147022676 sqlserver
Everyone )
MSI (s) (84!14) [11:02:42:730]: Product: My Product -- Error 26403.
Failed to add user to group. (-2147022676 sqlserver Everyone )
__________
Doug Watts
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users