How To Install c# gui apps using wix
How To Install c# gui apps using wix
Favorites
Notebook C# Programming
Tags
Archive
2. <Product> Element
Defines the application being installed.
Wix Installers 1
Inside <Product> , we have:
3. <Feature> Elements
Defines installable features.
<UIRef Id="WixUI_Mondo"/>
<UIRef Id="WixUI_ErrorProgressText"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
Wix Installers 2
<WixVariable Id="WixUILicenseRtf" Value="License.rtf"/>
6. Custom Actions
7. <Directory> Structure
Defines the install locations.
Wix Installers 3
Creates a docs subfolder.
9. Shortcuts
Wix Installers 4
<ComponentGroup Id="GC_SHORTCUT_MI" Directory="CARPETA_MENU_INI
CI">
<Component Id="CMP_SHORTCUT_MI" Guid="{4b81c8c7-2721-43ae-b74b
-eced2b7a74b4}">
<Shortcut Id="SHC_MI_EXE"
Icon="IconaDePrograma"
Name="MiFirstApplication"
Description="Shitty application"
Target="[INSTALLFOLDER]SetupApp.exe"/>
<Shortcut Id="SHC_MI_UNINSTALL"
Name="Desintal·lar MiFirstApplication"
Description="Desintal·lar the shitty application"
Target="[System64Folder]msiexec.exe"
Arguments="/x [ProductCode]"/>
<RemoveFolder Id="RemoveMyShortcutsDir" On="uninstall"/>
<RegistryValue Root="HKCU"
Key="Software\IESMila\MiFirstApplication"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</ComponentGroup>
Desktop Shortcut
Wix Installers 5
Description="Shitty Application"
Target="[INSTALLFOLDER]SetupApp.exe"/>
<RegistryValue Root="HKCU"
Key="Software\IESMila\MiFirstApplication"
Name="installedDesktop"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</ComponentGroup>
<Component Id="MyLibrary_dll">
<File Id="FILE_MyLibrary_dll" Source="$(var.SetupApp.TargetDir)MyLib
rary.dll" KeyPath="yes"/>
</Component>
Wix Installers 6
<WixVariable Id="WixUILicenseRtf" Value="License.rtf"/>
Change:
Final Thoughts
This sample WiX script covers installation, shortcuts, registry entries, and UI
elements.
You may need to adjust file paths based on your actual WPF project.
candle.exe MySetup.wxs
light.exe -out MySetup.msi MySetup.wixobj
Wix Installers 7