[Spice-devel] [NSIS v2 3/4] ovirt: Add service removal
Vinzenz 'evilissimo' Feenstra
vfeenstr at redhat.com
Wed Jun 22 10:12:42 UTC 2016
From: Vinzenz Feenstra <vfeenstr at redhat.com>
Previously the service registration has not been removed during
the uninstallation. This patch adds the removal code.
Change-Id: I9e2f89b01468ea51fe64afb68a75c50eb21888c1
Signed-off-by: Vinzenz Feenstra <vfeenstr at redhat.com>
---
win-guest-tools.nsis | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/win-guest-tools.nsis b/win-guest-tools.nsis
index 0aa3409..87ac923 100644
--- a/win-guest-tools.nsis
+++ b/win-guest-tools.nsis
@@ -218,6 +218,7 @@ SectionEnd
Section "Uninstall"
Call un.StopServices
+ Call un.UninstallServices
Call un.UninstallQemuGuestAgent
SetOutPath "$TEMP"
@@ -372,6 +373,28 @@ FunctionEnd
!insertmacro StopServices ""
!insertmacro StopServices "un."
+Function un.UninstallService
+ pop $R0
+ SimpleSC::ExistsService $R0
+ Pop $0
+ ${if} $0 == 0
+ SimpleSC::RemoveService $R0
+ ${endif}
+FunctionEnd
+
+Function un.UninstallServices
+ push "vdservice"
+ Call un.UninstallService
+
+ push "BalloonService"
+ Call un.UninstallService
+
+!ifdef OVIRT
+ push "OVirtGuestService"
+ Call un.UninstallService
+!endif
+FunctionEnd
+
Function InstallService
pop $R0 #service name
pop $R1 #service path
--
2.8.0
More information about the Spice-devel
mailing list