Here is my code to add an account to IIS_WPG on IIS6 and IIS_IUSRS on IIS7.
<Property Id="IISVERSION"> <RegistrySearch Id="IISVersionInstalled" Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\W3SVC\Parameters" Name="MajorVersion" Type="raw"/> </Property> <!-- default name of the IIS WPG--> <Property Id="IISGROUP" Secure="yes" Value="IIS_WPG"/> <!-- If we are on w2008 then set the iisgroup to be IIS_USRS --> <CustomAction Id="setIisGroupToIUSRS" Property="IISGROUP" Value="IIS_IUSRS" /> <InstallExecuteSequence> <Custom Action="setIisGroupToIUSRS" After="AppSearch">IISVERSION="#7"</Custom> </InstallExecuteSequence> <!-- create a ref to the IIS WPG - which is OS specific!!--> <util:Group Id="iis.wpg.group" Name="[IISGROUP]" Domain="[ComputerName]"/> <!-- adds the website user to the IIS_WPG group --> <Component Id="platform.iis.user" Guid="*"> <RegistryValue Action="write" Root="HKLM" Key="$(var.RegistryPath)" Name="AddToIISWPG" Value="1" Type="string" KeyPath="yes" /> <util:User Id="platform.website.user" CreateUser="no" Domain="[WSDOMAIN]" Name="[WSUSER]" Password="[WSPASSWORD]" UpdateIfExists="yes"> <util:GroupRef Id="iis.wpg.group"/> </util:User> </Component> Dave -----Original Message----- From: marric01 [mailto:richard.mar...@ssss.gouv.qc.ca] Sent: 14 January 2011 15:28 To: wix-users@lists.sourceforge.net Subject: [WiX-users] WIX 3.5 - Adding active directory user to a local group Hello, I wanted to know if its possible to add an Active Directory user to a local group (IIS_WPG). I know this can be done with custom action writen in C# but I wanted to know if this was possible inside the WIX. If its possible, anyone have some code example ? Thanks Richard -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/WIX-3-5-Ad ding-active-directory-user-to-a-local-group-tp5922131p5922131.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------ ------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users