[Spice-devel] [NSIS 5/5] ovirt: Add ovirt-guest-agent service removal

Yedidyah Bar David didi at redhat.com
Tue Jun 21 14:26:33 UTC 2016


From: Vinzenz Feenstra <vfeenstr at redhat.com>

Previously the ovirt guest agent 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 | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/win-guest-tools.nsis b/win-guest-tools.nsis
index 9679a7f..4e5464e 100644
--- a/win-guest-tools.nsis
+++ b/win-guest-tools.nsis
@@ -232,6 +232,8 @@ Section "Uninstall"
   RMDir /rebootok "$INSTDIR\64"
   RMDir /rebootok /r "$INSTDIR\drivers"
 !ifdef OVIRT
+  Call un.UninstallOVirtAgentService
+
   Delete /rebootok "$INSTDIR\OVirtGuestService.exe"
 
   Delete /rebootok "$INSTDIR\default.ini"
@@ -446,6 +448,14 @@ Function InstallOVirtAgentService
   push "OVirtGuestService"
   Call InstallService
 FunctionEnd
+
+Function un.UninstallOVirtAgentService
+  SimpleSC::ExistsService "OVirtGuestService"
+  Pop $0
+  ${if} $0 == 0
+    SimpleSC::RemoveService "OVirtGuestService"
+  ${endif}
+FunctionEnd
 !endif
 
 Function InstallBalloonService
-- 
2.1.4



More information about the Spice-devel mailing list