summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinzenz Feenstra <vfeenstr@redhat.com>2016-06-22 12:12:42 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2016-06-22 16:28:08 +0200
commita1b2a6f3c2e8c4708077c935486dec730e7706d9 (patch)
treef0ea51186e0f34f972dda0a77f577c0e6ce3b3cd
parent506e6371fb8fe250d1ae6ee0e6f6f53bea0095d6 (diff)
ovirt: Add service removal
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@redhat.com>
-rw-r--r--win-guest-tools.nsis23
1 files changed, 23 insertions, 0 deletions
diff --git a/win-guest-tools.nsis b/win-guest-tools.nsis
index 9679a7f..3e70bd0 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"
@@ -373,6 +374,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