I’m using following define to make my setup script flexible according to the build environment.
<?if $(var.Platform)=x64 ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define win64Flag = "yes"?>
<?define TargetConfigurationPath = "bin\x64\Release"?>
<?else ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define win64Flag = "no"?>
<?define TargetConfigurationPath = "bin\x86\Release"?>
<?endif ?>
in detail I mind about the win64Flag variable which i use in every Win64 Attribute of components. I’m using the Platform in the Packages “Platform” attribute too.
But to get back to the Win64 attribute, i use the variable this way:
Win64="$(var.win64Flag)"
And I always get a warning telling me that using this statement in a YesNoType attribute is invalid.
I’m building this stuff using candle.exe with this call:
candle.exe -ext WixUtilExtension -dPlatform=x86 "Deployment\WiX Setup Project\SetupScript.wxs" -out "Deployment\TempBuildOutput\SetupScript x86.wixobj"
light.exe -ext WixUIExtension -ext WixUtilExtension "Deployment\TempBuildOutput\SetupScript x86.wixobj" -out "Deployment\TempBuildOutput\Installer_x86.msi"
I got some CustomAction in my script, which auto-starts an application if the installation finished. This works fine on x64 builds, but not with x86 builds.
Thats why i think that there might be something wrong with the Win64 Attribute, or better, in the way how I use it.
But according to my thoughts, something must be correct with this code, because the files are installed to the appropriate folder on x64 (Program Files) and x86 (Program Files (x86)). But i’m asking myself, whats the reason my apps are not started after the installation was finished.
I’m working with a x64 Windows, can this be the cause of failing to start my x86 auto start apps?
Is there a way on solving the warning on my usage of the Win64 Attribute?
I can’t tell you why your app isn’t starting after the installation completes without a little more information to diagnose the problem, but I can tell you why you’re getting the warning about the invalid attribute.
The invalid attribute warning is generated by Visual Studio, if you were to compile your project on the command line you would not see see the warning. The Visual Studio XML editor does automatic XML schema validation if it recognizes the schema of your XML document. The Wix XML schema defines the values allowed for the
Win64attribute as eitheryesorno. Visual Studio sees that you don’t have one of those values and kindly lets you know you’re not adhering to the defined schema. Wix, on the other had, first preprocesses the document and replaces the offending value with the value you defined in your include file, which makes it so the document passes schema validation.In short, this warning is likely no the cause of the problem you are seeing.