Skip to content

Commit 634c903

Browse files
committed
Windows installer: remove the whole directory ⚠️ and all its contents
1 parent d88b6dd commit 634c903

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

scripts/build_installer.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ call %FUNC% DeployPython
3232
echo Generating .wxs file for WiX installer...
3333
%PYTHON% "wix\makewxs.py" %CI_DST% %CI_VER%
3434
echo Building WiX Installer...
35-
wix build "wix\%CI_DST%-%CI_VER%.wxs" -ext WixToolset.UI.wixext
35+
wix build "wix\%CI_DST%-%CI_VER%.wxs" -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext
3636

3737
@REM Create release directory
3838
@REM ===========================================================================

wix/generic-DataLab-WinPython.wxs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
2-
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
2+
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
33
<Package Name="DataLab-WinPython" ProductCode="f3313a2e-1d05-4a9f-af25-046ac0227a95" Language="1033" Version="{version}" Codepage="1252" Manufacturer="DataLab Platform Developers" UpgradeCode="a8002fab-c887-4ada-9792-ba1aedae50b6" InstallerVersion="200" Scope="perUserOrMachine">
44
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
55
<Icon Id="DataLab.exe" SourceFile=".\executables\DataLab.ico" />
@@ -12,6 +12,9 @@
1212
<Feature Id="ProductFeature" Title="DataLab-WinPython" Level="1">
1313
<ComponentGroupRef Id="ProductComponents" />
1414
</Feature>
15+
<Property Id="REMOVEPROP">
16+
<RegistrySearch Id="GetInstallFolderForNukingPurposes" Root="HKCU" Key="SOFTWARE\[Manufacturer]\[ProductName]" Name="InstallFolder" Type="directory" />
17+
</Property>
1518
</Package>
1619
<Fragment>
1720
<StandardDirectory Id="ProgramFilesFolder">
@@ -39,7 +42,9 @@
3942
<Shortcut Id="ApplicationStartMenuShortcut02" Name="DataLab-WinPython Control Panel" Description="DataLab-WinPython Control Panel" Target="[INSTALLFOLDER]\WinPython Control Panel.exe" WorkingDirectory="INSTALLFOLDER" />
4043
<Shortcut Id="UninstallProductShortcut" Name="Uninstall DataLab" Description="Uninstalls DataLab" Target="[System64Folder]msiexec.exe" Arguments="/x [ProductCode]" WorkingDirectory="INSTALLFOLDER" />
4144
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />
42-
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\DataLab" Name="installed" Type="integer" Value="1" KeyPath="yes" />
45+
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes" />
46+
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="InstallFolder" Type="string" Value="[INSTALLFOLDER]" />
47+
<util:RemoveFolderEx On="both" Property="REMOVEPROP" />
4348
</Component>
4449
</ComponentGroup>
4550
</Fragment>

0 commit comments

Comments
 (0)