diff options
author | Elizabeth Ashurov <eashurov@redhat.com> | 2025-06-18 12:18:06 +0300 |
---|---|---|
committer | Kostiantyn Kostiuk <kkostiuk@redhat.com> | 2025-06-30 13:17:10 +0300 |
commit | 1c90e89e64beb2bd72f8e437c56274c885df7b3f (patch) | |
tree | b884703f49c3933ae729966bc6d386965525d14d | |
parent | 012bb70cd16512dbcc1ba423c3f7f260e177afe7 (diff) | |
download | qemu-1c90e89e64beb2bd72f8e437c56274c885df7b3f.zip qemu-1c90e89e64beb2bd72f8e437c56274c885df7b3f.tar.gz qemu-1c90e89e64beb2bd72f8e437c56274c885df7b3f.tar.bz2 |
qga/vss-win32: Add VSS provider unregistration retry
This commit improves the QGA VSS provider installation flow by attempting to unregister the VSS provider if it's already
found during installation. This allows for a retry of installation even if a previous unregistration failed or was not performed.
This will prevent inconsistencies between QGA and QGA-VSS versions.
Before this commit, QGA can use QGA-VSS from the previous installation.
Signed-off-by: Elizabeth Ashurov <eashurov@redhat.com>
Reviewed-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Message-ID: <20250618091806.170110-1-eashurov@redhat.com>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
-rw-r--r-- | qga/vss-win32/install.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index 6ee2f44..7b25d90 100644 --- a/qga/vss-win32/install.cpp +++ b/qga/vss-win32/install.cpp @@ -287,9 +287,13 @@ STDAPI COMRegister(void) chk(QGAProviderFind(QGAProviderCount, (void *)&count)); if (count) { - errmsg(E_ABORT, "QGA VSS Provider is already installed"); - qga_debug_end; - return E_ABORT; + qga_debug("QGA VSS Provider is already installed. Attempting to unregister first."); + hr = COMUnregister(); + if (FAILED(hr)) { + errmsg(hr, "Failed to unregister existing QGA VSS Provider. Aborting installation."); + qga_debug_end; + return E_ABORT; + } } chk(CoCreateInstance(CLSID_COMAdminCatalog, NULL, CLSCTX_INPROC_SERVER, |