-
Notifications
You must be signed in to change notification settings - Fork 0
/
toggle.wxs
86 lines (74 loc) · 4.86 KB
/
toggle.wxs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!-- Change the Product/@Id on any installation file changes. Modify the Product Version for any minor changes. -->
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<Package Name="Toggle Dark-Light Mode" UpgradeCode="9bf9dd6a-aced-4905-98db-3572c6699b8d" Language="1033" Version="!(bind.FileVersion.toggleEXE)" Manufacturer="danielgjackson" InstallerVersion="200" Scope="perUser"><!-- "perMachine" / "perUser" -->
<MajorUpgrade AllowDowngrades="yes" /><!-- AllowSameVersionUpgrades="yes" -->
<Media Id="1" Cabinet="toggle.cab" EmbedCab="yes" />
<!-- Auto-start -->
<Property Id="START_FROM_REGISTRY" Value="1" />
<!-- Close process -->
<util:CloseApplication Id="CloseToggle" Target="toggle.exe" CloseMessage="yes" RebootPrompt="no" Condition="Installed" />
<!-- Run on exit -->
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch Toggle Dark-Light Mode" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
<Property Id="WixShellExecTarget" Value="[#toggleEXE]" />
<CustomAction Id="LaunchApplication" DllEntry="WixShellExec" Impersonate="yes" BinaryRef="Wix4UtilCA_X86" />
<UI>
<!-- "WixUI_Minimal" / "WixUI_InstallDir" / "WixUI_Mondo" -->
<ui:WixUI Id="WixUI_Mondo" />
<UIRef Id="WixUI_ErrorProgressText" />
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication" Condition="WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed" />
</UI>
<!-- Icons -->
<Icon Id="toggle.exe" SourceFile="toggle.exe" />
<!-- Main settings -->
<Feature Id="Complete" Level="1" AllowAdvertise="no" Display="expand" ConfigurableDirectory="INSTALLDIR" Title="Toggle Dark-Light Mode Application" Description="Toggle Dark-Light Mode application program file (required)." AllowAbsent="no">
<ComponentRef Id="MainExecutable" />
<Feature Id="ProgramShortcut" Level="2" AllowAdvertise="no" Title="Start Menu Shortcut" Description="Start Menu entry to launch Toggle Dark-Light Mode.">
<ComponentRef Id="ProgramMenuDir" />
</Feature>
<Feature Id="ProgramAutostart" Level="3" AllowAdvertise="no" Title="Auto-Start at user log-in" Description="Each time the user logs-in, automatically start Toggle Dark-Light Mode.">
<ComponentRef Id="Autostart" />
</Feature>
</Feature>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<Property Id="ARPPRODUCTICON" Value="toggle.exe" />
<Property Id="WixAppFolder" Value="WixPerUserFolder" /> <!-- "WixPerMachineFolder" / "WixPerUserFolder" -->
<WixVariable Id="WixUISupportPerUser" Value="1" />
<WixVariable Id="WixUISupportPerMachine" Value="0" />
<Property Id="ApplicationFolderName" Value="Toggle Dark-Light Mode" />
<!-- <Property Id="ALLUSERS" Value="0" /> -->
<Property Id="MSIINSTALLPERUSER" Value="1" />
<Property Id="INSTALLLEVEL" Value="3" />
<!-- UI customization -->
<WixVariable Id="WixUIBannerBmp" Value="bannrbmp.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="dlgbmp.bmp" />
<WixVariable Id="WixUILicenseRtf" Value="LICENSE.rtf" />
<!-- Program Files -->
<StandardDirectory Id="LocalAppDataFolder"> <!-- "ProgramFilesFolder" / "AppDataFolder" -->
<Directory Id="INSTALLDIR" Name="Toggle Dark-Light Mode">
<Component Id="MainExecutable" Guid="e1111df2-0c33-4671-9fe2-8f7988a9fe24">
<RegistryValue Root="HKCU" Key="SOFTWARE\danielgjackson\Toggle Dark-Light Mode" Type="string" Name="MainExecutable" Value="-" KeyPath="yes" />
<File Id="toggleEXE" Name="toggle.exe" Source="toggle.exe" Vital="yes"> <!-- KeyPath="yes" -->
<Shortcut Id="startmenuToggle" Directory="ProgramMenuDir" Name="Toggle Dark-Light Mode" WorkingDirectory="INSTALLDIR" Icon="toggle.exe" IconIndex="0" /> <!-- Advertise="yes" -->
</File>
<RemoveFolder Id="INSTALLDIR" On="uninstall" />
</Component>
</Directory>
</StandardDirectory>
<!-- Start Menu -->
<StandardDirectory Id="StartMenuFolder"> <!-- "ProgramMenuFolder" / "StartMenuFolder" ? -->
<Directory Id="ProgramMenuDir" Name="Toggle Dark-Light Mode">
<Component Id="ProgramMenuDir" Guid="d21d1240-0a74-4b15-b957-2303c4f0ee15">
<RegistryValue Root="HKCU" Key="SOFTWARE\danielgjackson\Toggle Dark-Light Mode" Type="string" Name="ProgramMenuDir" Value="-" KeyPath="yes" />
<RemoveFolder Id="ProgramMenuDir" On="uninstall" />
</Component>
</Directory>
</StandardDirectory>
<!-- Auto-start -->
<Directory Id="Startup" Name="Auto-start">
<Component Id="Autostart" Guid="2de766f7-9ca5-4649-979a-237920a3ac8b" Condition="START_FROM_REGISTRY">
<RegistryValue Id="AutostartReg" Root="HKCU" Action="write" Key="Software\Microsoft\Windows\CurrentVersion\Run" Type="string" Name="Toggle Dark-Light Mode" Value=""[INSTALLDIR]toggle.exe" /AUTOSTART" />
</Component>
</Directory>
</Package>
</Wix>