How do you create an event log source using WiX

Wix has out-of-the-box support for creating event log sources. Assuming you use Wix 3, you first need to add a reference to WixUtilExtension to either your Votive project or the command line. You can then add an EventSource element under a component : <Wix xmlns=”http://schemas.microsoft.com/wix/2006/wi” xmlns:util=”http://schemas.microsoft.com/wix/UtilExtension”> <Component …> … <util:EventSource Log=”Application” Name=”*source name*” EventMessageFile=”*path to … Read more

In WiX files, what does Name=”SourceDir” refer to?

From: https://robmensching.com/blog/posts/2010/1/26/stackoverflow-what-does-namesourcedir-refer-to/ Honestly, it’s something that we should have hidden from the developer but didn’t. Sorry. The truth of the matter is that the Windows Installer expects the Directory tree to always be rooted in a Directory row where the primary key (Directory/@Id) is “TARGETDIR” and the DefaultDir column (Directory/@Name) is “SourceDir”. During an install, … Read more

WiX ICE validation errors

Try adding <RunWixToolsOutOfProc>true</RunWixToolsOutOfProc> to your WiX project file. We’ve had the same issue for a while, and tried various workarounds including deleting the temporary files and setting the msbuild environment variable. These all appeared to work for a while, but eventually (sometimes after a few days) the problem would come back again. I noticed that … Read more

Create shortcut to desktop using WiX

The shortcut is a non-advertised one. Remember to put the component in your feature tag. <Directory Id=”TARGETDIR” Name=”SourceDir”> <Directory Id=”DesktopFolder” Name=”Desktop”> <Component Id=”ApplicationShortcutDesktop” Guid=”*”> <Shortcut Id=”ApplicationDesktopShortcut” Name=”Text under your icon” Description=”Comment field in your shortcut” Target=”[MYAPPDIRPROPERTY]MyApp.exe” WorkingDirectory=”MYAPPDIRPROPERTY”/> <RemoveFolder Id=”DesktopFolder” On=”uninstall”/> <RegistryValue Root=”HKCU” Key=”Software\MyCompany\MyApplicationName” Name=”installed” Type=”integer” Value=”1″ KeyPath=”yes”/> </Component> </Directory> <Directory Id=”ProgramFilesFolder” Name=”PFiles”> <Directory Id=”MyCompany” Name=”MyCompany”> … Read more

How to pass CustomActionData to a CustomAction using WiX?

Deferred custom actions can not directly access installer properties (reference). In fact, only CustomActionData property session.CustomActionData and other methods and properties listed here are available on the session object. Therefore, for a deferred custom action to retrieve a property such as the INSTALLLOCATION, you have to use a type 51 custom action — i.e. a … Read more

How to build a minimal WiX installer UI without a license page?

I would simply use one of the already created WiX UI and override the sequence (make it higher so that it will override the previous setting): <Product> … <UI> <UIRef Id=”WixUI_InstallDir” /> <!– Skip license dialog –> <Publish Dialog=”WelcomeDlg” Control=”Next” Event=”NewDialog” Value=”InstallDirDlg” Order=”2″>1</Publish> <Publish Dialog=”InstallDirDlg” Control=”Back” Event=”NewDialog” Value=”WelcomeDlg” Order=”2″>1</Publish> </UI> <Property Id=”WIXUI_INSTALLDIR” Value=”INSTALLFOLDER” /> … … Read more

Wix create non advertised shortcut for all users / per machine

Sorry if it’s bad etiquette to answer my own question. Recently I stumbled upon the information on DISABLEADVTSHORTCUTS property. I created an install with advertised shortcuts and set the DISABLEADVTSHORTCUTS property to 1 which produced non-advertised shortcuts. This bypasses ICE43 errors because an advertised shortcut can use a file as a keypath. Because DISABLEADVTSHORTCUTS has … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)