From 7dc920817af8ab17b6a25d8d5df5ff9eb1a1713b Mon Sep 17 00:00:00 2001
From: Nikos Skalkotos <skalkoto@grnet.gr>
Date: Tue, 23 Jul 2013 13:44:10 +0300
Subject: [PATCH] Use --uninstall in winexe

---
 image_creator/os_type/windows.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/image_creator/os_type/windows.py b/image_creator/os_type/windows.py
index 86de674..0847190 100644
--- a/image_creator/os_type/windows.py
+++ b/image_creator/os_type/windows.py
@@ -689,8 +689,8 @@ class Windows(OSBase):
         addr = 'localhost'
         runas = '--runas=%s' % user
         winexe = subprocess.Popen(
-            ['winexe', '-U', user, runas, "//%s" % addr, command],
-            stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+            ['winexe', '-U', user, runas, "--uninstall", "//%s" % addr,
+             command], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 
         stdout, stderr = winexe.communicate()
         rc = winexe.poll()
-- 
GitLab