[NSIS v2 3/4] ovirt: Add service removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vinzenz Feenstra <vfeenstr@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 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

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]