VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/ComSetup.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-03-13 18:07:25 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-03-13 18:09:21 +0100
commited604cf0f3f7fd93b4e6ee50bd344abc3f3b44ca (patch)
tree304a8be973596cd6410323f06de20f3829a6ff57 /src/Setup/ComSetup.cpp
parentef196b5ca542bf5ca1e96be2b21c46820834d814 (diff)
downloadVeraCrypt-ed604cf0f3f7fd93b4e6ee50bd344abc3f3b44ca.tar.gz
VeraCrypt-ed604cf0f3f7fd93b4e6ee50bd344abc3f3b44ca.zip
Windows: VeraCrypt reference from various registry locations. Uninstall old VeraCrypt COM interfaces that were left after upgrading.
Diffstat (limited to 'src/Setup/ComSetup.cpp')
-rw-r--r--src/Setup/ComSetup.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Setup/ComSetup.cpp b/src/Setup/ComSetup.cpp
index 29d03c97..fee83a89 100644
--- a/src/Setup/ComSetup.cpp
+++ b/src/Setup/ComSetup.cpp
@@ -34,6 +34,9 @@ extern "C" BOOL RegisterComServers (char *modulePath)
UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR, 0, SYS_WIN32);
UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR, 0, SYS_WIN32);
+ // unregister older versions that may still exist
+ UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-2, 0, SYS_WIN32);
+ UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-1, 0, SYS_WIN32);
wchar_t setupModule[MAX_PATH];
GetModuleFileNameW (NULL, setupModule, sizeof (setupModule) / sizeof (setupModule[0]));
@@ -68,6 +71,10 @@ extern "C" BOOL UnregisterComServers (char *modulePath)
if (UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR, 0, SYS_WIN32) != S_OK)
return FALSE;
+ // unregister older versions that may still exist
+ UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-2, 0, SYS_WIN32);
+ UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR-1, 0, SYS_WIN32);
+
wchar_t module[1024];
CRegObject ro;
ro.FinalConstruct ();