i'm stuck on this "child node error" and i really don't know why i got that.
there is my code:
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='Foobar 1.0' Id='YOURGUID-86C7-4D14-AEC0-86416A69ABDE' UpgradeCode='YOURGUID-7349-453F-94F6-BCB5110BA4FD'
Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='test'>
<Package Id='*' Keywords='Installer' Description="test Project 1.0 Installer"
Comments='It is a test for test project.' Manufacturer='test.'
InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
<Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
<Property Id='DiskPrompt' Value="test 1.0 Installation [1]" />
<Icon Id='icon.ico' SourceFile='icon.ico' />
<Property Id='ARPPRODUCTICON' Value='icon.ico' />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='Acme' Name='test'>
<Directory Id='INSTALLDIR' Name='test 1.0'>
<Component Id='MainExecutable' Guid='YOURGUID-83F1-4F22-985B-FDB3C8ABD471'>
<File Id='FoobarEXE' Name='test.exe' DiskId='1' Source='FoobarAppl10.exe' KeyPath='yes'>
<!-- Here is the env -->
<Environment Id="PATH" Name="PATH" Value="[INSTALLDIR]" Permanent="yes" Part="last" Action="set" System="yes" />
<Shortcut Id="startmenuFoobar10" Directory="ProgramMenuDir" Name="test 1.0" WorkingDirectory:'INSTALLDIR' Icon="icon.ico" IconIndex="0" Advertise="yes" />
<Shortcut Id="desktopFoobar10" Directory="DesktopFolder" Name="test 1.0" WorkingDirectory='INSTALLDIR' Icon="icon.ico" IconIndex="0" Advertise="yes" />
</File>
</Component>
<Component Id='HelperLibrary' Guid='YOURGUID-6BE3-460D-A14F-75658D16550B'>
<File Id='HelperDLL' Name='Helper.dll' DiskId='1' Source='Helper.dll' KeyPath='yes' />
</Component>
<Component Id='Manual' Guid='YOURGUID-574D-4A9A-A266-5B5EC2C022A4'>
<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="YOURGUID-7E98-44CE-B049-C477CC0A2B00">
<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>
</Product>
</Wix>
And i got :
$ wixl -v SampleFirst.wxs
Loading SampleFirst.wxs...
(wixl:3778): wixl-ERROR **: 11:22:33.398: wix.vala:218: unhandled child File node Environment
I try to add environment but i don't know why i got that, i check other answers
(Can anyone give me a example of modifying windows environment system variables in WIX?)
(Set Environment variable on client machine using WiX toolset MSI installer)
and it's allways the same error...
Here is another test:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*"
Name="My Software"
Language="1033"
Version="1.0.0.0"
Manufacturer="My Company"
UpgradeCode="889e2707-5235-4d97-b178-cf0cb55d8ab8">
<Package InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature"
Title="MyFirstWixProject" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER"
Name="My Software" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents"
Directory="INSTALLFOLDER">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->
<Component Id="cmpEnvironmentVariable"
Guid="{313075B5-BF2C-4012-9A6E-2F4E2C461306}"
KeyPath="yes">
<Environment Id="myEnvironmentVariable"
Name="MyVariable"
Value="some value"
Action="set"
System="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
And i got :
$ wixl -v EnvironmentVariableInstaller.wxs
Loading EnvironmentVariableInstaller.wxs...
(wixl:6595): GLib-GObject-WARNING **: 17:49:16.893: g_object_set_is_valid_property: object class 'WixlWixComponent' has no property named 'KeyPath'
(wixl:6595): wixl-ERROR **: 17:49:16.893: wix.vala:218: unhandled child Component node Environment
So if someone have the solution it will help me a lot ! Thx