Hello Phill, Thank You for Your answer. I know, that the components need a directory path and i added - in my case - the TARGETDIR to the component as You can see in the Product.wxs at the end. My problem is, that the new user - defined in the variable DB_USER - is never created. When i take a look at the existing logins with Microsoft SQL Server Management Studio, the new user is not there.
What can i do, that the user will be created and added to the administrator group? In my bootstrapper chain, i'm installing SQL Server Express with the following InstallCommand: InstallCommand='/QS /ACTION="Install" /IACCEPTSQLSERVERLICENSETERMS /ENU="False" /UpdateEnabled="True" /FEATURES="SQLENGINE,LOCALDB,FULLTEXT,BOL" /UpdateSource="MU" /HELP="False" /INSTANCENAME="SQLEXPRESS" /INSTANCEID="SQLEXPRESS" /SQMREPORTING="False" /ERRORREPORTING="False" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /AGTSVCSTARTUPTYPE="Automatic" /COMMFABRICPORT="0" /COMMFABRICNETWORKLEVEL="0" /COMMFABRICENCRYPTION="0" /MATRIXCMBRICKCOMMPORT="0" /FILESTREAMLEVEL="0" /ENABLERANU="True" /SQLCOLLATION="Latin1_General_CI_AS" /SQLSVCSTARTUPTYPE="Automatic" /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /SECURITYMODE="SQL" /ADDCURRENTUSERASSQLADMIN="True" /TCPENABLED="1" /NPENABLED="1" /BROWSERSVCSTARTUPTYPE="Automatic" /FTSVCACCOUNT="NT Service\MSSQLFDLauncher" /ROLE="AllFeatures_WithDefaults" /ASSVCSTARTUPTYPE="Automatic" /ISSVCStartupType="Automatic" /RSSVCStartupType="Automatic" /SAPWD="[DB_PW]"' As You can see, i set /SQLSYSADMINACCOUNTS to "BUILTIN\ADMINISTRATORS", so the new user, which belongs to the administrator group. And here the Product.wxs-file, including the creation of the new user: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> <?define Manufactor = "prosoft EDV-Lösungen GmbH & Co. KG"?> <?define UpgradeGuid = "{ddf9de01-4b8b-4874-8e1e-d5e6863a609f}"?> <Product Id="C9A60D32-34C7-466B-B91E-6B107C51D0FC" Name="Staffdirector" Language="1031" Version="$(var.BuildVersion)" Manufacturer="$(var.Manufactor)" UpgradeCode="$(var.UpgradeGuid)" Codepage="UTF-8"> <!--Version="$(var.BuildVersion)"--> <Package InstallerVersion="405" Compressed="yes" InstallScope="perMachine"/> <util:Group Id="Administrators" Name ="Administrators" /> <Component Id ="CreateUserAccount" Guid="{AEE91491-99FA-40A9-AB47-1E9FC2DDEF2A}" Directory="TARGETDIR"> <util:User Id ="SQLUser" CreateUser="yes" Name="[DB_USER]" Password="[DB_PW]" PasswordNeverExpires="yes" RemoveOnUninstall="no" UpdateIfExists="no"> <util:GroupRef Id ="Administrators"/> </util:User> </Component> <!--<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />--> <Media Id="1" Cabinet="MyWeb.cab" EmbedCab="yes" /> <Feature Id="ProductFeature" Title="Prosoft.Setup.Msi" Level="1" > <ComponentGroupRef Id="SourceComponentGroup" /> <ComponentRef Id="ApplicationShortcut" /> <ComponentRef Id ="CreateUserAccount"/> </Feature> <!-- Icon wird als Logo in Programme und Funktionen eingeblendet. --> <Property Id="ARPPRODUCTICON" Value="Icon.exe" /> <Icon Id="Icon.exe" SourceFile="..\..\..\Prosoft.Setup.Bootstrapper\Images\staffdirector_icon.ico" /> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" /> <!-- The directory tree --> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLLOCATION" Name="InstallLocation"> <Directory Id="CompanyFolder" Name="prosoft"> <Directory Id="INSTALLDIR" Name="staffdirector"> <Directory Id="IISFOLDER" Name="iisFolder"/> </Directory> </Directory> </Directory> </Directory> <Directory Id="DesktopFolder" Name="Desktop" /> <Directory Id="ProgramMenuFolder"> <Directory Id="ApplicationProgramsFolder" Name="staffdirector"> <Component Id="ApplicationShortcut" Guid="F8EE48A5-5264-4180-A35C-5CB7E8A0D58C"> [...] <RegistryValue Root="HKCU" Key="Software\prosoft\staffdirector" Name="installed" Type="integer" Value="1" KeyPath="yes" /> </Component> </Directory> </Directory> </Directory> <!-- Complete feature which will be installed. --> <Feature Id="Complete" Title="Prosoft Staffdirector" Level="1" Display="expand" ConfigurableDirectory="INSTALLLOCATION"> <!-- Main content of the Complete feature. --> <Feature Id="MainContent" Title="MyWeb Website" Description="The website content" Level="1"> <!-- Include IIS Configuration. --> <ComponentGroupRef Id="WebsiteIssConfiguration" /> <!-- Include web content. --> <ComponentGroupRef Id="SourceComponentGroup" /> </Feature> </Feature> </Product> </Wix> -----Ursprüngliche Nachricht----- Von: Phill Hogland [mailto:phogl...@rimage.com] Gesendet: Donnerstag, 11. Dezember 2014 15:00 An: wix-users@lists.sourceforge.net Betreff: Re: [WiX-users] How to install a new user? Every component needs a keypath and if it does not include a File or Registry element it must have a Component/@Directory which implies that you define a directory tree. There is an example directory structure here. http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html You might consider this blog <http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/> and use the registry entry for saving your property as the keypath (which still needs the driectory tree). -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-install-a-new-user-tp7598529p7598530.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users