Skip to content

Commit

Permalink
Merge pull request #11 from minogian/master
Browse files Browse the repository at this point in the history
Autostart properties
  • Loading branch information
Thanos21 authored Jul 29, 2016
2 parents 790db60 + 7f5da6c commit 8a75864
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ The list of possible properties include:
| GPII_SHORTCUTS<br/>GPII_DESKTOP_SHORTCUTS<br/>GPII_START_MENU_SHORTCUTS | `0` or `1` **(Default)** | Whether or not to create shortcuts for the main GPII platform |
| USB_LISTENER_SHORTCUTS<br/>USB_LISTENER_DESKTOP_SHORTCUTS<br/>USB_LISTENER_START_MENU_SHORTCUTS | `0` or `1` **(Default)** | Whether or not to create shortcuts for the USB Listener |
| RFID_LISTENER_SHORTCUTS<br/>RFID_LISTENER_DESKTOP_SHORTCUTS<br/>RFID_LISTENER_START_MENU_SHORTCUTS | `0` or `1` **(Default)** | Whether or not to create shortcuts for the RFID Listener |
| GPII_AUTOSTART<br/>RFID_LISTENER_AUTOSTART<br/>USB_LISTENER_AUTOSTART | `0` **(Default)** or `1` | Whether or not to autostart the respective component on Windows sign in |

An exhaustive list of other properties can be found at the [Windows Installer Guide](https://msdn.microsoft.com/en-us/library/windows/desktop/aa370905(v=vs.85).aspx).
62 changes: 61 additions & 1 deletion setup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,24 @@
<Property Admin="yes" Id="GPII_SHORTCUTS" Value="1" />
<Property Admin="yes" Id="GPII_DESKTOP_SHORTCUTS" Value="1" />
<Property Admin="yes" Id="GPII_START_MENU_SHORTCUTS" Value="1" />
<Property Admin="yes" Id="GPII_AUTOSTART" Value="0" />

<Property Admin="yes" Id="USB_LISTENER_SHORTCUTS" Value="1" />
<Property Admin="yes" Id="USB_LISTENER_DESKTOP_SHORTCUTS" Value="1" />
<Property Admin="yes" Id="USB_LISTENER_START_MENU_SHORTCUTS" Value="1" />
<Property Admin="yes" Id="USB_LISTENER_AUTOSTART" Value="0" />

<Property Admin="yes" Id="RFID_LISTENER_SHORTCUTS" Value="1" />
<Property Admin="yes" Id="RFID_LISTENER_DESKTOP_SHORTCUTS" Value="1" />
<Property Admin="yes" Id="RFID_LISTENER_START_MENU_SHORTCUTS" Value="1" />
<Property Admin="yes" Id="RFID_LISTENER_AUTOSTART" Value="0" />

<!-- Features -->
<Feature Id="GPIIFeature" Title="$(var.ProductName)" ConfigurableDirectory="INSTALLFOLDER" AllowAdvertise="no" Absent="disallow">
<ComponentGroupRef Id="GPII" />
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="DesktopShortcut" />
<ComponentRef Id="StartupShortcut" />
</Feature>

<Feature Id="Listeners" Title="Listeners" AllowAdvertise="no">
Expand All @@ -54,12 +58,14 @@
<ComponentGroupRef Id="UCRT" />
<ComponentRef Id="USBListenerShortcuts"/>
<ComponentRef Id="USBListenerDesktopShortcuts"/>
<ComponentRef Id="USBListenerStartupShortcuts"/>
</Feature>
<Feature Id="RFIDListenerFeature" Title="RFID Listener" AllowAdvertise="no">
<ComponentGroupRef Id="RFIDListener" />
<ComponentGroupRef Id="UCRT" />
<ComponentRef Id="RFIDListenerShortcuts"/>
<ComponentRef Id="RFIDListenerDesktopShortcuts"/>
<ComponentRef Id="RFIDListenerStartupShortcuts"/>
</Feature>
</Feature>

Expand Down Expand Up @@ -186,7 +192,60 @@
/>
</Component>
</DirectoryRef>


<DirectoryRef Id="StartupFolder">
<Component Id="StartupShortcut" Guid="{1FD6D8C0-3024-44E8-AF1E-46167B836B99}">
<Condition>GPII_AUTOSTART="1"</Condition>
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="InstallPath"
Type="string"
Value="[INSTALLFOLDER]"
KeyPath="yes"/>
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="Version"
Type="string"
Value="$(var.ProductVersion)"/>
<Shortcut Id="ExecutableStartupShortcut"
Name="Start $(var.ProductName)"
Target="[INSTALLFOLDER]\start.cmd"
WorkingDirectory="INSTALLFOLDER"
Icon="GPII.ico"
/>
</Component>
<Component Id="USBListenerStartupShortcuts" Guid="{99A5E4EB-50A3-4EDA-B5D3-4F7620D962D9}">
<Condition>USB_LISTENER_AUTOSTART="1"</Condition>
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="USBListener"
Type="integer"
Value="1"
KeyPath="yes"
/>
<Shortcut Id="USBListenerStartupShortcut"
Name="Start USB Listener"
Target="[LISTENERFOLDER]\GPII_USBListener.exe"
Icon="GPII_USBListener.ico"
/>
</Component>
<Component Id="RFIDListenerStartupShortcuts" Guid="{BE357EBB-2619-4A3B-A42E-95CE13A1E1B4}">
<Condition>RFID_LISTENER_AUTOSTART="1"</Condition>
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="RFIDListener"
Type="integer"
Value="1"
KeyPath="yes"
/>
<Shortcut Id="RFIDListenerStartupShortcut"
Name="Start RFID Listener"
Target="[LISTENERFOLDER]\GPII_RFIDListener.exe"
Icon="GPII_RFIDListener.ico"
/>
</Component>
</DirectoryRef>

<Component Id="Dummy" Directory="LISTENERFOLDER" Guid="{2F28061A-EF7D-4795-8FD4-2B7724212166}">
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)"
Expand Down Expand Up @@ -214,6 +273,7 @@
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
<Directory Id="StartupFolder" Name="Startup" />
</Directory>
</Fragment>
</Wix>

0 comments on commit 8a75864

Please sign in to comment.