VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/SetupDLL/Setup.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-09-03 16:47:41 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-09-03 16:47:41 +0200
commit201d09ff5aa69db61643659726b36810d5ac00d4 (patch)
tree7e125fa95b059a7cc5272086ab9ed93defbb878c /src/SetupDLL/Setup.c
parentd68b9546bd36fa34093b8592d3927ba581fc8e59 (diff)
downloadVeraCrypt-201d09ff5aa69db61643659726b36810d5ac00d4.tar.gz
VeraCrypt-201d09ff5aa69db61643659726b36810d5ac00d4.zip
Windows: remove legacy code (XP, Vista). Simplify code since Windows 7 is now minimal OS version.
Diffstat (limited to 'src/SetupDLL/Setup.c')
-rw-r--r--src/SetupDLL/Setup.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/src/SetupDLL/Setup.c b/src/SetupDLL/Setup.c
index a4bf6520..6a288a5c 100644
--- a/src/SetupDLL/Setup.c
+++ b/src/SetupDLL/Setup.c
@@ -254,26 +254,13 @@ BOOL IsSystemRestoreEnabled ()
GetRestorePointRegKeyName (szRegPath, sizeof (szRegPath));
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, szRegPath, 0, KEY_READ | KEY_WOW64_64KEY, &hKey) == ERROR_SUCCESS)
{
- if (IsOSAtLeast (WIN_VISTA))
- {
- if ( (ERROR_SUCCESS == RegQueryValueEx (hKey, L"RPSessionInterval", NULL, NULL, (LPBYTE) &dwValue, &cbValue))
- && (dwValue == 1)
- )
- {
- bEnabled = TRUE;
- }
- }
- else
+ if ( (ERROR_SUCCESS == RegQueryValueEx (hKey, L"RPSessionInterval", NULL, NULL, (LPBYTE) &dwValue, &cbValue))
+ && (dwValue == 1)
+ )
{
- if ( (ERROR_SUCCESS == RegQueryValueEx (hKey, L"DisableSR", NULL, NULL, (LPBYTE) &dwValue, &cbValue))
- && (dwValue == 0)
- )
- {
- bEnabled = TRUE;
- }
+ bEnabled = TRUE;
}
-
RegCloseKey (hKey);
}
@@ -882,8 +869,6 @@ void HandleDriveNotReadyError_Dll (MSIHANDLE hInstaller)
{
MSILogAndShow (hInstaller, MSI_WARNING_LEVEL, GetString("SYS_AUTOMOUNT_DISABLED"));
}
- else if (nCurrentOS == WIN_VISTA && CurrentOSServicePack < 1)
- MSILogAndShow (hInstaller, MSI_WARNING_LEVEL, GetString("SYS_ASSIGN_DRIVE_LETTER"));
else
MSILogAndShow (hInstaller, MSI_WARNING_LEVEL, GetString("DEVICE_NOT_READY_ERROR"));
@@ -1717,7 +1702,7 @@ BOOL DoRegUninstall_Dll (MSIHANDLE hInstaller, BOOL bRemoveDeprecated)
}
// Unregister COM servers
- if (!bRemoveDeprecated && IsOSAtLeast (WIN_VISTA))
+ if (!bRemoveDeprecated)
{
if (!UnregisterComServers (InstallationPath))
MSILog (hInstaller, MSI_ERROR_LEVEL, GetString("COM_DEREG_FAILED"));
@@ -2638,13 +2623,10 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostInstall(MSIHANDLE hInstaller)
// Last part of DoRegInstall()
{
// Register COM servers for UAC
- if (IsOSAtLeast (WIN_VISTA))
+ if (!RegisterComServers ((wchar_t*)szInstallDir.c_str()))
{
- if (!RegisterComServers ((wchar_t*)szInstallDir.c_str()))
- {
- MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString("COM_REG_FAILED"));
- goto end;
- }
+ MSILogAndShow (hInstaller, MSI_ERROR_LEVEL, GetString("COM_REG_FAILED"));
+ goto end;
}
}