From: Vinzenz Feenstra <vfeen...@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 <vfeen...@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

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to