diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index d2db7c3ad08..c6c328d5cd7 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -225,29 +225,29 @@ jobs:
- platform: arm64
runner: windows-11-vs2026-arm
- installation_type: normal
- argument_list_alpha: "/quiet /qn /l*v alpha.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0"
- argument_list_release: "/quiet /qn /l*v release.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0"
- argument_list_install: "/quiet /qn /l*v install.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0"
+ argument_list_alpha: "/quiet /qn /l*v alpha.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0"
+ argument_list_release: "/quiet /qn /l*v release.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0"
+ argument_list_install: "/quiet /qn /l*v install.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0"
argument_list_prepare: ""
- installation_type: service
- argument_list_alpha: "/quiet /qn /norestart /l*v alpha.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1"
- argument_list_release: "/quiet /qn /norestart /l*v release.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1"
- argument_list_install: "/quiet /qn /norestart /l*v install.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1"
+ argument_list_alpha: "/quiet /qn /norestart /l*v alpha.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1"
+ argument_list_release: "/quiet /qn /norestart /l*v release.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1"
+ argument_list_install: "/quiet /qn /norestart /l*v install.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1"
argument_list_prepare: ""
- installation_type: test_acct_mgr_login
- argument_list_alpha: "/quiet /qn /l*v alpha.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0"
- argument_list_release: "/quiet /qn /l*v release.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0"
- argument_list_install: "/quiet /qn /l*v install.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0 ACCTMGR_LOGIN=test ACCTMGR_PASSWORDHASH=0123456789abcdef"
+ argument_list_alpha: "/quiet /qn /l*v alpha.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0"
+ argument_list_release: "/quiet /qn /l*v release.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0"
+ argument_list_install: "/quiet /qn /l*v install.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0 ACCTMGR_LOGIN=test ACCTMGR_PASSWORDHASH=0123456789abcdef"
argument_list_prepare: ""
- installation_type: test_client_auth_file
- argument_list_alpha: "/quiet /qn /norestart /l*v alpha.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1"
- argument_list_release: "/quiet /qn /norestart /l*v release.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1"
- argument_list_install: "/quiet /qn /norestart /l*v install.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1 BOINC_PROJECT_USERNAME=test_user BOINC_PROJECT_PASSWORD=qwerty123456!@#$%^"
+ argument_list_alpha: "/quiet /qn /norestart /l*v alpha.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1"
+ argument_list_release: "/quiet /qn /norestart /l*v release.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1"
+ argument_list_install: "/quiet /qn /norestart /l*v install.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0 ENABLEPROTECTEDAPPLICATIONEXECUTION3=1 BOINC_PROJECT_USERNAME=test_user BOINC_PROJECT_PASSWORD=qwerty123456!@#$%^"
argument_list_prepare: '--create-user --username test_user --password "qwerty123456!@#$%^"'
- installation_type: test_proj_init_file
- argument_list_alpha: "/quiet /qn /l*v alpha.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0"
- argument_list_release: "/quiet /qn /l*v release.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0"
- argument_list_install: "/quiet /qn /l*v install.log OVERRIDE_LAUNCHWSLIMAGEINSTALLER=0 PROJINIT_URL=https://test.com PROJINIT_NAME=test PROJINIT_AUTH=abcdef1234567890"
+ argument_list_alpha: "/quiet /qn /l*v alpha.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0"
+ argument_list_release: "/quiet /qn /l*v release.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0"
+ argument_list_install: "/quiet /qn /l*v install.log OVERRIDE_INSTALLWSLIMAGEINSTALLER=0 PROJINIT_URL=https://test.com PROJINIT_NAME=test PROJINIT_AUTH=abcdef1234567890"
argument_list_prepare: ""
fail-fast: false
steps:
diff --git a/clientsetup/win/CACheckWSLSupport.cpp b/clientsetup/win/CACheckWSLSupport.cpp
deleted file mode 100644
index bea55847eca..00000000000
--- a/clientsetup/win/CACheckWSLSupport.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// This file is part of BOINC.
-// https://boinc.berkeley.edu
-// Copyright (C) 2026 University of California
-//
-// BOINC is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// BOINC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with BOINC. If not, see .
-
-#include "boinccas.h"
-
-typedef VOID(WINAPI* RtlGetNtVersionNumbersPtr)(LPDWORD lpMajorVersion,
- LPDWORD lpMinorVersion, LPDWORD lpBuildNumber);
-
-class CACheckWSLSupport : public BOINCCABase {
-public:
- virtual ~CACheckWSLSupport() = default;
- explicit CACheckWSLSupport(MSIHANDLE hMSIHandle) :
- BOINCCABase(hMSIHandle, _T("CACheckWSLSupport"),
- _T("Check WSL Support")) {}
-private:
- UINT OnExecution() override final {
- auto hNTDllLib = GetModuleHandle(_T("ntdll.dll"));
- if (hNTDllLib == nullptr) {
- return ERROR_INSTALL_FAILURE;
- }
-
- auto rtlGetVersionNumbers =
- reinterpret_cast(
- GetProcAddress(hNTDllLib, "RtlGetNtVersionNumbers"));
-
- if (!rtlGetVersionNumbers) {
- return ERROR_INSTALL_FAILURE;
- }
-
- DWORD major, minor, build;
- rtlGetVersionNumbers(&major, &minor, &build);
- DWORD buildNumber = build & 0xFFFF;
-
- // WSL is supported on Windows 10 version 2004 (build 19041) and later
- // or version 1903 (build 18362) and later.
- // Windows 11 is fully supported (major version 10 build 22000).
-
- auto isWSLSupported = false;
- if (major > 10 || (major == 10 && buildNumber >= 18362)) {
- isWSLSupported = true;
- }
-
- if (isWSLSupported) {
- SetProperty(_T("INSTALLWSLIMAGEINSTALLER"), _T("1"));
- tstring strLaunchBOINCWslImageInstaller;
- const auto returnValue = GetProperty(_T("LAUNCHWSLIMAGEINSTALLER"),
- strLaunchBOINCWslImageInstaller);
- if (returnValue) {
- return returnValue;
- }
- if (!strLaunchBOINCWslImageInstaller.empty() &&
- strLaunchBOINCWslImageInstaller != _T("1")) {
- SetProperty(_T("LAUNCHWSLIMAGEINSTALLER"), _T(""));
- }
- else {
- SetProperty(_T("LAUNCHWSLIMAGEINSTALLER"), _T("1"));
- }
- }
- else {
- SetProperty(_T("INSTALLWSLIMAGEINSTALLER"), _T(""));
- SetProperty(_T("LAUNCHWSLIMAGEINSTALLER"), _T(""));
- }
-
- return ERROR_SUCCESS;
- }
-};
-
-UINT __stdcall CheckWSLSupport(MSIHANDLE hInstall) {
- return CACheckWSLSupport(hInstall).Execute();
-}
diff --git a/clientsetup/win/CALaunchBOINCWSLInstaller.cpp b/clientsetup/win/CALaunchBOINCWSLInstaller.cpp
deleted file mode 100644
index e8d985396e7..00000000000
--- a/clientsetup/win/CALaunchBOINCWSLInstaller.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-// This file is part of BOINC.
-// https://boinc.berkeley.edu
-// Copyright (C) 2026 University of California
-//
-// BOINC is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// BOINC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with BOINC. If not, see .
-
-#include "boinccas.h"
-#include
-#include "win_util.h"
-
-class CALaunchBOINCWSLInstaller : public BOINCCABase {
-public:
- virtual ~CALaunchBOINCWSLInstaller() = default;
- explicit CALaunchBOINCWSLInstaller(MSIHANDLE hMSIHandle) :
- BOINCCABase(hMSIHandle, _T("CALaunchBOINCWSLInstaller"),
- _T("Launching BOINC WSL Installer")) {
- }
-private:
- UINT OnExecution() override final {
- tstring strInstallDirectory;
-
- auto uiReturnValue =
- GetProperty(_T("INSTALLDIR"), strInstallDirectory);
- if (uiReturnValue != ERROR_SUCCESS) {
- return uiReturnValue;
- }
- if (strInstallDirectory.empty()) {
- return ERROR_INSTALL_FAILURE;
- }
-
- auto strBuffer = strInstallDirectory +
- tstring(_T("\\boinc-buda-runner-wsl-installer.exe"));
-
- tstring strCheckSum;
- uiReturnValue =
- GetProperty(_T("boinc_buda_runner_wsl_installer_checksum"),
- strCheckSum);
- if (uiReturnValue != ERROR_SUCCESS) {
- return uiReturnValue;
- }
- if (strCheckSum.empty()) {
- return ERROR_INSTALL_FAILURE;
- }
-
- //verify the installer executable's checksum before launching it
- std::ifstream file(strBuffer, std::ios::binary);
- if (!file.is_open()) {
- return ERROR_INSTALL_FAILURE;
- }
-
- std::unique_ptr ctx(
- EVP_MD_CTX_new(), EVP_MD_CTX_free);
- if (!ctx) {
- return ERROR_INSTALL_FAILURE;
- }
-
- if (EVP_DigestInit_ex(ctx.get(), EVP_sha256(), nullptr) != 1) {
- return ERROR_INSTALL_FAILURE;
- }
- constexpr auto bufferSize = 8192u;
- std::array buffer;
- while (file.read(buffer.data(), bufferSize)) {
- if (EVP_DigestUpdate(ctx.get(), buffer.data(),
- file.gcount()) != 1) {
- return ERROR_INSTALL_FAILURE;
- }
- }
- if (EVP_DigestUpdate(ctx.get(), buffer.data(), file.gcount()) != 1) {
- return ERROR_INSTALL_FAILURE;
- }
- std::array hash;
- unsigned int hashSize = 0;
- if (EVP_DigestFinal_ex(ctx.get(), hash.data(), &hashSize) != 1) {
- return ERROR_INSTALL_FAILURE;
- }
- std::ostringstream hashStringStream;
- for (size_t i = 0; i < hashSize; ++i) {
- hashStringStream << std::hex << std::setw(2) << std::setfill('0')
- << std::nouppercase << static_cast(hash[i]);
- }
- auto calculatedHash = _T("sha256:") +
- boinc_ascii_to_wide(hashStringStream.str());
-
- if (calculatedHash != strCheckSum) {
- return ERROR_INSTALL_FAILURE;
- }
-
- // Surround the installer path with quotes in case there are spaces in the path
- strBuffer = tstring(_T("\"")) + strBuffer + tstring(_T("\""));
- PROCESS_INFORMATION ProcInfo = { 0 };
- STARTUPINFO StartupInfo = { 0 };
- // create process with the elevated permissions
- // inherited from the installer process
- if (!CreateProcess(nullptr, const_cast(strBuffer.data()),
- nullptr, nullptr, FALSE, 0, nullptr, nullptr, &StartupInfo,
- &ProcInfo)) {
- return ERROR_INSTALL_FAILURE;
- }
-
- // Wait until the installer process exits before returning from this custom action
- WaitForSingleObject(ProcInfo.hProcess, INFINITE);
-
- CloseHandle(ProcInfo.hThread);
- CloseHandle(ProcInfo.hProcess);
-
- return ERROR_SUCCESS;
- }
-};
-
-UINT __stdcall LaunchBOINCWSLInstaller(MSIHANDLE hInstall) {
- return CALaunchBOINCWSLInstaller(hInstall).Execute();
-}
diff --git a/clientsetup/win/CARestoreExecutionState.cpp b/clientsetup/win/CARestoreExecutionState.cpp
index 19f627d0e01..19ecd4ea213 100644
--- a/clientsetup/win/CARestoreExecutionState.cpp
+++ b/clientsetup/win/CARestoreExecutionState.cpp
@@ -56,12 +56,6 @@ class CARestoreExecutionState : public BOINCCABase {
SetProperty(_T("BOINC_PROJECT_USERNAME"),
strBOINCProjectAccountUsername);
- tstring strLaunchBOINCWslImageInstaller;
- GetRegistryValue(_T("LAUNCHWSLIMAGEINSTALLER"),
- strLaunchBOINCWslImageInstaller);
- SetProperty(_T("LAUNCHWSLIMAGEINSTALLER"),
- strLaunchBOINCWslImageInstaller);
-
return ERROR_SUCCESS;
}
};
diff --git a/clientsetup/win/CARestoreSetupState.cpp b/clientsetup/win/CARestoreSetupState.cpp
index 36083769848..38d5f71e28c 100644
--- a/clientsetup/win/CARestoreSetupState.cpp
+++ b/clientsetup/win/CARestoreSetupState.cpp
@@ -70,23 +70,23 @@ class CARestoreSetupState : public BOINCCABase {
}
}
- tstring strOverrideLaunchWSLImageInstaller;
- GetProperty(_T("OVERRIDE_LAUNCHWSLIMAGEINSTALLER"),
- strOverrideLaunchWSLImageInstaller);
- if (!strOverrideLaunchWSLImageInstaller.empty()) {
- SetProperty(_T("LAUNCHWSLIMAGEINSTALLER"),
- strOverrideLaunchWSLImageInstaller);
+ tstring strOverrideInstallWSLImageInstaller;
+ GetProperty(_T("OVERRIDE_INSTALLWSLIMAGEINSTALLER"),
+ strOverrideInstallWSLImageInstaller);
+ if (!strOverrideInstallWSLImageInstaller.empty()) {
+ SetProperty(_T("INSTALLWSLIMAGEINSTALLER"),
+ strOverrideInstallWSLImageInstaller);
}
else {
- tstring strLaunchWSLImageInstaller;
- GetRegistryValue(_T("LAUNCHWSLIMAGEINSTALLER"),
- strLaunchWSLImageInstaller);
- if (strLaunchWSLImageInstaller == _T("1") ||
- strLaunchWSLImageInstaller.empty()) {
- SetProperty(_T("LAUNCHWSLIMAGEINSTALLER"), _T("1"));
+ tstring strInstallWSLImageInstaller;
+ GetRegistryValue(_T("INSTALLWSLIMAGEINSTALLER"),
+ strInstallWSLImageInstaller);
+ if (strInstallWSLImageInstaller == _T("1") ||
+ strInstallWSLImageInstaller.empty()) {
+ SetProperty(_T("INSTALLWSLIMAGEINSTALLER"), _T("1"));
}
else {
- SetProperty(_T("LAUNCHWSLIMAGEINSTALLER"), _T(""));
+ SetProperty(_T("INSTALLWSLIMAGEINSTALLER"), _T(""));
}
}
diff --git a/clientsetup/win/CASaveExecutionState.cpp b/clientsetup/win/CASaveExecutionState.cpp
index 1a3a86f0c96..344023883ad 100644
--- a/clientsetup/win/CASaveExecutionState.cpp
+++ b/clientsetup/win/CASaveExecutionState.cpp
@@ -61,12 +61,6 @@ class CASaveExecutionState : public BOINCCABase {
SetRegistryValue(_T("LAUNCHPROGRAM"), _T(""));
}
- tstring strLaunchBOINCWslImageInstaller;
- GetProperty(_T("LAUNCHWSLIMAGEINSTALLER"),
- strLaunchBOINCWslImageInstaller);
- SetRegistryValue(_T("LAUNCHWSLIMAGEINSTALLER"),
- strLaunchBOINCWslImageInstaller);
-
return ERROR_SUCCESS;
}
};
diff --git a/clientsetup/win/CASaveSetupState.cpp b/clientsetup/win/CASaveSetupState.cpp
index b8f680e4d0f..f1830f015d7 100644
--- a/clientsetup/win/CASaveSetupState.cpp
+++ b/clientsetup/win/CASaveSetupState.cpp
@@ -43,14 +43,14 @@ class CASaveSetupState : public BOINCCABase {
SetRegistryValue(_T("LAUNCHPROGRAM"), _T("0"));
}
- tstring strLaunchBOINCWslImageInstaller;
- GetProperty(_T("LAUNCHWSLIMAGEINSTALLER"),
- strLaunchBOINCWslImageInstaller);
- if (_T("1") == strLaunchBOINCWslImageInstaller) {
- SetRegistryValue(_T("LAUNCHWSLIMAGEINSTALLER"), _T("1"));
+ tstring strInstallBOINCWslImageInstaller;
+ GetProperty(_T("INSTALLWSLIMAGEINSTALLER"),
+ strInstallBOINCWslImageInstaller);
+ if (_T("1") == strInstallBOINCWslImageInstaller) {
+ SetRegistryValue(_T("INSTALLWSLIMAGEINSTALLER"), _T("1"));
}
else {
- SetRegistryValue(_T("LAUNCHWSLIMAGEINSTALLER"), _T("0"));
+ SetRegistryValue(_T("INSTALLWSLIMAGEINSTALLER"), _T("0"));
}
tstring strBOINCMasterAccountUsername;
diff --git a/clientsetup/win/boinccas.def b/clientsetup/win/boinccas.def
index 5b5d0b855e1..b90b5bf0c00 100644
--- a/clientsetup/win/boinccas.def
+++ b/clientsetup/win/boinccas.def
@@ -1,3 +1,19 @@
+; This file is part of BOINC.
+; https://boinc.berkeley.edu
+; Copyright (C) 2026 University of California
+;
+; BOINC is free software; you can redistribute it and/or modify it
+; under the terms of the GNU Lesser General Public License
+; as published by the Free Software Foundation,
+; either version 3 of the License, or (at your option) any later version.
+;
+; BOINC is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+; See the GNU Lesser General Public License for more details.
+;
+; You should have received a copy of the GNU Lesser General Public License
+; along with BOINC. If not, see .
;
; Module definition file for the boinccas.dll
;
@@ -5,46 +21,44 @@
LIBRARY boinccas
EXPORTS
- DllMain
+ AnnounceUpgrade
+ CleanupOldBinaries
+ CreateAcctMgrLoginFile
CreateBOINCAccounts
CreateBOINCGroups
CreateClientAuthFile
- GrantBOINCMasterRights
- GrantBOINCProjectRights
- ShutdownBOINC
- ShutdownBOINCManager
- ShutdownBOINCScreensaver
+ CreateProjectInitFile
+ DeleteBOINCAccounts
+ DeleteBOINCGroups
+ DllMain
GrantBOINCAdminsRights
GrantBOINCAdminsVirtualBoxRights
- GrantBOINCUsersRights
+ GrantBOINCMasterRights
+ GrantBOINCProjectRights
GrantBOINCProjectsRights
GrantBOINCProjectsVirtualBoxRights
- SetPermissionBOINC
- SetPermissionBOINCData
- SetPermissionBOINCDataProjects
- SetPermissionBOINCDataSlots
+ GrantBOINCUsersRights
LaunchBOINCManager
LaunchBOINCTray
- ValidateSetupType
- RestoreSetupState
- SaveSetupState
- ShutdownBOINCManager
- CleanupOldBinaries
- VerifyInstallDirectories
- ValidateInstall
- ValidateRebootRequest
- SaveExecutionState
RestoreExecutionState
- CreateProjectInitFile
- CreateAcctMgrLoginFile
RestorePermissionBOINCData
+ RestoreSetupState
RevokeBOINCAdminsRights
RevokeBOINCMasterRights
RevokeBOINCProjectRights
RevokeBOINCProjectsRights
RevokeBOINCUsersRights
- DeleteBOINCGroups
- DeleteBOINCAccounts
- AnnounceUpgrade
- LaunchBOINCWSLInstaller
- CheckWSLSupport
+ SaveExecutionState
+ SaveSetupState
+ SetPermissionBOINC
+ SetPermissionBOINCData
+ SetPermissionBOINCDataProjects
+ SetPermissionBOINCDataSlots
+ ShutdownBOINC
+ ShutdownBOINCManager
+ ShutdownBOINCManager
+ ShutdownBOINCScreensaver
+ ValidateInstall
+ ValidateRebootRequest
+ ValidateSetupType
+ VerifyInstallDirectories
diff --git a/clientsetup/win/launcher.cpp b/clientsetup/win/launcher.cpp
index e0e5058e53b..2ae5137d185 100644
--- a/clientsetup/win/launcher.cpp
+++ b/clientsetup/win/launcher.cpp
@@ -17,7 +17,7 @@
#include "launcher.h"
-static HRESULT SetPrivilege(HANDLE hToken, std::wstring_view lpszPrivilege,
+static HRESULT SetPrivilege(HANDLE hToken, tstring_view lpszPrivilege,
DWORD dwAttributes = SE_PRIVILEGE_ENABLED) {
LUID luid;
@@ -108,7 +108,7 @@ static HRESULT GetProcessIL(DWORD dwProcessId, LPDWORD pdwProcessIL) {
return S_OK;
}
-static HRESULT CreateProcessWithIL(std::wstring_view szCmdLine) {
+static HRESULT CreateProcessWithIL(tstring_view szCmdLine) {
HANDLE hNewToken;
DWORD dwEnableVirtualization = 0;
@@ -181,12 +181,17 @@ static HRESULT CreateProcessWithIL(std::wstring_view szCmdLine) {
}
PROCESS_INFORMATION ProcInfo = { 0 };
- STARTUPINFO StartupInfo = { 0 };
+ STARTUPINFOW StartupInfo = { 0 };
+#ifdef _UNICODE
+ const auto cmdW = szCmdLine;
+#else
+ const auto cmdW = boinc_ascii_to_wide(std::string(szCmdLine));
+#endif
if (!CreateProcessWithTokenW(hNewToken, 0, nullptr,
- const_cast(szCmdLine.data()), 0, nullptr, nullptr,
+ const_cast(cmdW.data()), 0, nullptr, nullptr,
&StartupInfo, &ProcInfo)) {
- if (!CreateProcessAsUser(hNewToken, nullptr,
- const_cast(szCmdLine.data()), nullptr, nullptr, FALSE,
+ if (!CreateProcessAsUserW(hNewToken, nullptr,
+ const_cast(cmdW.data()), nullptr, nullptr, FALSE,
NORMAL_PRIORITY_CLASS, nullptr, nullptr, &StartupInfo, &ProcInfo
)) {
return HRESULT_FROM_WIN32(GetLastError());
@@ -199,16 +204,20 @@ static HRESULT CreateProcessWithIL(std::wstring_view szCmdLine) {
return S_OK;
}
-HRESULT Launcher::CreateProcessWithExplorerIL(std::wstring_view szCmdLine) {
+HRESULT Launcher::CreateProcessWithExplorerIL(tstring_view szCmdLine) {
if (CreateProcessWithIL(szCmdLine) == S_OK) {
return S_OK;
}
PROCESS_INFORMATION ProcInfo = { 0 };
STARTUPINFO StartupInfo = { 0 };
- if (!CreateProcess(nullptr, const_cast(szCmdLine.data()),
- nullptr, nullptr, FALSE, 0, nullptr, nullptr, &StartupInfo,
- &ProcInfo)) {
+#ifdef _UNICODE
+ auto *cmd = const_cast(szCmdLine.data());
+#else
+ auto *cmd = const_cast(szCmdLine.data());
+#endif
+ if (!CreateProcess(nullptr, cmd, nullptr, nullptr, FALSE, 0, nullptr,
+ nullptr, &StartupInfo, &ProcInfo)) {
return HRESULT_FROM_WIN32(GetLastError());
}
diff --git a/clientsetup/win/launcher.h b/clientsetup/win/launcher.h
index 3599ee95e76..9bc626c2805 100644
--- a/clientsetup/win/launcher.h
+++ b/clientsetup/win/launcher.h
@@ -17,6 +17,19 @@
#pragma once
+#ifdef _UNICODE
+#define tstring_view std::wstring_view
+#else
+// we use this when building installer_setup project only
+// a little bit ugly but omits code duplication
+#include
+#include
+#include
+#include "win_util.h"
+#define tstring_view std::string_view
+#define _T(x) x
+#endif
+
class Launcher {
public:
Launcher() = delete;
@@ -24,5 +37,5 @@ class Launcher {
Launcher operator=(const Launcher&) = delete;
Launcher(const Launcher&) = delete;
- static HRESULT CreateProcessWithExplorerIL(std::wstring_view szCmdLine);
+ static HRESULT CreateProcessWithExplorerIL(tstring_view szCmdLine);
};
diff --git a/installer/include/ActionText.json b/installer/include/ActionText.json
index af52c1688e0..9cefacf2a5a 100644
--- a/installer/include/ActionText.json
+++ b/installer/include/ActionText.json
@@ -329,14 +329,6 @@
"Action": "WriteRegistryValues",
"Description": "IDS_ACTIONTEXT_WritingRegistry",
"Template": "IDS_ACTIONTEXT_KeyNameValue"
- },
- {
- "Action": "caCreateVRoots",
- "Description": "IDS_ACTIONTEXT_CreatingIISRoots"
- },
- {
- "Action": "caRemoveVRoots",
- "Description": "IDS_ACTIONTEXT_RemovingIISRoots"
}
]
}
diff --git a/installer/include/Checkbox.json b/installer/include/Checkbox.json
index 557a4d2a73e..7c1f37e8859 100644
--- a/installer/include/Checkbox.json
+++ b/installer/include/Checkbox.json
@@ -17,7 +17,7 @@
"Value": "1"
},
{
- "Property": "LAUNCHWSLIMAGEINSTALLER",
+ "Property": "INSTALLWSLIMAGEINSTALLER",
"Value": "1"
}
]
diff --git a/installer/include/CustomAction.json b/installer/include/CustomAction.json
index 5ea9328fb0b..c638377d247 100644
--- a/installer/include/CustomAction.json
+++ b/installer/include/CustomAction.json
@@ -6,12 +6,6 @@
"Source": "boinccas.dll",
"Target": "AnnounceUpgrade"
},
- {
- "Action": "CACheckWSLSupport",
- "Type": 1,
- "Source": "boinccas.dll",
- "Target": "CheckWSLSupport"
- },
{
"Action": "CACleanupOldBinaries",
"Type": 1,
diff --git a/installer/include/InstallExecuteSequence.json b/installer/include/InstallExecuteSequence.json
index a6246331dcd..4977a6f0b4e 100644
--- a/installer/include/InstallExecuteSequence.json
+++ b/installer/include/InstallExecuteSequence.json
@@ -28,11 +28,6 @@
"Condition": "NOT Installed",
"Sequence": 6605
},
- {
- "Action": "CACheckWSLSupport",
- "Condition": "REMOVE <> \"ALL\"",
- "Sequence": 990
- },
{
"Action": "CACreateBOINCAccounts",
"Condition": "REMOVE <> \"ALL\" AND ENABLEPROTECTEDAPPLICATIONEXECUTION3 = 1",
diff --git a/installer/include/Property.json b/installer/include/Property.json
index d16e7b1447f..40fcaaef94f 100644
--- a/installer/include/Property.json
+++ b/installer/include/Property.json
@@ -40,10 +40,6 @@
"Property": "ENABLELAUNCHATLOGON",
"Value": "1"
},
- {
- "Property": "ENABLESCREENSAVER",
- "Value": "1"
- },
{
"Property": "ENABLESTARTMENUITEMS",
"Value": "1"
@@ -68,10 +64,6 @@
"Property": "InstallChoice",
"Value": "AR"
},
- {
- "Property": "LAUNCHWSLIMAGEINSTALLER",
- "Value": "1"
- },
{
"Property": "LAUNCHPROGRAM",
"Value": "1"
@@ -158,7 +150,7 @@
},
{
"Property": "SecureCustomProperties",
- "Value": "ACTPROP_E913E54D_5080_42EC_A312_B21948BA1C02;INSTALLDIR;ENABLEPROTECTEDAPPLICATIONEXECUTION3;LAUNCHPROGRAM;ISACTIONPROP1;ISACTIONPROP2;LAUNCHWSLIMAGEINSTALLER"
+ "Value": "ACTPROP_E913E54D_5080_42EC_A312_B21948BA1C02;INSTALLDIR;ENABLEPROTECTEDAPPLICATIONEXECUTION3;LAUNCHPROGRAM;ISACTIONPROP1;ISACTIONPROP2;INSTALLWSLIMAGEINSTALLER"
},
{
"Property": "UpgradeCode",
@@ -175,10 +167,6 @@
{
"Property": "_IsMaintenance",
"Value": "Reinstall"
- },
- {
- "Property": "boinc_buda_runner_wsl_installer_checksum",
- "Value": "sha256:ca7497a4695c91de15d952642950ce8f8d15d45cf2167702ed061217125dd066"
}
]
}
diff --git a/installer/include/dialog/InstallWelcome.json b/installer/include/dialog/InstallWelcome.json
index 772d078a9c3..6c5196b3afa 100644
--- a/installer/include/dialog/InstallWelcome.json
+++ b/installer/include/dialog/InstallWelcome.json
@@ -19,7 +19,7 @@
"Height": 17,
"Attributes": 1,
"Text": "IDS_BACK",
- "Control_Next": "Copyright"
+ "Control_Next": "Next"
},
{
"Control": "Cancel",
@@ -40,27 +40,6 @@
}
]
},
- {
- "Control": "Copyright",
- "Type": "Text",
- "X": 135,
- "Y": 144,
- "Width": 228,
- "Height": 73,
- "Attributes": 65539,
- "Text": "IDS__IsWelcomeDlg_WarningCopyright",
- "Control_Next": "Next",
- "Conditions": [
- {
- "Action": "Hide",
- "Condition": "SHOWCOPYRIGHT=\"No\""
- },
- {
- "Action": "Show",
- "Condition": "SHOWCOPYRIGHT=\"Yes\""
- }
- ]
- },
{
"Control": "DlgLine",
"Type": "Line",
diff --git a/installer/include/dialog/LicenseAgreement.json b/installer/include/dialog/LicenseAgreement.json
index b4b3cbefb49..0e3ab57472a 100644
--- a/installer/include/dialog/LicenseAgreement.json
+++ b/installer/include/dialog/LicenseAgreement.json
@@ -135,7 +135,7 @@
"Width": 358,
"Height": 130,
"Attributes": 7,
- "Text": "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033\\deflangfe1033{\\fonttbl{\\f0\\fmodern\\fprq1\\fcharset0 Courier New;}}\n{\\colortbl ;\\red0\\green0\\blue255;}\n{\\*\\generator Msftedit 5.41.21.2506;}\\viewkind4\\uc1\\pard\\nowidctlpar\\f0\\fs20 Berkeley Open Infrastructure for Network Computing (BOINC)\\par\n\\par\nLicense Agreement\\par\n\\par\nPlease carefully read the following terms and conditions before using this software. Your use of this software indicates your acceptance of this license agreement and warranty.\\par\n\\par\nDisclaimer of Warranty\\par\n\\par\nTHIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED \"AS IS\" AND WITHOUT WARRANTIES OF ANY KIND, AND THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. ANY STATUTORY WARRANTY OF NON-INFRINGEMENT IS ALSO DISCLAIMED.\\par\n\\par\nRestrictions\\par\n\\par\nYou may use this software on a computer system only if you own the system or have the permission of the owner.\\par\n\\par\nDistribution\\par\n\\par\n\\pard This is free software. It is distributed under the terms of the GNU Lesser General Public License as published by the Free Software Foundation (https://www.fsf.org/). The source code may be obtained from the BOINC official repository on GitHub (https://github.com/BOINC/boinc/).\\par\n\\par\n}\n"
+ "Text": "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033\\deflangfe1033{\\fonttbl{\\f0\\fmodern\\fprq1\\fcharset0 Tahoma;}}\n{\\colortbl ;\\red0\\green0\\blue255;}\n{\\*\\generator Msftedit 5.41.21.2506;}\\viewkind4\\uc1\\pard\\nowidctlpar\\f0\\fs16 BOINC\\par\n\\par\nLicense Agreement\\par\n\\par\nPlease carefully read the following terms and conditions before using this software. Your use of this software indicates your acceptance of this license agreement and warranty.\\par\n\\par\nDisclaimer of Warranty\\par\n\\par\nTHIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED \"AS IS\" AND WITHOUT WARRANTIES OF ANY KIND, AND THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. ANY STATUTORY WARRANTY OF NON-INFRINGEMENT IS ALSO DISCLAIMED.\\par\n\\par\nRestrictions\\par\n\\par\nYou may use this software on a computer system only if you own the system or have the permission of the owner.\\par\n\\par\nDistribution\\par\n\\par\n\\pard This is free software. It is distributed under the terms of the GNU Lesser General Public License as published by the Free Software Foundation (https://www.fsf.org/). The source code may be obtained from the BOINC official repository on GitHub (https://github.com/BOINC/boinc/).\\par\n\\par\n}\n"
},
{
"Control": "Next",
diff --git a/installer/include/dialog/SetupCompleteSuccess.json b/installer/include/dialog/SetupCompleteSuccess.json
index 69e3b61e809..020d70f1bba 100644
--- a/installer/include/dialog/SetupCompleteSuccess.json
+++ b/installer/include/dialog/SetupCompleteSuccess.json
@@ -79,46 +79,29 @@
"Attributes": 65538,
"Property": "NewProperty1",
"Text": "IDS_NEW_STRING2",
- "Control_Next": "LaunchWSLImageInstallerCheck",
+ "Control_Next": "LaunchProgramAfterWslInstallationText",
"Conditions": [
{
"Action": "Show",
- "Condition": "PROGRAMFILETOLAUNCHATEND <> \"\" And ACTION <> \"ADMIN\" And RETURN_VALIDATEINSTALL = \"1\" And RETURN_REBOOTREQUESTED = \"0\" And NOT Installed"
- }
- ]
- },
- {
- "Control": "LaunchWSLImageInstallerCheck",
- "Type": "CheckBox",
- "X": 151,
- "Y": 132,
- "Width": 10,
- "Height": 13,
- "Attributes": 2,
- "Property": "LAUNCHWSLIMAGEINSTALLER",
- "Control_Next": "LaunchWSLImageInstallerText",
- "Conditions": [
- {
- "Action": "Show",
- "Condition": "INSTALLWSLIMAGEINSTALLER And ACTION = \"INSTALL\" And RETURN_VALIDATEINSTALL = \"1\" And RETURN_REBOOTREQUESTED = \"0\" And NOT Installed"
+ "Condition": "PROGRAMFILETOLAUNCHATEND <> \"\" And ACTION <> \"ADMIN\" And RETURN_VALIDATEINSTALL = \"1\" And RETURN_REBOOTREQUESTED = \"0\" And NOT Installed And NOT INSTALLWSLIMAGEINSTALLER"
}
]
},
{
- "Control": "LaunchWSLImageInstallerText",
+ "Control": "LaunchProgramAfterWslInstallationText",
"Type": "Text",
"X": 165,
- "Y": 132,
+ "Y": 114,
"Width": 198,
- "Height": 13,
+ "Height": 26,
"Attributes": 65538,
- "Property": "NewProperty2",
- "Text": "IDS_NEW_STRING3",
+ "Property": "NewProperty1",
+ "Text": "IDS_NEW_STRING4",
"Control_Next": "OK",
"Conditions": [
{
"Action": "Show",
- "Condition": "INSTALLWSLIMAGEINSTALLER And ACTION = \"INSTALL\" And RETURN_VALIDATEINSTALL = \"1\" And RETURN_REBOOTREQUESTED = \"0\" And NOT Installed"
+ "Condition": "PROGRAMFILETOLAUNCHATEND <> \"\" And ACTION <> \"ADMIN\" And RETURN_VALIDATEINSTALL = \"1\" And RETURN_REBOOTREQUESTED = \"0\" And NOT Installed And INSTALLWSLIMAGEINSTALLER"
}
]
},
@@ -136,14 +119,14 @@
{
"Event": "DoAction",
"Argument": "CALaunchBOINCManager",
- "Condition": "LAUNCHPROGRAM And (ACTION <> \"ADMIN\")",
- "Ordering": 5
+ "Condition": "LAUNCHPROGRAM And (NOT INSTALLWSLIMAGEINSTALLER Or SETUPEXENAME = \"\") And (ACTION <> \"ADMIN\")",
+ "Ordering": 4
},
{
"Event": "DoAction",
"Argument": "CALaunchBOINCTray",
- "Condition": "LAUNCHPROGRAM And (ACTION <> \"ADMIN\")",
- "Ordering": 6
+ "Condition": "LAUNCHPROGRAM And (NOT INSTALLWSLIMAGEINSTALLER Or SETUPEXENAME = \"\") And (ACTION <> \"ADMIN\")",
+ "Ordering": 5
},
{
"Event": "DoAction",
@@ -151,17 +134,11 @@
"Condition": "1",
"Ordering": 2
},
- {
- "Event": "DoAction",
- "Argument": "CALaunchBOINCWSLInstaller",
- "Condition": "INSTALLWSLIMAGEINSTALLER And LAUNCHWSLIMAGEINSTALLER And (ACTION <> \"ADMIN\")",
- "Ordering": 3
- },
{
"Event": "EndDialog",
"Argument": "Exit",
"Condition": "1",
- "Ordering": 4
+ "Ordering": 3
}
]
},
diff --git a/installer/include/dialog/SetupConfig.json b/installer/include/dialog/SetupConfig.json
index 3b927cf856f..5a1e50b6894 100644
--- a/installer/include/dialog/SetupConfig.json
+++ b/installer/include/dialog/SetupConfig.json
@@ -107,7 +107,7 @@
"Attributes": 1,
"Property": "ENABLEPROTECTEDAPPLICATIONEXECUTION3",
"Text": "IDS_NEW_STRING13",
- "Control_Next": "Advanced"
+ "Control_Next": "CheckBox5"
},
{
"Control": "CheckBox4",
@@ -256,14 +256,16 @@
"Text": "IDS_NEW_STRING10"
},
{
- "Control": "Text6",
- "Type": "Text",
- "X": 34,
+ "Control": "CheckBox5",
+ "Type": "CheckBox",
+ "X": 21,
"Y": 159,
- "Width": 328,
- "Height": 25,
+ "Width": 331,
+ "Height": 13,
"Attributes": 1,
- "Text": "IDS_NEW_STRING30"
+ "Property": "INSTALLWSLIMAGEINSTALLER",
+ "Text": "IDS_NEW_STRING3",
+ "Control_Next": "Advanced"
}
]
}
diff --git a/installer/include/dialog/SetupConfigAdvanced.json b/installer/include/dialog/SetupConfigAdvanced.json
index cd2996735dc..0413367b06c 100644
--- a/installer/include/dialog/SetupConfigAdvanced.json
+++ b/installer/include/dialog/SetupConfigAdvanced.json
@@ -139,13 +139,13 @@
"Attributes": 3,
"Property": "ENABLEPROTECTEDAPPLICATIONEXECUTION3",
"Text": "IDS_NEW_STRING13",
- "Control_Next": "Next"
+ "Control_Next": "CheckBox5"
},
{
"Control": "CheckBox4",
"Type": "CheckBox",
"X": 21,
- "Y": 210,
+ "Y": 213,
"Width": 331,
"Height": 13,
"Attributes": 3,
@@ -277,10 +277,22 @@
"X": 34,
"Y": 158,
"Width": 328,
- "Height": 44,
+ "Height": 32,
"Attributes": 3,
"Property": "NewProperty1",
"Text": "IDS_NEW_STRING31"
+ },
+ {
+ "Control": "CheckBox5",
+ "Type": "CheckBox",
+ "X": 21,
+ "Y": 190,
+ "Width": 331,
+ "Height": 13,
+ "Attributes": 3,
+ "Property": "INSTALLWSLIMAGEINSTALLER",
+ "Text": "IDS_NEW_STRING3",
+ "Control_Next": "Next"
}
]
}
diff --git a/installer/installer_setup/main.cpp b/installer/installer_setup/main.cpp
index 5372647a1ab..b0225edb481 100644
--- a/installer/installer_setup/main.cpp
+++ b/installer/installer_setup/main.cpp
@@ -1,6 +1,6 @@
// This file is part of BOINC.
// https://boinc.berkeley.edu
-// Copyright (C) 2025 University of California
+// Copyright (C) 2026 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
@@ -18,6 +18,7 @@
#include
#include
+#include
#include
#include
#include
@@ -28,8 +29,12 @@
#include
#include "installer_setup.h"
+#include "launcher.h"
#include "version.h"
+constexpr std::string_view boinc_buda_runner_wsl_installer_checksum =
+ "b45f2c8630ddd26ed9a1887f8c2da0cda6141b305081d97903e133024b2dd8c1";
+
class Logger {
public:
static Logger& Instance() {
@@ -37,7 +42,7 @@ class Logger {
return instance;
}
- void Log(const std::string& message) {
+ void Log(std::string_view message) {
if (!ofs.is_open()) {
return;
}
@@ -57,7 +62,8 @@ class Logger {
const auto len = GetTempPath(MAX_PATH, tempPath);
if (len != 0 && len <= MAX_PATH) {
logPath = tempPath;
- } else {
+ }
+ else {
logPath = std::filesystem::current_path();
}
logPath /= "boinc_installer.log";
@@ -74,7 +80,7 @@ class Logger {
std::ofstream ofs;
};
-void Log(const std::string& message) {
+static void Log(const std::string& message) {
Logger::Instance().Log(message);
}
@@ -92,9 +98,9 @@ static std::string WideToUtf8(const wchar_t* w) {
return out;
}
-HBITMAP hBitmap = NULL;
+HBITMAP hBitmap = nullptr;
-void LoadSplashImage(HDC hdc, HWND hwnd) {
+static void LoadSplashImage(HDC hdc, HWND hwnd) {
auto hdcMem = CreateCompatibleDC(hdc);
SelectObject(hdcMem, hBitmap);
@@ -110,7 +116,7 @@ void LoadSplashImage(HDC hdc, HWND hwnd) {
DeleteDC(hdcMem);
}
-LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
+static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
switch (msg) {
case WM_PAINT: {
PAINTSTRUCT ps;
@@ -129,7 +135,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
return 0;
}
-std::string computeMD5(const void* buffer, size_t size) {
+static std::string computeMD5(const void* buffer, size_t size) {
Log("Computing MD5 hash...");
unsigned char md5Digest[MD5_DIGEST_LENGTH];
@@ -170,10 +176,98 @@ std::string computeMD5(const void* buffer, size_t size) {
return oss.str();
}
+static std::string computeSHA256(const std::filesystem::path& filePath) {
+ Log("Computing SHA256 hash for file: " + filePath.string());
+ std::ifstream file(filePath, std::ios::binary);
+ if (!file) {
+ Log("Failed to open file for SHA256 computation.");
+ return {};
+ }
+ unsigned char sha256Digest[EVP_MAX_MD_SIZE];
+ unsigned int digestLength = 0;
+ auto* mdContext = EVP_MD_CTX_new();
+ if (mdContext == nullptr) {
+ Log("Failed to create SHA256 context.");
+ return {};
+ }
+ if (EVP_DigestInit_ex(mdContext, EVP_sha256(), nullptr) != 1) {
+ EVP_MD_CTX_free(mdContext);
+ Log("Failed to initialize SHA256 context.");
+ return {};
+ }
+ constexpr size_t bufferSize = 8192;
+ char buffer[bufferSize];
+ while (file.read(buffer, bufferSize)) {
+ if (EVP_DigestUpdate(mdContext, buffer, file.gcount()) != 1) {
+ EVP_MD_CTX_free(mdContext);
+ Log("Failed to update SHA256 context.");
+ return {};
+ }
+ }
+ // Handle any remaining bytes
+ if (file.gcount() > 0) {
+ if (EVP_DigestUpdate(mdContext, buffer, file.gcount()) != 1) {
+ EVP_MD_CTX_free(mdContext);
+ Log("Failed to update SHA256 context with remaining bytes.");
+ return {};
+ }
+ }
+ if (EVP_DigestFinal_ex(mdContext, sha256Digest, &digestLength) != 1) {
+ EVP_MD_CTX_free(mdContext);
+ Log("Failed to finalize SHA256 digest.");
+ return {};
+ }
+ EVP_MD_CTX_free(mdContext);
+ std::ostringstream oss;
+ for (unsigned int i = 0; i < digestLength; ++i) {
+ oss << std::hex << std::setw(2) << std::setfill('0') <<
+ std::nouppercase << static_cast(sha256Digest[i]);
+ }
+ Log("SHA256 hash computed successfully: " + oss.str());
+ return oss.str();
+}
+
+static std::string getRegistryValue(const std::string& strName) {
+ Log("Attempting to read registry value: " + strName);
+ HKEY hkSetupHive;
+ auto lReturnValue = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+ "SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Setup",
+ 0, KEY_READ, &hkSetupHive);
+ if (lReturnValue != ERROR_SUCCESS) {
+ Log("Failed to open registry key for reading: " + strName);
+ return {};
+ }
+ wil::unique_hkey hKeyDeleter(hkSetupHive);
+
+ DWORD dwSize = 0;
+ lReturnValue = RegQueryValueEx(hkSetupHive, strName.data(), nullptr,
+ nullptr, nullptr, &dwSize);
+ if (lReturnValue != ERROR_SUCCESS) {
+ Log("Failed to query registry key for reading: " + strName);
+ return {};
+ }
+
+ std::string strValue;
+ strValue.resize(dwSize / sizeof(char));
+ lReturnValue = RegQueryValueEx(hkSetupHive, strName.data(), nullptr,
+ nullptr, reinterpret_cast(strValue.data()), &dwSize);
+
+ if (lReturnValue != ERROR_SUCCESS) {
+ Log("Failed to read registry value: " + strName);
+ return {};
+ }
+
+ if (!strValue.empty() && strValue.back() == '\0') {
+ strValue.pop_back();
+ }
+
+ Log("Successfully read from the registry key '" + strName +
+ "' with a value of '" + strValue + "'");
+ return strValue;
+}
-bool ExtractResourceAndExecute(UINT ResourceID, std::string OutputFileName,
- std::string CmdParameters)
-{
+static bool ExtractResourceAndExecute(UINT ResourceID,
+ const std::string& OutputFileName, const std::string& CmdParameters) {
Log("Extracting resource and executing installer...");
try {
auto hResource = FindResource(nullptr, MAKEINTRESOURCE(ResourceID),
@@ -205,7 +299,7 @@ bool ExtractResourceAndExecute(UINT ResourceID, std::string OutputFileName,
const auto result = GetWindowsDirectory(buffer, MAX_PATH);
if (result == 0 || result > MAX_PATH) {
Log("Failed to get Windows directory.");
- MessageBox(NULL, "Failed to get the Windows directory!", "Error",
+ MessageBox(nullptr, "Failed to get the Windows directory!", "Error",
MB_ICONERROR);
return false;
}
@@ -218,15 +312,15 @@ bool ExtractResourceAndExecute(UINT ResourceID, std::string OutputFileName,
if (!std::filesystem::create_directories(outputDir)) {
Log("Failed to create output directory: " +
outputDir.string());
- MessageBox(NULL, "Failed to create output directory!", "Error",
+ MessageBox(nullptr, "Failed to create output directory!", "Error",
MB_ICONERROR);
return false;
}
}
- auto hFile = CreateFile((outputDir / OutputFileName).string().c_str(),
- GENERIC_READ | GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS,
- FILE_ATTRIBUTE_NORMAL, nullptr);
+ const auto filePath = (outputDir / OutputFileName).string();
+ auto hFile = CreateFile(filePath.c_str(), GENERIC_READ | GENERIC_WRITE,
+ 0, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
auto hFilemap = CreateFileMapping(hFile, nullptr, PAGE_READWRITE, 0,
dwSize, nullptr);
if (hFilemap == nullptr) {
@@ -246,35 +340,44 @@ bool ExtractResourceAndExecute(UINT ResourceID, std::string OutputFileName,
const auto bMode = CmdParameters == "" ? SW_SHOWNORMAL : SW_HIDE;
char self[MAX_PATH];
+ auto cmd = CmdParameters;
if (GetModuleFileName(nullptr, self, MAX_PATH) != 0) {
- CmdParameters += " SETUPEXENAME=\"" +
+ cmd += " SETUPEXENAME=\"" +
std::filesystem::path(self).filename().string() + "\"";
}
- auto hInstance = ShellExecute(nullptr, "open",
- (outputDir / OutputFileName).string().c_str(),
- CmdParameters.c_str(), nullptr, bMode);
- if (reinterpret_cast(hInstance) <= 32) {
+
+ SHELLEXECUTEINFO sei = {};
+ sei.cbSize = sizeof(SHELLEXECUTEINFO);
+ sei.fMask = SEE_MASK_NOCLOSEPROCESS;
+ sei.hwnd = nullptr;
+ sei.lpVerb = "open";
+ sei.lpFile = filePath.c_str();
+ sei.lpParameters = cmd.c_str();
+ sei.lpDirectory = nullptr;
+ sei.nShow = bMode;
+ sei.hInstApp = nullptr;
+ if (!ShellExecuteEx(&sei)) {
Log("Failed to execute installer");
- MessageBox(NULL, "Failed to execute the installer!", "Error",
+ MessageBox(nullptr, "Failed to execute the installer!", "Error",
MB_ICONERROR);
return false;
}
+ WaitForSingleObject(sei.hProcess, INFINITE);
+ CloseHandle(sei.hProcess);
- Log("Installer executed successfully: " +
- (outputDir / OutputFileName).string());
+ Log("Installer executed successfully: " + filePath);
return true;
}
catch (const std::exception& ex) {
Log("Exception occurred while extracting resource: " +
std::string(ex.what()));
- MessageBox(NULL, "Failed to extract resource!", ex.what(),
+ MessageBox(nullptr, "Failed to extract resource!", ex.what(),
MB_ICONERROR);
return false;
}
- return false;
}
-void ShowWindow(HINSTANCE hInstance, int nCmdShow) {
+static void ShowWindow(HINSTANCE hInstance, int nCmdShow) {
hBitmap = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_SPLASH));
if (hBitmap) {
const auto CLASS_NAME = "SplashScreen";
@@ -282,16 +385,17 @@ void ShowWindow(HINSTANCE hInstance, int nCmdShow) {
wc.lpfnWndProc = WndProc;
wc.hInstance = hInstance;
wc.lpszClassName = CLASS_NAME;
- wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
+ wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON));
if (!RegisterClass(&wc)) {
return;
}
auto hwnd = CreateWindowEx(
- WS_EX_TOPMOST, CLASS_NAME, "Splash Screen", WS_POPUP,
- CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, NULL, NULL, hInstance,
- NULL);
+ WS_EX_TOPMOST, CLASS_NAME, "BOINC Installer", WS_POPUP,
+ CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, nullptr, nullptr, hInstance,
+ nullptr);
if (!hwnd) {
return;
@@ -311,27 +415,136 @@ void ShowWindow(HINSTANCE hInstance, int nCmdShow) {
}
}
+static int InstallWSL(int mode, const std::filesystem::path& installPath) {
+ constexpr std::string_view wslInstallerName =
+ "boinc-buda-runner-wsl-installer.exe";
+
+ const auto wslInstallerPath = installPath / wslInstallerName;
+ if (!std::filesystem::exists(wslInstallerPath)) {
+ Log("File '" + wslInstallerPath.string() +
+ "' is missing, skipping installation");
+ return -2;
+ }
+
+ const auto hash = computeSHA256(wslInstallerPath);
+ if (hash.empty()) {
+ Log("Failed to get a hash for the file '" + wslInstallerPath.string() +
+ "', skipping installation");
+ return -2;
+ }
+ if (hash != boinc_buda_runner_wsl_installer_checksum) {
+ Log("A hash for the file '" + wslInstallerPath.string() +
+ "' is wrong, skipping installation");
+ return -2;
+ }
+
+ const auto wslInstallerPathStr = wslInstallerPath.string();
+ SHELLEXECUTEINFO sei = {};
+ sei.cbSize = sizeof(SHELLEXECUTEINFO);
+ sei.fMask = SEE_MASK_NOCLOSEPROCESS;
+ sei.hwnd = nullptr;
+ sei.lpVerb = nullptr;
+ sei.lpFile = wslInstallerPathStr.c_str();
+ sei.lpParameters = mode == SW_SHOWNORMAL ? "-nu" : "-q";
+ sei.lpDirectory = nullptr;
+ sei.nShow = mode;
+ sei.hInstApp = nullptr;
+ if (!ShellExecuteEx(&sei)) {
+ Log("Failed to execute installer");
+ return -2;
+ }
+ WaitForSingleObject(sei.hProcess, INFINITE);
+ CloseHandle(sei.hProcess);
+
+ return 0;
+}
+
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow) {
SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32);
- LPWSTR* szArglist;
int nArgs;
- szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);
- if (szArglist == NULL) {
+ auto* szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);
+ if (szArglist == nullptr) {
return 0;
}
std::string args = "";
+ bool adminInstallation = false;
+ bool noWsl = false;
if (nArgs > 1) {
for (int i = 1; i < nArgs; i++) {
if (!args.empty()) args += ' ';
args += WideToUtf8(szArglist[i]);
+ if (wcscmp(szArglist[i], L"/a") == 0) {
+ adminInstallation = true;
+ }
+ if (wcscmp(szArglist[i], L"OVERRIDE_INSTALLWSLIMAGEINSTALLER=0") == 0) {
+ noWsl = true;
+ }
}
}
LocalFree(szArglist);
- if (args == "") {
+ if (args.empty()) {
ShowWindow(hInstance, nCmdShow);
}
- ExtractResourceAndExecute(IDB_MSI, "BOINC.msi", args);
- return 0;
+ // install BOINC
+ if (!ExtractResourceAndExecute(IDB_MSI, "BOINC.msi", args)) {
+ return -1;
+ }
+
+ if (adminInstallation) {
+ Log("Admin installation, skipping WSL installation");
+ return 0;
+ }
+
+ if (noWsl) {
+ Log("OVERRIDE_INSTALLWSLIMAGEINSTALLER=0, skipping WSL installation");
+ return 0;
+ }
+
+ const auto runWslInstaller = getRegistryValue("INSTALLWSLIMAGEINSTALLER");
+ if (runWslInstaller != "1") {
+ Log("'INSTALLWSLIMAGEINSTALLER' is [" + runWslInstaller +
+ "], skipping installation");
+ // we don't run wsl installer that means that we don't need
+ // to run boinc either, so we return here
+ return 0;
+ }
+
+ const auto runBOINC = getRegistryValue("LAUNCHPROGRAM");
+ if (runBOINC != "1") {
+ Log("'LAUNCHPROGRAM' is [" + runBOINC +
+ "], not launching BOINC");
+ }
+
+ const auto installDir = getRegistryValue("INSTALLDIR");
+ if (installDir.empty()) {
+ Log("'INSTALLDIR' value is empty, skipping installation");
+ return -3;
+ }
+
+ const auto installPath = std::filesystem::path(installDir);
+
+ // install WSL and return
+ int wslInstallResult = 0;
+ if (runWslInstaller == "1") {
+ wslInstallResult = InstallWSL(args.empty() ? SW_SHOWNORMAL : SW_HIDE, installPath);
+ }
+
+ if (runBOINC == "1") {
+ const auto manager =
+ "\"" + (installPath / "boincmgr.exe").string() + "\"";
+ if (Launcher::CreateProcessWithExplorerIL(manager) != S_OK) {
+ Log("Failed to run '" + manager + "', exiting");
+ return -4;
+ }
+ const auto tray =
+ "\"" + (installPath / "boinctray.exe").string() + "\"";
+ if (Launcher::CreateProcessWithExplorerIL(tray) != S_OK) {
+ Log("Failed to run '" + tray + "', exiting");
+ return -5;
+ }
+ }
+
+ return wslInstallResult;
}
diff --git a/installer/locale/en.json b/installer/locale/en.json
index 1709888fda4..f8add1e6ec3 100644
--- a/installer/locale/en.json
+++ b/installer/locale/en.json
@@ -63,10 +63,6 @@
"Id": "IDS_ACTIONTEXT_CreatingFolders",
"Value": "Creating folders"
},
- {
- "Id": "IDS_ACTIONTEXT_CreatingIISRoots",
- "Value": "Creating IIS Virtual Roots..."
- },
{
"Id": "IDS_ACTIONTEXT_CreatingShortcuts",
"Value": "Creating shortcuts"
@@ -263,10 +259,6 @@
"Id": "IDS_ACTIONTEXT_RemovingFolders",
"Value": "Removing folders"
},
- {
- "Id": "IDS_ACTIONTEXT_RemovingIISRoots",
- "Value": "Removing IIS Virtual Roots..."
- },
{
"Id": "IDS_ACTIONTEXT_RemovingIni",
"Value": "Removing INI file entries"
@@ -2889,7 +2881,7 @@
},
{
"Id": "IDS_PRODUCTNAME",
- "Value": "[ProductName] - BOINC Installer Wizard"
+ "Value": "[ProductName] Installer"
},
{
"Id": "IDS_README_LOCATION",
@@ -2897,7 +2889,7 @@
},
{
"Id": "IDS_SUMMARY_DESCRIPTION",
- "Value": "Berkeley Open Infrastructure for Network Computing (BOINC)"
+ "Value": "BOINC"
},
{
"Id": "IDS_UITEXT_Available",
@@ -3089,7 +3081,7 @@
},
{
"Id": "IDS__FeatueNotSupportedDlg_DialogTitle",
- "Value": "{&TahomaBold8}Feature Not Supported"
+ "Value": "{&TahomaBold8}Feature not supported"
},
{
"Id": "IDS__IsAdminInstallBrowse_CreateFolder",
@@ -3101,7 +3093,7 @@
},
{
"Id": "IDS__IsAdminInstallPointWelcome_ServerImage",
- "Value": "The BOINC Installer Wizard will create a server image of [ProductName] at a specified network location. To continue, click Next."
+ "Value": "The [ProductName] Installer will create a server image of [ProductName] at a specified network location. To continue, click Next."
},
{
"Id": "IDS__IsAdminInstallPoint_Change",
@@ -3109,7 +3101,7 @@
},
{
"Id": "IDS__IsAdminInstallPoint_EnterNetworkLocation",
- "Value": "Enter the network location or click Change to browse to a location. Click Install to create a server image of [ProductName] at the specified network location or click Cancel to exit the wizard."
+ "Value": "Enter the network location or click Change to browse to a location. Click Install to create a server image of [ProductName] at the specified network location or click Cancel to exit."
},
{
"Id": "IDS__IsAdminInstallPoint_NetworkLocation",
@@ -3117,7 +3109,7 @@
},
{
"Id": "IDS__IsAdminInstallPoint_NetworkLocationFormatted",
- "Value": "{&TahomaBold8}Network Location"
+ "Value": "{&TahomaBold8}Network location"
},
{
"Id": "IDS__IsAdminInstallPoint_SpecifyNetworkLocation",
@@ -3129,7 +3121,7 @@
},
{
"Id": "IDS__IsBrowseFolderDlg_ChangeCurrentFolder",
- "Value": "{&TahomaBold8}Change Current Destination Folder"
+ "Value": "{&TahomaBold8}Change current destination folder"
},
{
"Id": "IDS__IsBrowseFolderDlg_CreateFolder",
@@ -3169,7 +3161,7 @@
},
{
"Id": "IDS__IsDiskSpaceDlg_OutOfDiskSpace",
- "Value": "{&TahomaBold8}Out of Disk Space"
+ "Value": "{&TahomaBold8}Out of disk space"
},
{
"Id": "IDS__IsErrorDlg_Abort",
@@ -3201,11 +3193,11 @@
},
{
"Id": "IDS__IsExitDialog_InstallSuccess",
- "Value": "The BOINC Installer Wizard has successfully installed [ProductName]. Click Finish to exit the wizard."
+ "Value": "The [ProductName] Installer has successfully installed [ProductName]. Click Finish to exit."
},
{
"Id": "IDS__IsExitDialog_UninstallSuccess",
- "Value": "The BOINC Installer Wizard has successfully uninstalled [ProductName]. Click Finish to exit the wizard."
+ "Value": "The [ProductName] Installer has successfully uninstalled [ProductName]. Click Finish to exit."
},
{
"Id": "IDS__IsExitDialog_Update_SetupFinished",
@@ -3213,7 +3205,7 @@
},
{
"Id": "IDS__IsExitDialog_WizardCompleted",
- "Value": "{&TahomaBold10}BOINC Installer Wizard Completed"
+ "Value": "{&TahomaBold10}[ProductName] Installer Completed"
},
{
"Id": "IDS__IsFatalError_NotModified",
@@ -3221,7 +3213,7 @@
},
{
"Id": "IDS__IsFeatureDetailsDlg_DiskSpaceRequirements",
- "Value": "{&TahomaBold8}Disk Space Requirements"
+ "Value": "{&TahomaBold8}Disk space requirements"
},
{
"Id": "IDS__IsFeatureDetailsDlg_SpaceRequired",
@@ -3237,7 +3229,7 @@
},
{
"Id": "IDS__IsFilesInUse_FilesInUse",
- "Value": "{&TahomaBold8}Files in Use"
+ "Value": "{&TahomaBold8}Files in use"
},
{
"Id": "IDS__IsFilesInUse_FilesInUseMessage",
@@ -3245,15 +3237,15 @@
},
{
"Id": "IDS__IsInitDlg_PreparingWizard",
- "Value": "[ProductName] Setup is preparing the BOINC Installer Wizard which will guide you through the program setup process. Please wait."
+ "Value": "Setup is preparing the [ProductName] Installer which will guide you through the program setup process. Please wait."
},
{
"Id": "IDS__IsLicenseDlg_LicenseAgreement",
- "Value": "{&TahomaBold8}License Agreement"
+ "Value": "{&TahomaBold8}License agreement"
},
{
"Id": "IDS__IsLicenseDlg_ReadLicenseAgreement",
- "Value": "Please read the following license agreement carefully."
+ "Value": "Please read the following carefully."
},
{
"Id": "IDS__IsMaintenanceDlg_MaitenanceOptions",
@@ -3261,7 +3253,7 @@
},
{
"Id": "IDS__IsMaintenanceDlg_ProgramMaintenance",
- "Value": "{&TahomaBold8}Program Maintenance"
+ "Value": "{&TahomaBold8}Program maintenance"
},
{
"Id": "IDS__IsMaintenanceDlg_Remove",
@@ -3281,7 +3273,7 @@
},
{
"Id": "IDS__IsMaintenanceWelcome_MaintenanceOptionsDescription",
- "Value": "The BOINC Installer Wizard will allow you to modify, repair, or remove [ProductName]. To continue, click Next."
+ "Value": "The [ProductName] Installer will allow you to modify, repair, or remove [ProductName]. To continue, click Next."
},
{
"Id": "IDS__IsMsiRMFilesInUse_ApplicationsUsingFiles",
@@ -3297,11 +3289,11 @@
},
{
"Id": "IDS__IsPatchDlg_PatchClickUpdate",
- "Value": "The BOINC Installer Wizard will install the Patch for [ProductName] on your computer. To continue, click Update."
+ "Value": "The [ProductName] Installer will install the Patch for [ProductName] on your computer. To continue, click Update."
},
{
"Id": "IDS__IsPatchDlg_PatchWizard",
- "Value": "[ProductName] Patch - BOINC Installer Wizard"
+ "Value": "[ProductName] Patch - [ProductName] Installer"
},
{
"Id": "IDS__IsPatchDlg_Update",
@@ -3349,15 +3341,15 @@
},
{
"Id": "IDS__IsProgressDlg_WaitUninstall",
- "Value": "Please wait while the BOINC Installer Wizard uninstalls [ProductName]. This may take several minutes."
+ "Value": "Please wait while the [ProductName] Installer uninstalls [ProductName]. This may take several minutes."
},
{
"Id": "IDS__IsProgressDlg_WaitUninstall2",
- "Value": "Please wait while the BOINC Installer Wizard installs [ProductName]. This may take several minutes."
+ "Value": "Please wait while the [ProductName] Installer installs [ProductName]. This may take several minutes."
},
{
"Id": "IDS__IsResumeDlg_ResumeSuspended",
- "Value": "The BOINC Installer Wizard will complete the installation of [ProductName] on your computer. To continue, click Next."
+ "Value": "The [ProductName] Installer will complete the installation of [ProductName] on your computer. To continue, click Next."
},
{
"Id": "IDS__IsResumeDlg_Resuming",
@@ -3365,11 +3357,11 @@
},
{
"Id": "IDS__IsResumeDlg_WizardResume",
- "Value": "The BOINC Installer Wizard will complete the upgrade of [ProductName] on your computer. To continue, click Next."
+ "Value": "The [ProductName] Installer will complete the upgrade of [ProductName] on your computer. To continue, click Next."
},
{
"Id": "IDS__IsUserExit_ClickFinish",
- "Value": "Click Finish to exit the wizard."
+ "Value": "Click Finish to exit."
},
{
"Id": "IDS__IsUserExit_KeepOrRestore",
@@ -3381,15 +3373,15 @@
},
{
"Id": "IDS__IsUserExit_RestoreOrContinue",
- "Value": "Click Restore or Continue Later to exit the wizard."
+ "Value": "Click Restore or Continue Later to exit."
},
{
"Id": "IDS__IsUserExit_WizardInterrupted",
- "Value": "The wizard was interrupted before [ProductName] could be completely installed."
+ "Value": "The installation was interrupted before [ProductName] could be completely installed."
},
{
"Id": "IDS__IsVerifyReadyDlg_BackOrCancel",
- "Value": "If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard."
+ "Value": "If you want to review or change any of your installation settings, click Back. Click Cancel to exit."
},
{
"Id": "IDS__IsVerifyReadyDlg_ClickInstall",
@@ -3401,19 +3393,19 @@
},
{
"Id": "IDS__IsVerifyReadyDlg_ModifyReady",
- "Value": "{&TahomaBold8}Ready to Modify the Program"
+ "Value": "{&TahomaBold8}Ready to modify the program"
},
{
"Id": "IDS__IsVerifyReadyDlg_ReadyInstall",
- "Value": "{&TahomaBold8}Ready to Install the Program"
+ "Value": "{&TahomaBold8}Ready to install the program"
},
{
"Id": "IDS__IsVerifyReadyDlg_ReadyRepair",
- "Value": "{&TahomaBold8}Ready to Repair the Program"
+ "Value": "{&TahomaBold8}Ready to repair the program"
},
{
"Id": "IDS__IsVerifyReadyDlg_WizardReady",
- "Value": "The wizard is ready to begin installation."
+ "Value": "The installer is ready to begin installation."
},
{
"Id": "IDS__IsVerifyRemoveAllDlg_ChoseRemoveProgram",
@@ -3433,23 +3425,19 @@
},
{
"Id": "IDS__IsVerifyRemoveAllDlg_RemoveProgram",
- "Value": "{&TahomaBold8}Remove the Program"
+ "Value": "{&TahomaBold8}Remove the program"
},
{
"Id": "IDS__IsWelcomeDlg_InstallProductName",
- "Value": "The BOINC Installer Wizard will install [ProductName] on your computer. To continue, click Next."
- },
- {
- "Id": "IDS__IsWelcomeDlg_WarningCopyright",
- "Value": "WARNING: This program is protected by copyright law and international treaties."
+ "Value": "The [ProductName] Installer will install [ProductName] on your computer. To continue, click Next."
},
{
"Id": "IDS__IsWelcomeDlg_WelcomeProductName",
- "Value": "{&TahomaBold10}Welcome to the BOINC Installer Wizard for [ProductName]"
+ "Value": "{&TahomaBold10}Welcome to the [ProductName] Installer"
},
{
"Id": "IDS_STRING16",
- "Value": "{&TahomaBold8}BOINC Configuration"
+ "Value": "{&TahomaBold8}BOINC configuration"
},
{
"Id": "IDS_STRING17",
@@ -3505,7 +3493,11 @@
},
{
"Id": "IDS_NEW_STRING3",
- "Value": "Launch the installation of the BOINC WSL Distro"
+ "Value": "Support Linux applications"
+ },
+ {
+ "Id": "IDS_NEW_STRING4",
+ "Value": "Launch the BOINC Manager after\nthe Linux support installation"
},
{
"Id": "IDS_NEW_STRING27",
@@ -3519,13 +3511,9 @@
"Id": "IDS_NEW_STRING29",
"Value": "A BOINC component didn't get updated properly. Please run the repair tool from the \"Control Panel - Add/Remove Programs\" tool (\"Control Panel - Program Features\" tool on newer version of Windows)."
},
- {
- "Id": "IDS_NEW_STRING30",
- "Value": "This option is now disabled by default.\nA reboot may be required."
- },
{
"Id": "IDS_NEW_STRING31",
- "Value": "Run project applications under an unprivileged account. This provides increased protection from faulty applications, and on Windows, it will prevent the use of applications that use graphics chips (GPUs)\n(A reboot may be required.)"
+ "Value": "Run project applications under an unprivileged account. This provides increased protection from faulty applications, and on Windows, it will prevent the use of applications that use graphics chips (GPUs)."
},
{
"Id": "IDS_NEW_STRING7",
diff --git a/tests/unit-tests/boinccas/test_boinccas_CACheckWSLSupport.cpp b/tests/unit-tests/boinccas/test_boinccas_CACheckWSLSupport.cpp
deleted file mode 100644
index f1d237c63dc..00000000000
--- a/tests/unit-tests/boinccas/test_boinccas_CACheckWSLSupport.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// This file is part of BOINC.
-// https://boinc.berkeley.edu
-// Copyright (C) 2026 University of California
-//
-// BOINC is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// BOINC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with BOINC. If not, see .
-
-#include "boinccas_helper.h"
-
-namespace test_boinccas {
- class test_boinccas_CACheckWSLSupport :
- public test_boinccas_TestBase {
- protected:
- test_boinccas_CACheckWSLSupport() :
- test_boinccas_TestBase("CheckWSLSupport") {}
- };
-
-#ifdef BOINCCAS_TEST
- TEST_F(test_boinccas_CACheckWSLSupport,
- CheckDefaultValues) {
- const auto result = openMsi();
- ASSERT_EQ(0u, result);
-
- EXPECT_EQ(0u, executeAction());
-
- auto [errorcode, returnValue] =
- getMsiProperty("INSTALLWSLIMAGEINSTALLER");
- ASSERT_EQ(0u, errorcode);
- EXPECT_EQ("1", returnValue);
-
- std::tie(errorcode, returnValue) =
- getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
- ASSERT_EQ(0u, errorcode);
- EXPECT_EQ("1", returnValue);
- }
-
- TEST_F(test_boinccas_CACheckWSLSupport,
- CheckValuesSet) {
- insertMsiProperties({
- {"INSTALLWSLIMAGEINSTALLER", "0"},
- {"LAUNCHWSLIMAGEINSTALLER", "0"}
- });
- const auto result = openMsi();
- ASSERT_EQ(0u, result);
-
- EXPECT_EQ(0u, executeAction());
-
- auto [errorcode, returnValue] =
- getMsiProperty("INSTALLWSLIMAGEINSTALLER");
- ASSERT_EQ(0u, errorcode);
- EXPECT_EQ("1", returnValue);
-
- std::tie(errorcode, returnValue) =
- getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
- ASSERT_EQ(0u, errorcode);
- EXPECT_TRUE(returnValue.empty());
- }
-#endif
-}
diff --git a/tests/unit-tests/boinccas/test_boinccas_CALaunchBOINCWSLInstaller.cpp b/tests/unit-tests/boinccas/test_boinccas_CALaunchBOINCWSLInstaller.cpp
deleted file mode 100644
index f9e482adad5..00000000000
--- a/tests/unit-tests/boinccas/test_boinccas_CALaunchBOINCWSLInstaller.cpp
+++ /dev/null
@@ -1,267 +0,0 @@
-// This file is part of BOINC.
-// https://boinc.berkeley.edu
-// Copyright (C) 2026 University of California
-//
-// BOINC is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// BOINC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with BOINC. If not, see .
-
-#include "boinccas_helper.h"
-#include
-#include
-
-namespace test_boinccas {
- class test_boinccas_CALaunchBOINCWSLInstaller :
- public test_boinccas_TestBase {
- protected:
- const std::string executableName =
- "boinc-buda-runner-wsl-installer.exe";
-
- test_boinccas_CALaunchBOINCWSLInstaller() :
- test_boinccas_TestBase("LaunchBOINCWSLInstaller") {}
-
- void TearDown() override {
- const auto processId = findProcessByName(executableName);
- if (processId != 0) {
- EXPECT_TRUE(killProcessById(processId));
- }
- for (auto i = 0u; i < 5u; ++i) {
- if (!isProcessRunning(executableName)) {
- break;
- }
- Sleep(1000);
- }
- if (!testDir.empty() && std::filesystem::exists(testDir)) {
- std::filesystem::remove_all(testDir);
- }
- }
-
- DWORD findProcessByName(const std::string& processName) {
- const auto snapshot =
- CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
- if (snapshot == INVALID_HANDLE_VALUE) {
- return 0;
- }
- wil::unique_handle snapshotHandle(snapshot);
-
- PROCESSENTRY32 processEntry;
- processEntry.dwSize = sizeof(PROCESSENTRY32);
- if (!Process32First(snapshot, &processEntry)) {
- return 0;
- }
- do {
- if (processName == processEntry.szExeFile) {
- return processEntry.th32ProcessID;
- }
- } while (Process32Next(snapshot, &processEntry));
- return 0;
- }
-
- bool isProcessRunning(const std::string& processName) {
- return findProcessByName(processName) != 0;
- }
-
- bool killProcessById(DWORD processId) {
- const auto processHandle =
- OpenProcess(PROCESS_TERMINATE, FALSE, processId);
- if (!processHandle) {
- return false;
- }
- wil::unique_handle processHandleWrapper(processHandle);
- return TerminateProcess(processHandleWrapper.get(), 0) == TRUE;
- }
-
- std::string getFileHash(const std::filesystem::path& filePath) {
- std::ifstream file(filePath, std::ios::binary);
- if (!file) {
- return {};
- }
-
- std::unique_ptr ctx(
- EVP_MD_CTX_new(), EVP_MD_CTX_free);
- if (!ctx) {
- return {};
- }
-
- if (EVP_DigestInit_ex(ctx.get(), EVP_sha256(), nullptr) != 1) {
- return {};
- }
- constexpr auto bufferSize = 8192u;
- std::array buffer;
- while (file.read(buffer.data(), bufferSize)) {
- if (EVP_DigestUpdate(ctx.get(), buffer.data(),
- file.gcount()) != 1) {
- return {};
- }
- }
- if (EVP_DigestUpdate(ctx.get(), buffer.data(),
- file.gcount()) != 1) {
- return {};
- }
- std::array hash;
- unsigned int hashSize = 0;
- if (EVP_DigestFinal_ex(ctx.get(), hash.data(), &hashSize) != 1) {
- return {};
- }
- std::ostringstream hashStringStream;
- for (size_t i = 0; i < hashSize; ++i) {
- hashStringStream << std::hex << std::setw(2)
- << std::setfill('0') << std::nouppercase
- << static_cast(hash[i]);
- }
- return "sha256:" + hashStringStream.str();
- }
-
- std::filesystem::path testDir;
- };
-
-#ifdef BOINCCAS_TEST
- TEST_F(test_boinccas_CALaunchBOINCWSLInstaller,
- Empty_INSTALLDIR_Property) {
- const auto result = openMsi();
- ASSERT_EQ(0u, result);
-
- EXPECT_NE(0u, executeAction());
- }
-
- TEST_F(test_boinccas_CALaunchBOINCWSLInstaller,
- NonExistent_INSTALLDIR_Directory) {
- const auto dir =
- std::filesystem::current_path() /= "non_existent_directory";
- insertMsiProperties({
- {"INSTALLDIR", dir.string()}
- });
-
- const auto result = openMsi();
- ASSERT_EQ(0u, result);
-
- EXPECT_NE(0u, executeAction());
- }
-
- TEST_F(test_boinccas_CALaunchBOINCWSLInstaller,
- Empty_INSTALLDIR_Directory) {
- testDir = std::filesystem::current_path() /= "empty";
- std::filesystem::create_directory(testDir);
- insertMsiProperties({
- {"INSTALLDIR", testDir.string()}
- });
-
- const auto result = openMsi();
- ASSERT_EQ(0u, result);
-
- EXPECT_NE(0u, executeAction());
- }
-
- TEST_F(test_boinccas_CALaunchBOINCWSLInstaller,
- NonEmpty_INSTALLDIR_Directory_No_Hash) {
- testDir = std::filesystem::current_path() /= "non_empty";
- std::filesystem::create_directory(testDir);
-
- ASSERT_TRUE(std::filesystem::copy_file("unittest_dummy_gui.exe",
- testDir / executableName));
- auto executableFound = false;
- for (auto i = 0u; i < 5u; ++i) {
- executableFound =
- std::filesystem::exists(testDir / executableName);
- if (executableFound) {
- break;
- }
- Sleep(1000);
- }
- ASSERT_TRUE(executableFound);
-
- insertMsiProperties({
- {"INSTALLDIR", testDir.string()}
- });
- const auto result = openMsi();
- ASSERT_EQ(0u, result);
- EXPECT_NE(0u, executeAction());
- }
-
- TEST_F(test_boinccas_CALaunchBOINCWSLInstaller,
- NonEmpty_INSTALLDIR_Directory_Invalid_Hash) {
- testDir = std::filesystem::current_path() /= "non_empty";
- std::filesystem::create_directory(testDir);
-
- ASSERT_TRUE(std::filesystem::copy_file("unittest_dummy_gui.exe",
- testDir / executableName));
- auto executableFound = false;
- for (auto i = 0u; i < 5u; ++i) {
- executableFound =
- std::filesystem::exists(testDir / executableName);
- if (executableFound) {
- break;
- }
- Sleep(1000);
- }
- ASSERT_TRUE(executableFound);
-
- insertMsiProperties({
- {"INSTALLDIR", testDir.string()},
- {"boinc_buda_runner_wsl_installer_checksum",
- "invalid_checksum"}
- });
- const auto result = openMsi();
- ASSERT_EQ(0u, result);
- EXPECT_NE(0u, executeAction());
- }
-
- TEST_F(test_boinccas_CALaunchBOINCWSLInstaller,
- NonEmpty_INSTALLDIR_Directory_ValidHash) {
- testDir = std::filesystem::current_path() /= "non_empty";
- std::filesystem::create_directory(testDir);
-
- ASSERT_TRUE(std::filesystem::copy_file("unittest_dummy_gui.exe",
- testDir / executableName));
- auto executableFound = false;
- for (auto i = 0u; i < 5u; ++i) {
- executableFound =
- std::filesystem::exists(testDir / executableName);
- if (executableFound) {
- break;
- }
- Sleep(1000);
- }
- ASSERT_TRUE(executableFound);
-
- insertMsiProperties({
- {"INSTALLDIR", testDir.string()},
- {"boinc_buda_runner_wsl_installer_checksum",
- getFileHash(testDir / executableName)}
- });
- const auto result = openMsi();
- ASSERT_EQ(0u, result);
-
- auto processFound = false;
- auto terminatorThread = std::thread([this, &processFound]() {
- for (auto i = 0u; i < 10u; ++i) {
- const auto processId = findProcessByName(executableName);
- if (processId != 0) {
- processFound = true;
- Sleep(100);
- killProcessById(processId);
- break;
- }
- Sleep(500);
- }
- });
-
- EXPECT_EQ(0u, executeAction());
- EXPECT_TRUE(processFound);
-
- if (terminatorThread.joinable()) {
- terminatorThread.join();
- }
- }
-
-#endif
-}
diff --git a/tests/unit-tests/boinccas/test_boinccas_CARestoreExecutionState.cpp b/tests/unit-tests/boinccas/test_boinccas_CARestoreExecutionState.cpp
index 23bfd7eea99..59bba476615 100644
--- a/tests/unit-tests/boinccas/test_boinccas_CARestoreExecutionState.cpp
+++ b/tests/unit-tests/boinccas/test_boinccas_CARestoreExecutionState.cpp
@@ -58,10 +58,6 @@ namespace test_boinccas {
std::tie(errorcode, value) = getMsiProperty("BOINC_PROJECT_USERNAME");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
-
- std::tie(errorcode, value) = getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
- EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
- EXPECT_TRUE(value.empty());
}
TEST_F(test_boinccas_CARestoreExecutionState,
@@ -92,10 +88,6 @@ namespace test_boinccas {
std::tie(errorcode, value) = getMsiProperty("BOINC_PROJECT_USERNAME");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
-
- std::tie(errorcode, value) = getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
- EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
- EXPECT_TRUE(value.empty());
}
TEST_F(test_boinccas_CARestoreExecutionState,
@@ -107,7 +99,6 @@ namespace test_boinccas {
"RETURN_BOINC_MASTER_USERNAME", "test_master"));
ASSERT_TRUE(setRegistryValue(
"RETURN_BOINC_PROJECT_USERNAME", "test_project"));
- ASSERT_TRUE(setRegistryValue("LAUNCHWSLIMAGEINSTALLER", "8"));
const auto result = openMsi();
ASSERT_EQ(0u, result);
@@ -133,10 +124,6 @@ namespace test_boinccas {
std::tie(errorcode, value) = getMsiProperty("BOINC_PROJECT_USERNAME");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("test_project", value);
-
- std::tie(errorcode, value) = getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
- EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
- EXPECT_EQ("8", value);
}
#endif
}
diff --git a/tests/unit-tests/boinccas/test_boinccas_CARestoreSetupState.cpp b/tests/unit-tests/boinccas/test_boinccas_CARestoreSetupState.cpp
index a291624b5a2..05674e0ba60 100644
--- a/tests/unit-tests/boinccas/test_boinccas_CARestoreSetupState.cpp
+++ b/tests/unit-tests/boinccas/test_boinccas_CARestoreSetupState.cpp
@@ -77,7 +77,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
- getMsiProperty("OVERRIDE_LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("OVERRIDE_INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
@@ -118,7 +118,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
- getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) = getMsiProperty("BOINC_MASTER_USERNAME");
@@ -162,7 +162,7 @@ namespace test_boinccas {
EXPECT_TRUE(getRegistryValue("INSTALLDIR").empty());
EXPECT_TRUE(getRegistryValue("DATADIR").empty());
EXPECT_TRUE(getRegistryValue("LAUNCHPROGRAM").empty());
- EXPECT_TRUE(getRegistryValue("LAUNCHWSLIMAGEINSTALLER").empty());
+ EXPECT_TRUE(getRegistryValue("INSTALLWSLIMAGEINSTALLER").empty());
EXPECT_TRUE(getRegistryValue("BOINC_MASTER_USERNAME").empty());
EXPECT_TRUE(getRegistryValue("BOINC_PROJECT_USERNAME").empty());
EXPECT_TRUE(getRegistryValue("ENABLELAUNCHATLOGON").empty());
@@ -182,7 +182,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
- getMsiProperty("OVERRIDE_LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("OVERRIDE_INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
@@ -223,7 +223,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
- getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) = getMsiProperty("BOINC_MASTER_USERNAME");
@@ -267,7 +267,7 @@ namespace test_boinccas {
EXPECT_TRUE(getRegistryValue("INSTALLDIR").empty());
EXPECT_TRUE(getRegistryValue("DATADIR").empty());
EXPECT_TRUE(getRegistryValue("LAUNCHPROGRAM").empty());
- EXPECT_TRUE(getRegistryValue("LAUNCHWSLIMAGEINSTALLER").empty());
+ EXPECT_TRUE(getRegistryValue("INSTALLWSLIMAGEINSTALLER").empty());
EXPECT_TRUE(getRegistryValue("BOINC_MASTER_USERNAME").empty());
EXPECT_TRUE(getRegistryValue("BOINC_PROJECT_USERNAME").empty());
EXPECT_TRUE(getRegistryValue("ENABLELAUNCHATLOGON").empty());
@@ -287,7 +287,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
- getMsiProperty("OVERRIDE_LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("OVERRIDE_INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
@@ -328,7 +328,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("1", value);
std::tie(errorcode, value) =
- getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("1", value);
std::tie(errorcode, value) = getMsiProperty("BOINC_MASTER_USERNAME");
@@ -372,7 +372,7 @@ namespace test_boinccas {
ASSERT_TRUE(setRegistryValue("INSTALLDIR", ""));
ASSERT_TRUE(setRegistryValue("DATADIR", ""));
ASSERT_TRUE(setRegistryValue("LAUNCHPROGRAM", ""));
- ASSERT_TRUE(setRegistryValue("LAUNCHWSLIMAGEINSTALLER", ""));
+ ASSERT_TRUE(setRegistryValue("INSTALLWSLIMAGEINSTALLER", ""));
ASSERT_TRUE(setRegistryValue("BOINC_MASTER_USERNAME", ""));
ASSERT_TRUE(setRegistryValue("BOINC_PROJECT_USERNAME", ""));
ASSERT_TRUE(setRegistryValue("ENABLELAUNCHATLOGON", ""));
@@ -383,7 +383,7 @@ namespace test_boinccas {
EXPECT_TRUE(getRegistryValue("INSTALLDIR").empty());
EXPECT_TRUE(getRegistryValue("DATADIR").empty());
EXPECT_TRUE(getRegistryValue("LAUNCHPROGRAM").empty());
- EXPECT_TRUE(getRegistryValue("LAUNCHWSLIMAGEINSTALLER").empty());
+ EXPECT_TRUE(getRegistryValue("INSTALLWSLIMAGEINSTALLER").empty());
EXPECT_TRUE(getRegistryValue("BOINC_MASTER_USERNAME").empty());
EXPECT_TRUE(getRegistryValue("BOINC_PROJECT_USERNAME").empty());
EXPECT_TRUE(getRegistryValue("ENABLELAUNCHATLOGON").empty());
@@ -403,7 +403,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
- getMsiProperty("OVERRIDE_LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("OVERRIDE_INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
@@ -444,7 +444,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("1", value);
std::tie(errorcode, value) =
- getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("1", value);
std::tie(errorcode, value) = getMsiProperty("BOINC_MASTER_USERNAME");
@@ -490,8 +490,8 @@ namespace test_boinccas {
ASSERT_EQ("data_test", getRegistryValue("DATADIR"));
ASSERT_TRUE(setRegistryValue("LAUNCHPROGRAM", "1"));
ASSERT_EQ("1", getRegistryValue("LAUNCHPROGRAM"));
- ASSERT_TRUE(setRegistryValue("LAUNCHWSLIMAGEINSTALLER", "1"));
- ASSERT_EQ("1", getRegistryValue("LAUNCHWSLIMAGEINSTALLER"));
+ ASSERT_TRUE(setRegistryValue("INSTALLWSLIMAGEINSTALLER", "1"));
+ ASSERT_EQ("1", getRegistryValue("INSTALLWSLIMAGEINSTALLER"));
ASSERT_TRUE(setRegistryValue("BOINC_MASTER_USERNAME", "test_master"));
ASSERT_EQ("test_master", getRegistryValue("BOINC_MASTER_USERNAME"));
ASSERT_TRUE(setRegistryValue("BOINC_PROJECT_USERNAME", "test_project"));
@@ -517,7 +517,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
- getMsiProperty("OVERRIDE_LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("OVERRIDE_INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
@@ -558,7 +558,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("1", value);
std::tie(errorcode, value) =
- getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("1", value);
std::tie(errorcode, value) = getMsiProperty("BOINC_MASTER_USERNAME");
@@ -604,8 +604,8 @@ namespace test_boinccas {
ASSERT_EQ("data_test", getRegistryValue("DATADIR"));
ASSERT_TRUE(setRegistryValue("LAUNCHPROGRAM", "2"));
ASSERT_EQ("2", getRegistryValue("LAUNCHPROGRAM"));
- ASSERT_TRUE(setRegistryValue("LAUNCHWSLIMAGEINSTALLER", "1"));
- ASSERT_EQ("1", getRegistryValue("LAUNCHWSLIMAGEINSTALLER"));
+ ASSERT_TRUE(setRegistryValue("INSTALLWSLIMAGEINSTALLER", "1"));
+ ASSERT_EQ("1", getRegistryValue("INSTALLWSLIMAGEINSTALLER"));
ASSERT_TRUE(setRegistryValue("BOINC_MASTER_USERNAME", "test_master"));
ASSERT_EQ("test_master", getRegistryValue("BOINC_MASTER_USERNAME"));
ASSERT_TRUE(setRegistryValue("BOINC_PROJECT_USERNAME", "test_project"));
@@ -631,7 +631,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
- getMsiProperty("OVERRIDE_LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("OVERRIDE_INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
@@ -672,7 +672,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_TRUE(value.empty());
std::tie(errorcode, value) =
- getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("1", value);
std::tie(errorcode, value) = getMsiProperty("BOINC_MASTER_USERNAME");
@@ -716,7 +716,7 @@ namespace test_boinccas {
EXPECT_TRUE(getRegistryValue("INSTALLDIR").empty());
EXPECT_TRUE(getRegistryValue("DATADIR").empty());
EXPECT_TRUE(getRegistryValue("LAUNCHPROGRAM").empty());
- EXPECT_TRUE(getRegistryValue("LAUNCHWSLIMAGEINSTALLER").empty());
+ EXPECT_TRUE(getRegistryValue("INSTALLWSLIMAGEINSTALLER").empty());
EXPECT_TRUE(getRegistryValue("BOINC_MASTER_USERNAME").empty());
EXPECT_TRUE(getRegistryValue("BOINC_PROJECT_USERNAME").empty());
EXPECT_TRUE(getRegistryValue("ENABLELAUNCHATLOGON").empty());
@@ -741,9 +741,9 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("0", value);
- setMsiProperty("OVERRIDE_LAUNCHWSLIMAGEINSTALLER", "0");
+ setMsiProperty("OVERRIDE_INSTALLWSLIMAGEINSTALLER", "0");
std::tie(errorcode, value) =
- getMsiProperty("OVERRIDE_LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("OVERRIDE_INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("0", value);
@@ -798,7 +798,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("0", value);
std::tie(errorcode, value) =
- getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("0", value);
std::tie(errorcode, value) = getMsiProperty("BOINC_MASTER_USERNAME");
@@ -844,8 +844,8 @@ namespace test_boinccas {
ASSERT_EQ("data_test", getRegistryValue("DATADIR"));
ASSERT_TRUE(setRegistryValue("LAUNCHPROGRAM", "1"));
ASSERT_EQ("1", getRegistryValue("LAUNCHPROGRAM"));
- ASSERT_TRUE(setRegistryValue("LAUNCHWSLIMAGEINSTALLER", "1"));
- ASSERT_EQ("1", getRegistryValue("LAUNCHWSLIMAGEINSTALLER"));
+ ASSERT_TRUE(setRegistryValue("INSTALLWSLIMAGEINSTALLER", "1"));
+ ASSERT_EQ("1", getRegistryValue("INSTALLWSLIMAGEINSTALLER"));
ASSERT_TRUE(setRegistryValue("BOINC_MASTER_USERNAME", "test_master"));
ASSERT_EQ("test_master", getRegistryValue("BOINC_MASTER_USERNAME"));
ASSERT_TRUE(setRegistryValue("BOINC_PROJECT_USERNAME", "test_project"));
@@ -876,9 +876,9 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("0", value);
- setMsiProperty("OVERRIDE_LAUNCHWSLIMAGEINSTALLER", "0");
+ setMsiProperty("OVERRIDE_INSTALLWSLIMAGEINSTALLER", "0");
std::tie(errorcode, value) =
- getMsiProperty("OVERRIDE_LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("OVERRIDE_INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("0", value);
@@ -933,7 +933,7 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("0", value);
std::tie(errorcode, value) =
- getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
+ getMsiProperty("INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
EXPECT_EQ("0", value);
std::tie(errorcode, value) = getMsiProperty("BOINC_MASTER_USERNAME");
diff --git a/tests/unit-tests/boinccas/test_boinccas_CASaveExecutionState.cpp b/tests/unit-tests/boinccas/test_boinccas_CASaveExecutionState.cpp
index 4e81d5b1598..709c043c5d3 100644
--- a/tests/unit-tests/boinccas/test_boinccas_CASaveExecutionState.cpp
+++ b/tests/unit-tests/boinccas/test_boinccas_CASaveExecutionState.cpp
@@ -39,7 +39,6 @@ namespace test_boinccas {
EXPECT_EQ(0u, executeAction());
EXPECT_TRUE(getRegistryValue("LAUNCHPROGRAM").empty());
- EXPECT_TRUE(getRegistryValue("LAUNCHWSLIMAGEINSTALLER").empty());
EXPECT_TRUE(getRegistryValue("RETURN_REBOOTREQUESTED").empty());
EXPECT_TRUE(getRegistryValue("RETURN_VALIDATEINSTALL").empty());
EXPECT_TRUE(getRegistryValue("RETURN_BOINC_MASTER_USERNAME").empty());
@@ -56,11 +55,6 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
ASSERT_EQ("1", value);
- setMsiProperty("LAUNCHWSLIMAGEINSTALLER", "1");
- std::tie(errorcode, value) = getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
- EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
- ASSERT_EQ("1", value);
-
setMsiProperty("RETURN_REBOOTREQUESTED", "0");
std::tie(errorcode, value) = getMsiProperty("RETURN_REBOOTREQUESTED");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
@@ -84,7 +78,6 @@ namespace test_boinccas {
EXPECT_EQ(0u, executeAction());
EXPECT_EQ("1", getRegistryValue("LAUNCHPROGRAM"));
- EXPECT_EQ("1", getRegistryValue("LAUNCHWSLIMAGEINSTALLER"));
EXPECT_EQ("0", getRegistryValue("RETURN_REBOOTREQUESTED"));
EXPECT_EQ("1", getRegistryValue("RETURN_VALIDATEINSTALL"));
EXPECT_EQ("master_test",
@@ -103,11 +96,6 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
ASSERT_EQ("1", value);
- setMsiProperty("LAUNCHWSLIMAGEINSTALLER", "1");
- std::tie(errorcode, value) = getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
- EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
- ASSERT_EQ("1", value);
-
setMsiProperty("RETURN_REBOOTREQUESTED", "1");
std::tie(errorcode, value) = getMsiProperty("RETURN_REBOOTREQUESTED");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
@@ -131,7 +119,6 @@ namespace test_boinccas {
EXPECT_EQ(0u, executeAction());
EXPECT_TRUE(getRegistryValue("LAUNCHPROGRAM").empty());
- EXPECT_EQ("1", getRegistryValue("LAUNCHWSLIMAGEINSTALLER"));
EXPECT_EQ("1", getRegistryValue("RETURN_REBOOTREQUESTED"));
EXPECT_EQ("1", getRegistryValue("RETURN_VALIDATEINSTALL"));
EXPECT_EQ("master_test",
@@ -150,11 +137,6 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
ASSERT_EQ("1", value);
- setMsiProperty("LAUNCHWSLIMAGEINSTALLER", "1");
- std::tie(errorcode, value) = getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
- EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
- ASSERT_EQ("1", value);
-
setMsiProperty("RETURN_REBOOTREQUESTED", "0");
std::tie(errorcode, value) = getMsiProperty("RETURN_REBOOTREQUESTED");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
@@ -178,7 +160,6 @@ namespace test_boinccas {
EXPECT_EQ(0u, executeAction());
EXPECT_TRUE(getRegistryValue("LAUNCHPROGRAM").empty());
- EXPECT_EQ("1", getRegistryValue("LAUNCHWSLIMAGEINSTALLER"));
EXPECT_EQ("0", getRegistryValue("RETURN_REBOOTREQUESTED"));
EXPECT_EQ("0", getRegistryValue("RETURN_VALIDATEINSTALL"));
EXPECT_EQ("master_test",
diff --git a/tests/unit-tests/boinccas/test_boinccas_CASaveSetupState.cpp b/tests/unit-tests/boinccas/test_boinccas_CASaveSetupState.cpp
index 6f681e763b2..a4d522f76b4 100644
--- a/tests/unit-tests/boinccas/test_boinccas_CASaveSetupState.cpp
+++ b/tests/unit-tests/boinccas/test_boinccas_CASaveSetupState.cpp
@@ -41,7 +41,7 @@ namespace test_boinccas {
EXPECT_TRUE(getRegistryValue("INSTALLDIR").empty());
EXPECT_TRUE(getRegistryValue("DATADIR").empty());
EXPECT_EQ("0", getRegistryValue("LAUNCHPROGRAM"));
- EXPECT_EQ("0", getRegistryValue("LAUNCHWSLIMAGEINSTALLER"));
+ EXPECT_EQ("0", getRegistryValue("INSTALLWSLIMAGEINSTALLER"));
EXPECT_TRUE(getRegistryValue("BOINC_MASTER_USERNAME").empty());
EXPECT_TRUE(getRegistryValue("BOINC_PROJECT_USERNAME").empty());
EXPECT_EQ("0", getRegistryValue("ENABLELAUNCHATLOGON"));
@@ -72,8 +72,8 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
ASSERT_EQ("1", value);
- setMsiProperty("LAUNCHWSLIMAGEINSTALLER", "1");
- std::tie(errorcode, value) = getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
+ setMsiProperty("INSTALLWSLIMAGEINSTALLER", "1");
+ std::tie(errorcode, value) = getMsiProperty("INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
ASSERT_EQ("1", value);
@@ -113,7 +113,7 @@ namespace test_boinccas {
EXPECT_EQ("test", getRegistryValue("INSTALLDIR"));
EXPECT_EQ("test_data", getRegistryValue("DATADIR"));
EXPECT_EQ("1", getRegistryValue("LAUNCHPROGRAM"));
- EXPECT_EQ("1", getRegistryValue("LAUNCHWSLIMAGEINSTALLER"));
+ EXPECT_EQ("1", getRegistryValue("INSTALLWSLIMAGEINSTALLER"));
EXPECT_EQ("master_test", getRegistryValue("BOINC_MASTER_USERNAME"));
EXPECT_EQ("project_test", getRegistryValue("BOINC_PROJECT_USERNAME"));
EXPECT_EQ("1", getRegistryValue("ENABLELAUNCHATLOGON"));
@@ -134,8 +134,8 @@ namespace test_boinccas {
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
ASSERT_EQ("2", value);
- setMsiProperty("LAUNCHWSLIMAGEINSTALLER", "7");
- std::tie(errorcode, value) = getMsiProperty("LAUNCHWSLIMAGEINSTALLER");
+ setMsiProperty("INSTALLWSLIMAGEINSTALLER", "7");
+ std::tie(errorcode, value) = getMsiProperty("INSTALLWSLIMAGEINSTALLER");
EXPECT_EQ(static_cast(ERROR_SUCCESS), errorcode);
ASSERT_EQ("7", value);
@@ -165,7 +165,7 @@ namespace test_boinccas {
EXPECT_TRUE(getRegistryValue("INSTALLDIR").empty());
EXPECT_TRUE(getRegistryValue("DATADIR").empty());
EXPECT_EQ("0", getRegistryValue("LAUNCHPROGRAM"));
- EXPECT_EQ("0", getRegistryValue("LAUNCHWSLIMAGEINSTALLER"));
+ EXPECT_EQ("0", getRegistryValue("INSTALLWSLIMAGEINSTALLER"));
EXPECT_TRUE(getRegistryValue("BOINC_MASTER_USERNAME").empty());
EXPECT_TRUE(getRegistryValue("BOINC_PROJECT_USERNAME").empty());
EXPECT_EQ("0", getRegistryValue("ENABLELAUNCHATLOGON"));
diff --git a/win_build/boinccas.vcxproj b/win_build/boinccas.vcxproj
index 7b1e9ed91dd..d281d73c407 100644
--- a/win_build/boinccas.vcxproj
+++ b/win_build/boinccas.vcxproj
@@ -32,7 +32,6 @@
-
@@ -50,7 +49,6 @@
-
diff --git a/win_build/installer_msi.vcxproj b/win_build/installer_msi.vcxproj
index c8e295c62b7..4cea6b6d7fb 100644
--- a/win_build/installer_msi.vcxproj
+++ b/win_build/installer_msi.vcxproj
@@ -16,7 +16,7 @@
$(OutDir)boinc-buda-runner-wsl-installer.exe
- 2.3.2
+ 3.0.5
$(BoincWslInstaller)_$(BoincWslInstallerVersion).lock
https://github.com/BOINC/boinc-buda-runner-wsl-installer/releases/download/v$(BoincWslInstallerVersion)/boinc-buda-runner-wsl-installer.exe
diff --git a/win_build/installer_setup.vcxproj b/win_build/installer_setup.vcxproj
index 92ad736cf97..ba3c4a93c77 100644
--- a/win_build/installer_setup.vcxproj
+++ b/win_build/installer_setup.vcxproj
@@ -11,7 +11,7 @@
- .;..;../api;../lib;%(AdditionalIncludeDirectories)
+ .;..;../api;../lib;../clientsetup/win;%(AdditionalIncludeDirectories)
_CONSOLE;%(PreprocessorDefinitions)
@@ -26,15 +26,22 @@
+
+
+
+
+ {e8f6bd7e-461a-4733-b7d8-37b09a099ed8}
+
+
-
+
diff --git a/win_build/unittests.vcxproj b/win_build/unittests.vcxproj
index 06709d52e3a..1d041041e75 100644
--- a/win_build/unittests.vcxproj
+++ b/win_build/unittests.vcxproj
@@ -38,7 +38,6 @@
-
@@ -56,7 +55,6 @@
-
diff --git a/win_build/unittests.vcxproj.filters b/win_build/unittests.vcxproj.filters
index b09b8b139df..56efc5fd42f 100644
--- a/win_build/unittests.vcxproj.filters
+++ b/win_build/unittests.vcxproj.filters
@@ -45,9 +45,6 @@
boinccas
-
- boinccas
-
boinccas
@@ -99,9 +96,6 @@
boinccas
-
- boinccas
-
boinccas