mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 11:53:53 -06:00
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>
This commit is contained in:
parent
012bb70cd1
commit
1c90e89e64
1 changed files with 7 additions and 3 deletions
|
@ -287,10 +287,14 @@ STDAPI COMRegister(void)
|
||||||
|
|
||||||
chk(QGAProviderFind(QGAProviderCount, (void *)&count));
|
chk(QGAProviderFind(QGAProviderCount, (void *)&count));
|
||||||
if (count) {
|
if (count) {
|
||||||
errmsg(E_ABORT, "QGA VSS Provider is already installed");
|
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;
|
qga_debug_end;
|
||||||
return E_ABORT;
|
return E_ABORT;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
chk(CoCreateInstance(CLSID_COMAdminCatalog, NULL, CLSCTX_INPROC_SERVER,
|
chk(CoCreateInstance(CLSID_COMAdminCatalog, NULL, CLSCTX_INPROC_SERVER,
|
||||||
IID_IUnknown, (void **)pUnknown.replace()));
|
IID_IUnknown, (void **)pUnknown.replace()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue