[wix-users] Windows User is removed after Major Upgrade

Simon Ruetzler sruetzler at arigo-software.de
Tue Jul 26 01:43:44 PDT 2016


Hello,
I created an Installer which creates an user. (This is based on the 
FireGigant Tutorial 
https://www.firegiant.com/system/files/samples/SampleFirst.zip)

If I install my program the user is created.
If I uprade (Major upgrade) to a newer version the user is deleted 
during RollbackCleanup.

Why is the user deleted after the upgrade?
Is this a bug or is there something wrong with my installer configuration?

-------------------------------------------------------------------------
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
 >
   <Product Name='Foobar 1.0' Id='*' 
UpgradeCode='0ADCA63F-3A9E-481F-BEB2-04E16E559B8D'
     Language='1033' Codepage='1252' Version='1.0.5' Manufacturer='Acme 
Ltd.'>

     <Package Id='*' Keywords='Installer' Description="Acme's Foobar 1.0 
Installer"
       Comments='Foobar is a registered trademark of Acme Ltd.' 
Manufacturer='Acme Ltd.'
       InstallerVersion='405' Languages='1033' Compressed='yes' 
SummaryCodepage='1252' />

     <Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' 
DiskPrompt="CD-ROM #1" />
     <Property Id='DiskPrompt' Value="Acme's Foobar 1.0 Installation 
[1]" />

     <MajorUpgrade Schedule="afterInstallInitialize" 
AllowSameVersionUpgrades="yes" DowngradeErrorMessage="already a newer 
version is installed" />

     <Directory Id='TARGETDIR' Name='SourceDir'>
       <Directory Id='ProgramFilesFolder' Name='PFiles'>
         <Directory Id='Acme' Name='Acme'>
           <Directory Id='INSTALLDIR' Name='Foobar 1.0'>

             <Component Id='MainExecutable' 
Guid='00D9B359-EA9F-4F75-AF18-9D0AD0AA1B6A'>
               <File Id='FoobarEXE' Name='FoobarAppl10.exe' DiskId='1' 
Source='FoobarAppl10.exe' KeyPath='yes'>
                 <Shortcut Id="startmenuFoobar10" 
Directory="ProgramMenuDir" Name="Foobar 1.0" 
WorkingDirectory='INSTALLDIR' Icon="Foobar10.exe" IconIndex="0" 
Advertise="yes" />
                 <Shortcut Id="desktopFoobar10" 
Directory="DesktopFolder" Name="Foobar 1.0" 
WorkingDirectory='INSTALLDIR' Icon="Foobar10.exe" IconIndex="0" 
Advertise="yes" />
               </File>
                 <util:User Id="USER_RUMO"
                          Name="foo"
                          CreateUser="yes"
                          CanNotChangePassword="yes"
                          FailIfExists="no"
                          LogonAsService="yes"
                          LogonAsBatchJob="yes"
                          Password="bar"
                          PasswordExpired="no"
                          PasswordNeverExpires="yes"
                          UpdateIfExists="yes">
                 </util:User>
             </Component>

             <Component Id='HelperLibrary' 
Guid='709D1443-1CC3-495B-8127-68106BA42735'>
               <File Id='HelperDLL' Name='Helper.dll' DiskId='1' 
Source='Helper.dll' KeyPath='yes' />
             </Component>

             <Component Id='Manual' 
Guid='43DA899D-E0D6-48A4-939E-CDC0D5ADDA84'>
               <File Id='Manual' Name='Manual.pdf' DiskId='1' 
Source='Manual.pdf' KeyPath='yes'>
                 <Shortcut Id="startmenuManual" 
Directory="ProgramMenuDir" Name="Instruction Manual" Advertise="yes" />
               </File>
             </Component>

           </Directory>
         </Directory>
       </Directory>

       <Directory Id="ProgramMenuFolder" Name="Programs">
         <Directory Id="ProgramMenuDir" Name="Foobar 1.0">
           <Component Id="ProgramMenuDir" 
Guid="4A7EA5B2-34F6-46F8-88A5-FFA8220C43B0">
             <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
             <RegistryValue Root='HKCU' 
Key='Software\[Manufacturer]\[ProductName]' Type='string' Value='' 
KeyPath='yes' />
           </Component>
         </Directory>
       </Directory>

       <Directory Id="DesktopFolder" Name="Desktop" />
     </Directory>

     <Feature Id='Complete' Level='1'>
       <ComponentRef Id='MainExecutable' />
       <ComponentRef Id='HelperLibrary' />
       <ComponentRef Id='Manual' />
       <ComponentRef Id='ProgramMenuDir' />
     </Feature>

     <Icon Id="Foobar10.exe" SourceFile="FoobarAppl10.exe" />

   </Product>
</Wix>

-------------------------------------------------------------------------

Regards Simon


More information about the wix-users mailing list