Complete MSI packaging
Added task handling.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -250,3 +250,6 @@ paket-files/
|
|||||||
# JetBrains Rider
|
# JetBrains Rider
|
||||||
.idea/
|
.idea/
|
||||||
*.sln.iml
|
*.sln.iml
|
||||||
|
|
||||||
|
# MSI
|
||||||
|
SetupWufuc/msi/
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
Manufacturer="$(var.ProductAuthor)"
|
Manufacturer="$(var.ProductAuthor)"
|
||||||
Platform="$(var.Platform)" />
|
Platform="$(var.Platform)" />
|
||||||
|
|
||||||
|
<PropertyRef Id="WIX_ACCOUNT_LOCALSERVICE" />
|
||||||
<?if $(var.Platform) = x86 ?>
|
<?if $(var.Platform) = x86 ?>
|
||||||
<Condition Message="This application can not be installed on x64 machine.">
|
<Condition Message="This application can not be installed on x64 machine.">
|
||||||
<![CDATA[Not VersionNT64]]>
|
<![CDATA[Not VersionNT64]]>
|
||||||
@@ -43,7 +44,6 @@
|
|||||||
<Condition Message="This application is only supported on Windows 7, 8.1, 2008 R2 or 2012 R2.">
|
<Condition Message="This application is only supported on Windows 7, 8.1, 2008 R2 or 2012 R2.">
|
||||||
<![CDATA[Installed OR (VersionNT = 601) OR (VersionNT = 603)]]>
|
<![CDATA[Installed OR (VersionNT = 601) OR (VersionNT = 603)]]>
|
||||||
</Condition>
|
</Condition>
|
||||||
|
|
||||||
<Media Id="1" Cabinet="media.cab" EmbedCab="yes" />
|
<Media Id="1" Cabinet="media.cab" EmbedCab="yes" />
|
||||||
|
|
||||||
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
||||||
@@ -64,47 +64,20 @@
|
|||||||
<WixVariable Id="WixUISupportPerUser" Value="0" />
|
<WixVariable Id="WixUISupportPerUser" Value="0" />
|
||||||
|
|
||||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||||
<!-- Program files -->
|
<!-- Program files -->
|
||||||
<Directory Id="$(var.PlatformProgramFilesFolder)" >
|
<Directory Id="$(var.PlatformProgramFilesFolder)" >
|
||||||
<Directory Id="APPLICATIONFOLDER" Name="$(var.ProductName)"/>
|
<Directory Id="APPLICATIONFOLDER" Name="$(var.ProductName)" />
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<!-- Start menu (shortcuts) -->
|
<!-- Start menu (shortcuts) -->
|
||||||
<Directory Id="ProgramMenuFolder" >
|
<Directory Id="ProgramMenuFolder" >
|
||||||
<Directory Id="ShortcutsFolder" Name="$(var.ProductName)"/>
|
<Directory Id="ShortcutsFolder" Name="$(var.ProductName)"/>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
<Directory Id="SystemFolder" />
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<DirectoryRef Id="APPLICATIONFOLDER">
|
<DirectoryRef Id="APPLICATIONFOLDER">
|
||||||
<!-- Windows service -->
|
|
||||||
<!--
|
|
||||||
<Component
|
|
||||||
Id="ServiceComponent"
|
|
||||||
Guid="C9E9EA0D-AC74-4833-870E-5BE0D05A15BE"
|
|
||||||
Win64="$(var.Win64)">
|
|
||||||
|
|
||||||
<File
|
|
||||||
Id="ServiceFile"
|
|
||||||
Name="$(var.wufuc.TargetFileName)"
|
|
||||||
Source="$(var.wufuc.TargetPath)"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<ServiceInstall Id="ServiceInstall"
|
|
||||||
Name="WufucSvc"
|
|
||||||
DisplayName="$(var.ProductName) Service"
|
|
||||||
Type="ownProcess"
|
|
||||||
Interactive="no"
|
|
||||||
Start="auto"
|
|
||||||
Vital="yes"
|
|
||||||
ErrorControl="normal"
|
|
||||||
Description="Service to bypass compatibility processor check for updates." />
|
|
||||||
<ServiceControl Id="ServiceControl"
|
|
||||||
Name="WufucSvc"
|
|
||||||
Stop="both"
|
|
||||||
Remove="uninstall"
|
|
||||||
Wait="yes" />
|
|
||||||
</Component>
|
|
||||||
-->
|
|
||||||
<!-- Readme file -->
|
<!-- Readme file -->
|
||||||
<Component
|
<Component
|
||||||
Id="TextComponent"
|
Id="TextComponent"
|
||||||
@@ -136,7 +109,7 @@
|
|||||||
</Component>
|
</Component>
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
|
|
||||||
<!-- Starte menu program shortcuts -->
|
<!-- Start menu program shortcuts -->
|
||||||
<DirectoryRef Id="ShortcutsFolder">
|
<DirectoryRef Id="ShortcutsFolder">
|
||||||
|
|
||||||
<!-- Shortcuts for readme file and uninstaller -->
|
<!-- Shortcuts for readme file and uninstaller -->
|
||||||
@@ -201,6 +174,9 @@
|
|||||||
APPLICATIONFOLDER=""
|
APPLICATIONFOLDER=""
|
||||||
</SetDirectory>
|
</SetDirectory>
|
||||||
|
|
||||||
|
<!-- Save destination folder in Add/Remove programs (ARP) registry key -->
|
||||||
|
<SetProperty Id="ARPINSTALLLOCATION" Value="[APPLICATIONFOLDER]" After="CostFinalize" />
|
||||||
|
|
||||||
<CustomAction
|
<CustomAction
|
||||||
Id="OverwriteWixSetDefaultPerMachineFolder"
|
Id="OverwriteWixSetDefaultPerMachineFolder"
|
||||||
Property="WixPerMachineFolder"
|
Property="WixPerMachineFolder"
|
||||||
@@ -208,17 +184,49 @@
|
|||||||
Execute="immediate"
|
Execute="immediate"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Save destination folder in Add/Remove programs (ARP) registry key -->
|
<!--
|
||||||
<SetProperty Id="ARPINSTALLLOCATION" Value="[APPLICATIONFOLDER]" After="CostFinalize" />
|
<CustomAction
|
||||||
|
Id="UnloadDLL"
|
||||||
|
Return="ignore"
|
||||||
|
Property="ARPINSTALLLOCATION"
|
||||||
|
ExeCommand=""[SystemFolder]rundll32" """[INSTALLFOLDER]wufuc.dll""",Rundll32Unload"
|
||||||
|
/>
|
||||||
|
-->
|
||||||
|
<CustomAction
|
||||||
|
Id="CreateScheduledTask"
|
||||||
|
Directory="SystemFolder"
|
||||||
|
ExeCommand=""[SystemFolder]schtasks.exe" /Create /TN wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307} /SC ONSTART /RU "[WIX_ACCOUNT_LOCALSYSTEM]" /TR "[SystemFolder]rundll32 \"\"\"[APPLICATIONFOLDER]wufuc.dll\"\"\",Rundll32Entry""
|
||||||
|
Execute="deferred"
|
||||||
|
Impersonate="no"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<CustomAction
|
||||||
|
Id="RollbackScheduledTask"
|
||||||
|
Directory="SystemFolder"
|
||||||
|
ExeCommand=""[SystemFolder]schtasks.exe" /Delete /TN wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307} /F"
|
||||||
|
Execute="rollback"
|
||||||
|
Impersonate="no"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<CustomAction
|
||||||
|
Id="RemoveScheduledTask"
|
||||||
|
Directory="SystemFolder"
|
||||||
|
ExeCommand=""[SystemFolder]schtasks.exe" /Delete /TN wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307} /F"
|
||||||
|
Execute="deferred"
|
||||||
|
Impersonate="no"
|
||||||
|
/>
|
||||||
|
|
||||||
<WixVariable Id="WixUILicenseRtf" Value="$(var.SolutionDir)LICENSE.rtf" />
|
<WixVariable Id="WixUILicenseRtf" Value="$(var.SolutionDir)LICENSE.rtf" />
|
||||||
|
|
||||||
<InstallUISequence>
|
<InstallUISequence>
|
||||||
<Custom Action="OverwriteWixSetDefaultPerMachineFolder" After="WixSetDefaultPerMachineFolder" />
|
<Custom Action="OverwriteWixSetDefaultPerMachineFolder" After="WixSetDefaultPerMachineFolder" />
|
||||||
</InstallUISequence>
|
</InstallUISequence>
|
||||||
|
|
||||||
<InstallExecuteSequence>
|
<InstallExecuteSequence>
|
||||||
<Custom Action="OverwriteWixSetDefaultPerMachineFolder" After="WixSetDefaultPerMachineFolder" />
|
<Custom Action="OverwriteWixSetDefaultPerMachineFolder" After="WixSetDefaultPerMachineFolder" />
|
||||||
<DeleteServices>NOT UPGRADINGPRODUCTCODE</DeleteServices>
|
<Custom Action="CreateScheduledTask" Before="InstallFinalize">NOT Installed</Custom>
|
||||||
|
<Custom Action="RollbackScheduledTask" Before="CreateScheduledTask">NOT Installed</Custom>
|
||||||
|
<Custom Action="RemoveScheduledTask" Before="InstallFinalize">REMOVE ~= "ALL"</Custom>
|
||||||
</InstallExecuteSequence>
|
</InstallExecuteSequence>
|
||||||
<UIRef Id="WixUI_Advanced"/>
|
<UIRef Id="WixUI_Advanced"/>
|
||||||
|
|
||||||
|
@@ -42,6 +42,10 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<WixExtension Include="WixUtilExtension">
|
||||||
|
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
|
||||||
|
<Name>WixUtilExtension</Name>
|
||||||
|
</WixExtension>
|
||||||
<WixExtension Include="WixUIExtension">
|
<WixExtension Include="WixUIExtension">
|
||||||
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
|
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
|
||||||
<Name>WixUIExtension</Name>
|
<Name>WixUIExtension</Name>
|
||||||
|
Reference in New Issue
Block a user