0

I created a windows installer .msi file using wix tool but I'm having some errors

Errors

1. The Component/@Guid attribute's value, '47845d50-01e6-40ff-8b53-14f664bfb13a', is a mixed-case guid. All letters in a guid value should be uppercase. FileWatcherSetup in C:\Main\Src\Installer\FileWatcherSetup\Components.wxs 11

2. The component 'FileWatcher.Files' does not have an explicit key path specified. If the ordering of the elements under the Component element changes, the key path will also change. To prevent accidental changes, the key path should be set to 'yes' in one of the following locations: Component/@KeyPath, File/@KeyPath, ODBCDataSource/@KeyPath, or Registry/@KeyPath. FileWatcherSetup C:\Main\Src\Installer\FileWatcherSetup\Components.wxs 47

3. The Product/@UpgradeCode attribute's value, '11e6c23f-7a30-4651-b27a-b569765c3780', is a mixed-case guid. All letters in a guid value should be uppercase. FileWatcherSetup C:\Main\Src\Installer\FileWatcherSetup\Product.wxs 9

Anybody have any idea how to solve this. Any info or article will be helpful . Help please

UPDATE

components.wxs

   <?xml version="1.0" encoding="UTF-8"?>
   <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

   <?include Defines.wxi?>

   <Fragment>

   <ComponentGroup Id="MenuComponents" Directory="ProductMenuFolder">
   <Component Id="ProductMenuComponents" Guid="47845D50-01E6-40FF-8B53-14F664BFB13A">

    <!--<Shortcut Id="UninstallPackage" Directory="ProductMenuFolder" Name="Uninstall package"
              Target="[System64Folder]msiexec.exe" Arguments="/x {[ProductCode]}" Description="Uninstalls $(var.YourApplicationReference.TargetName)"/>-->
    <RemoveFolder Id='ProductMenuFolder' On='uninstall' />
    <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]' 
    Type='string' Value='' KeyPath='yes' />

  </Component>
</ComponentGroup>

<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
  <Component Id="FileWatcher">
    <File Source="$(var.FileWatcher.TargetPath)" />

    <!--Register this file as a Windows service-->
     <ServiceInstall Id="ServiceInstaller"
                    Type="ownProcess"
                    Description="Sends Incoming mainframe files to the MAID Webservice"
                    DisplayName="FileWatcher"
                    Vital="yes"
                    Start="auto"
                    ErrorControl="ignore"
                    Interactive="no"
                    Name="FileWatcher"
                    Account="[ACCOUNT]"
                    Password="[PASSWORD]">

         <!--<ServiceInstall Id="ServiceInstaller"
                    Type="ownProcess"
                    Description="Sends Incoming mainframe files to the MAID Webservice"
                    DisplayName="FileWatcher"
                    Vital="yes"
                    Start="auto"
                    ErrorControl="ignore"
                    Interactive="no"
                    Name="FileWatcher" >-->


      <ServiceConfig Id="svcConfig" DelayedAutoStart="yes" OnInstall="yes" OnReinstall="yes" OnUninstall="no" />
    </ServiceInstall>

    <!--Set the user to be used by the service-->
    <util:User Id="ServiceUser" Name="[ACCOUNT]" Password="[PASSWORD]" CreateUser="no" LogonAsService="yes" UpdateIfExists="yes" />

    <!--Added example of how to stop service automatically-->
    <ServiceControl Id="ServiceControl" Stop="both" Remove="uninstall" Name="FileWatcher" Wait="yes" />
  </Component>
    <Component Id="FileWatcher.Files" Guid="{946A48FD-42F1-404F-A610-5A3DB388BD16}">
    <!--<Component Id="MAIDFileWatcher.Files" Guid="{11E6C23F-7A30-4651-B27A-B569765C3780}">-->
      <File Id="filB93E7D71690869B9CD2D0A479DB69C6C" Source="$(var.FileWatcher.TargetDir)\ExceptionHandling.dll"  />
    <File Id="fil487232F7A833919419AF9537A4390083" Source="$(var.FileWatcher.TargetDir)\ExceptionHandling.xml" />
    <File Id="filDE3649B71309470D2D7C086E0FAABAE8" Source="$(var.FileWatcher.TargetDir)\itextsharp.dll"  />
    <File Id="filF73350F1AEF9ECF2621D4E63B9823029" Source="$(var.FileWatcher.TargetDir)\FileWatcher.exe.config"  KeyPath='yes'/>
  </Component>
</ComponentGroup>

2 Answers2

2

As for the basic Windows Installer documentation:

The ProductCde documentation here says uppercase is required:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa370854(v=vs.85).aspx

Component table says guids must be uppercase:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa368007(v=vs.85).aspx

and the Guid column type documentation again repeats the uppercase requirement:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa368767(v=vs.85).aspx

PhilDW
  • 20,260
  • 1
  • 18
  • 28
1

As PhilDW has already stated, just uppercase your GUIDs, or leave them out altogether from your components as explained here: Syntax for guids in WIX? (they will be auto-generated for you - there are some exceptions).

Also, I recommend using one file per component if your package isn't huge. This avoids all kinds of problems (for patching, upgrades, self-repair, etc...): Change my component GUID in wix? And set a key path for every component (might be done for you if there is only one file per component, I am not sure).

Obvious, but I'll add that you can create uppercase GUIDs, in Visual Studio: Tools => Create GUID => Registry Format => New Guid => Copy. Or a lot of web pages do it for you. I assume this is obvious, just throwing it in since I am writing anyway.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Now I'm able to generate exe file from .msi installer but I can't open .exe file . it's not loadingor doing anything. any idea how to solve this @Stein Åsmul –  Feb 06 '18 at 14:15
  • Did you generate the EXE with WiX and Burn? Or did you use some other method to create the EXE? – Stein Åsmul Feb 06 '18 at 14:23
  • i have FileWatcher as .msi (windows installer package) in my project and I build it from visual studio 2015 . then I got .msi file into my desired folder loaction . I installed it and it generated .exe file but i can't open that .exe file –  Feb 06 '18 at 14:29
  • You must have missing dependencies for your executables after installation. [Please check this answer and its linked answers as well for how to debug this](https://stackoverflow.com/a/48076373/129130). Maybe try to check the modules view in Visual Studio first. – Stein Åsmul Feb 06 '18 at 14:33