summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2020-02-21 11:01:41 +0100
committerDavid Lönnhager <david.l@mullvad.net>2020-02-25 11:32:09 +0100
commitb7a2e7e67d09dd1ac3190b3812c855372ca84cc8 (patch)
treedce5940713b7065fc70306f3c1e1a2af686f7845
parent807de13a4577db8d97b8718f43fe9aef6be84b6d (diff)
downloadmullvadvpn-b7a2e7e67d09dd1ac3190b3812c855372ca84cc8.tar.xz
mullvadvpn-b7a2e7e67d09dd1ac3190b3812c855372ca84cc8.zip
Explain error code 0xE0000246
-rw-r--r--windows/driverlogic/src/driverlogic.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/windows/driverlogic/src/driverlogic.cpp b/windows/driverlogic/src/driverlogic.cpp
index c92ad51ed6..02cc10f20a 100644
--- a/windows/driverlogic/src/driverlogic.cpp
+++ b/windows/driverlogic/src/driverlogic.cpp
@@ -8,6 +8,7 @@
#include <libcommon/guid.h>
#include <libcommon/memory.h>
#include <libcommon/network/nci.h>
+#include <libcommon/registry/registry.h>
#include <libcommon/string.h>
#include <setupapi.h>
#include <initguid.h>
@@ -503,6 +504,33 @@ ATTEMPT_UPDATE:
goto ATTEMPT_UPDATE;
}
+ if (ERROR_DEVICE_INSTALLER_NOT_READY == lastError)
+ {
+ bool deviceInstallDisabled = false;
+
+ try
+ {
+ const auto key = common::registry::Registry::OpenKey(
+ HKEY_LOCAL_MACHINE,
+ L"SYSTEM\\CurrentControlSet\\Services\\DeviceInstall\\Parameters"
+ );
+ deviceInstallDisabled = (0 != key->readUint32(L"DeviceInstallDisabled"));
+ }
+ catch (...)
+ {
+ }
+
+ if (deviceInstallDisabled)
+ {
+ THROW_ERROR(
+ "Device installs must be enabled to continue. "
+ "Enable them in the Local Group Policy editor, or"
+ " update the registry value DeviceInstallDisabled in"
+ " [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DeviceInstall\\Parameters]"
+ );
+ }
+ }
+
THROW_WINDOWS_ERROR(lastError, "UpdateDriverForPlugAndPlayDevicesW");
}