I have a real big problem.
I have made a bootstrapper-project with WiX 3.8, which installs the setup
files on a physical drive and makes a webdeployment.
My setup-files include a MDF-file with a database.
As a prerequsite SQL Server Express is installed with the following
InstallCommand, which generates a SQL Server Instance called "SQLExpress":

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="<sa_password>"'

Then in the MSI-project i want to create a SQL login, either to have access
to the database in my MDF-file and to connect to the database on the website
(which was installed by the web deployment).
So i tried to realize this with the util:User-element.
When i try to create the user and add him to the administrators group, this
doesn't work because of insufficient rights allthough my user is an
administrator.
Then i commented the groupref for the administrators out and the log-file of
my setup says, that the user was created.
But when i take a look at the existing logins in SQL Server Management, i
cannot find my new login.

Have i made something wrong?
Or is there another way, to create a SQL login?

Thanks in advance!

And here is the Product.wxs from my MSI-project:

<?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";
     xmlns:sql="http://schemas.microsoft.com/wix/SqlExtension";>

    [...]
    
    <Product Id="C9A60D32-34C7-466B-B91E-6B107C51D0FC"
             Name="MyProduct"
             [...]
             >

    [...]

        
        <Property Id="DBUSER_PROP"
                  Hidden="yes"/>
        <Property Id="DBPW_PROP"
                  Hidden="yes"/>
        <Property Id="DBNAME_PROP"
                  Hidden="yes"/>
        <Property Id="DBDATABASE_PROP"
                  Hidden="yes"/>

        
        <util:Group Id="Administrators"
                    Name ="Administrators"
                    Domain="[ComputerName]" />
        <Component Id ="CreateUserAccount"
                   Guid="AEE91491-99FA-40A9-AB47-1E9FC2DDEF2A"
                   Directory="TARGETDIR">
            <util:User Id ="SQLUser"
                       Name="[DBUSER_PROP]"
                       Password="[DBPW_PROP]"
                       UpdateIfExists="no"
                       CreateUser="yes"
                       PasswordNeverExpires="yes"
                       PasswordExpired="no"
                       RemoveOnUninstall="no"
                       Domain="[ComputerName]">
                
            </util:User>
        </Component>

    [...]
        
        <Feature Id="ProductFeature"
                 Title="Setup.Msi"
                 Level="1" >
            
            <ComponentGroupRef Id="SourceComponentGroup" />
            
            <ComponentRef Id ="CreateUserAccount"/>
        </Feature>

    [...]

        <Property Id="WIXUI_INSTALLDIR"
                  Value="INSTALLLOCATION" />

        <Directory Id="TARGETDIR"
                   Name="SourceDir">
            <Directory Id="ProgramFilesFolder">
                <Directory Id="INSTALLLOCATION"
                           Name="InstallLocation">
                    <Directory Id="CompanyFolder"
                               Name="MyCompany">
                        <Directory Id="INSTALLDIR"
                                   Name="MyInstallDirectory">
                            <Directory Id="IISFOLDER"
                                       Name="iisFolder"/>
                        </Directory>
                    </Directory>
                </Directory>
            </Directory>
        </Directory>

    [...]

    </Product>
</Wix>




--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-create-a-SQL-login-tp7598580.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

Reply via email to