1;Uninstaller Section
2Section "Uninstall"
3
4  SetShellVarContext current
5
6  Delete "$INSTDIR\AUTHORS"
7  Delete "$INSTDIR\ChangeLog"
8  Delete "$INSTDIR\COPYING"
9  Delete "$INSTDIR\README.md"
10  Delete "$INSTDIR\README.developers.md"
11  Delete "$INSTDIR\README.windows.md"
12  Delete "$INSTDIR\cec.dll"
13  Delete "$INSTDIR\cec.pdb"
14  Delete "$INSTDIR\cecc-client.exe"
15  Delete "$INSTDIR\cec-client.exe"
16  Delete "$INSTDIR\include\cec*.h"
17  Delete "$INSTDIR\netcore\LibCecSharpCore.deps.json"
18  Delete "$INSTDIR\netcore\LibCecSharpCore.dll"
19  Delete "$INSTDIR\netcore\LibCecSharpCore.pdb"
20  Delete "$INSTDIR\netcore\LibCecSharpCore.runtimeconfig.json"
21  Delete "$INSTDIR\netcore\LibCecSharpCore.xml"
22  Delete "$INSTDIR\netcore\CecSharpCoreTester.deps.json"
23  Delete "$INSTDIR\netcore\CecSharpCoreTester.dll"
24  Delete "$INSTDIR\netcore\CecSharpCoreTester.runtimeconfig.json"
25  Delete "$INSTDIR\netcore\CecSharpCoreTester.exe"
26  Delete "$INSTDIR\netcore\CecSharpCoreTester.pdb"
27  Delete "$INSTDIR\netfx\LibCecSharp.dll"
28  Delete "$INSTDIR\netfx\LibCecSharp.pdb"
29  Delete "$INSTDIR\netfx\LibCecSharp.xml"
30  Delete "$INSTDIR\netfx\cec-tray.exe"
31  Delete "$INSTDIR\netfx\CecSharpTester.exe"
32  Delete "$INSTDIR\python\_cec.pyd"
33  Delete "$INSTDIR\python\cec\cec.py"
34  Delete "$INSTDIR\python\cec\__init__.py"
35  Delete "$INSTDIR\python\pyCecClient.py"
36  ${If} ${RunningX64}
37    Delete "$INSTDIR\x64\cec.dll"
38    Delete "$INSTDIR\x64\cec.pdb"
39    Delete "$INSTDIR\x64\cecc-client.exe"
40    Delete "$INSTDIR\x64\cec-client.exe"
41    Delete "$INSTDIR\x64\netcore\LibCecSharpCore.deps.json"
42    Delete "$INSTDIR\x64\netcore\LibCecSharpCore.dll"
43    Delete "$INSTDIR\x64\netcore\LibCecSharpCore.pdb"
44    Delete "$INSTDIR\x64\netcore\LibCecSharpCore.runtimeconfig.json"
45    Delete "$INSTDIR\x64\netcore\LibCecSharpCore.xml"
46    Delete "$INSTDIR\x64\netcore\CecSharpCoreTester.deps.json"
47    Delete "$INSTDIR\x64\netcore\CecSharpCoreTester.dll"
48    Delete "$INSTDIR\x64\netcore\CecSharpCoreTester.runtimeconfig.json"
49    Delete "$INSTDIR\x64\netcore\CecSharpCoreTester.exe"
50    Delete "$INSTDIR\x64\netcore\CecSharpCoreTester.pdb"
51    Delete "$INSTDIR\x64\netfx\LibCecSharp.dll"
52    Delete "$INSTDIR\x64\netfx\LibCecSharp.pdb"
53    Delete "$INSTDIR\x64\netfx\LibCecSharp.xml"
54    Delete "$INSTDIR\x64\netfx\cec-tray.exe"
55    Delete "$INSTDIR\x64\netfx\CecSharpTester.exe"
56  ${EndIf}
57
58  ; Uninstall EventGhost plugin
59  ; Eventghost has no uninstall plugin feature so we sinply delete the plugin
60  ; from the directory.
61  ReadRegDword $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\EventGhost_is1" "InstallLocation"
62  ${If} $1 != ""
63    RMDir /r "$%PROGRAMDATA%\EventGhost\plugins\PulseEight"
64  ${Endif}
65
66  ; Uninstall the driver
67  ReadRegStr $1 HKLM "Software\Pulse-Eight\USB-CEC Adapter driver" ""
68  ${If} $1 != ""
69    ExecWait '"$1\Uninstall.exe" /S _?=$1'
70  ${EndIf}
71
72  RMDir /r "$INSTDIR\include"
73  Delete "$INSTDIR\uninstall_libcec.exe"
74  RMDir /r "$INSTDIR"
75  RMDir "$PROGRAMFILES\Pulse-Eight"
76
77  !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
78  Delete "$SMPROGRAMS\$StartMenuFolder\libCEC Tray.lnk"
79  ${If} ${RunningX64}
80    Delete "$SMPROGRAMS\$StartMenuFolder\libCEC Tray (x64).lnk"
81  ${EndIf}
82  Delete "$SMPROGRAMS\$StartMenuFolder\cec-tray.lnk"
83  Delete "$SMPROGRAMS\$StartMenuFolder\CEC Test client.lnk"
84  ${If} ${RunningX64}
85    Delete "$SMPROGRAMS\$StartMenuFolder\CEC Test client (x64).lnk"
86  ${EndIf}
87  Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall Pulse-Eight USB-CEC Adapter software.lnk"
88  Delete "$SMPROGRAMS\$StartMenuFolder\Visit Pulse-Eight.url"
89  RMDir "$SMPROGRAMS\$StartMenuFolder"
90
91  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter sofware"
92  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pulse-Eight USB-CEC Adapter driver"
93  DeleteRegKey /ifempty HKLM "Software\Pulse-Eight\USB-CEC Adapter software"
94  DeleteRegKey /ifempty HKLM "Software\Pulse-Eight"
95SectionEnd