Monday, April 12, 2010

Wix 3.0 - Windows 7 x64 - votive - Visual Studio 2008

It seems like there is an issue with the installer for Wix 3.0 with the combination of Visual Studio 2008 and Windows 7 x64.

When installing the project aggregator it's installed to c:\IDE\
It should be in
C:\Program Files(x86)\Microsoft Visual Studio 9.0\Common7\IDE\ 

When installing Wix from the MSI the templates should have been installed to
C:\users\USERNAME\documents\Visual Studio 2008\Templates\ItemTemplates

and
C:\users\USERNAME\documents\Visual Studio 2008\Templates\ProjectTemplates

They are just placed as zip files in C:\Visual Studio 9.0\Common7\IDE\WiX
Unpack WixLibrary.zip, WixMergeModule.zip and WixProject.zip to
C:\users\USERNAME\documents\Visual Studio 2008\Templates\ProjectTemplates

Unpack BlankFile.zip, CustomActionCPP.zip, IncludeFile.zip, LocalizationFile.zip, TextFile.zip to
C:\users\USERNAME\documents\Visual Studio 2008\Templates\ItemTemplates

You can now create wix projects using Visual Studio... :)

Error in MSDN documentation for ssfPROGRAMFILESx86

There is a documentation error here: (or even header error)

http://msdn.microsoft.com/en-us/library/bb774096(VS.85).aspx

When using ssfPROGRAMFILESx86 with the value of 0x30, it gives the administrative tools path, while with a value of 0x2A gives Program Files X86.

Can be tested with the following vbscript:

Const PROGRAM_FILES_XEIGHTYSIX = &H2A&
Const PROGRAM_FILES_XEIGHTYSIXWRONG = &H30&
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(PROGRAM_FILES_XEIGHTYSIXWRONG)
Set objFolderItem = objFolder.Self
msgbox ("Wrong Path: 0x30 :"+objFolderItem.Path)  
Set objFolder = objShell.Namespace(PROGRAM_FILES_XEIGHTYSIX)
Set objFolderItem = objFolder.Self
msgbox ("Correct Path: 0x2A : "+objFolderItem.Path)

To get the correct path, just use 0x2a instead of 0x30.