Merge branch 'master' of https://github.com/SafeExamBrowser/seb-win-refactoring
This commit is contained in:
commit
639700abd8
2 changed files with 1 additions and 43 deletions
|
@ -7,7 +7,6 @@ Refactored version of Safe Exam Browser for Windows with Chromium as integrated
|
|||
SEB 3.x requires the prerequisites listed below in order to work correctly. These are automatically installed with the setup bundle and need only be manually installed when using the MSI packages.
|
||||
|
||||
* .NET Framework 4.8 Runtime: https://dotnet.microsoft.com/download/dotnet-framework/net48
|
||||
* Microsoft Edge WebView2 Runtime: https://go.microsoft.com/fwlink/p/?LinkId=2124703
|
||||
* Visual C++ 2015-2019 Redistributable: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
|
||||
|
||||
## Project Status
|
||||
|
@ -17,7 +16,7 @@ SEB 3.x requires the prerequisites listed below in order to work correctly. Thes
|
|||
|
||||
| Aspect | Status | Details |
|
||||
| ----------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| Development Build |  | https://sebdev-let.ethz.ch/project/appveyor/seb-win-refactoring |
|
||||
| Development Build |  | https://sebdev.ethz.ch/project/appveyor/seb-win-refactoring |
|
||||
| Test Build |  | https://ci.appveyor.com/project/dbuechel/seb-win-refactoring |
|
||||
| Test Run |  | https://ci.appveyor.com/project/dbuechel/seb-win-refactoring |
|
||||
| Code Coverage |  | https://codecov.io/gh/SafeExamBrowser/seb-win-refactoring |
|
||||
|
|
|
@ -105,7 +105,6 @@ namespace SafeExamBrowser.SystemComponents
|
|||
{
|
||||
var isVirtualRegistry = false;
|
||||
|
||||
isVirtualRegistry |= HasHistoricVirtualMachineHardwareConfiguration();
|
||||
isVirtualRegistry |= HasLocalVirtualMachineDeviceCache();
|
||||
|
||||
return isVirtualRegistry;
|
||||
|
@ -134,46 +133,6 @@ namespace SafeExamBrowser.SystemComponents
|
|||
return isVirtualSystem;
|
||||
}
|
||||
|
||||
private bool HasHistoricVirtualMachineHardwareConfiguration()
|
||||
{
|
||||
var hasHistoricConfiguration = false;
|
||||
|
||||
if (registry.TryGetSubKeys(RegistryValue.MachineHive.HardwareConfig_Key, out var hardwareConfigSubkeys))
|
||||
{
|
||||
foreach (var configId in hardwareConfigSubkeys)
|
||||
{
|
||||
var hardwareConfigKey = $@"{RegistryValue.MachineHive.HardwareConfig_Key}\{configId}";
|
||||
var computerIdsKey = $@"{hardwareConfigKey}\ComputerIds";
|
||||
var success = true;
|
||||
|
||||
success &= registry.TryRead(hardwareConfigKey, "BIOSVendor", out var biosVendor);
|
||||
success &= registry.TryRead(hardwareConfigKey, "BIOSVersion", out var biosVersion);
|
||||
success &= registry.TryRead(hardwareConfigKey, "SystemManufacturer", out var systemManufacturer);
|
||||
success &= registry.TryRead(hardwareConfigKey, "SystemProductName", out var systemProductName);
|
||||
|
||||
if (success)
|
||||
{
|
||||
var biosInfo = $"{(string) biosVendor} {(string) biosVersion}";
|
||||
|
||||
hasHistoricConfiguration |= IsVirtualSystem(biosInfo, (string) systemManufacturer, (string) systemProductName);
|
||||
|
||||
if (registry.TryGetNames(computerIdsKey, out var computerIdNames))
|
||||
{
|
||||
foreach (var computerIdName in computerIdNames)
|
||||
{
|
||||
if (registry.TryRead(computerIdsKey, computerIdName, out var computerSummary))
|
||||
{
|
||||
hasHistoricConfiguration |= IsVirtualSystem((string) computerSummary, (string) systemManufacturer, (string) systemProductName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return hasHistoricConfiguration;
|
||||
}
|
||||
|
||||
private bool HasLocalVirtualMachineDeviceCache()
|
||||
{
|
||||
var deviceName = System.Environment.GetEnvironmentVariable("COMPUTERNAME");
|
||||
|
|
Loading…
Add table
Reference in a new issue