From: Simon Rozman Date: Wed, 19 Dec 2018 20:26:08 +0000 (+0100) Subject: Make DriverCertification MSI property public X-Git-Tag: v2.5_beta1~354 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc2e28badf3736114bbc427f241961664235165c;p=thirdparty%2Fopenvpn.git Make DriverCertification MSI property public Making DriverCertification public (containing only upper-case letters) allows the property set by FindSystemInfo custom action to be passed from InstallUISequence sequence to InstallExecuteSequence. This eliminates the need to execute FindSystemInfo in both sequences. Acked-by: Gert Doering Message-Id: <20181219202611.2144-1-simon@rozman.si> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18037.html Signed-off-by: Gert Doering --- diff --git a/src/openvpnmsica/openvpnmsica.c b/src/openvpnmsica/openvpnmsica.c index 864348011..721bd4f8e 100644 --- a/src/openvpnmsica/openvpnmsica.c +++ b/src/openvpnmsica/openvpnmsica.c @@ -289,11 +289,11 @@ FindSystemInfo(_In_ MSIHANDLE hInstall) } } - uiResult = MsiSetProperty(hInstall, TEXT("DriverCertification"), ver_info.dwMajorVersion >= 10 ? ver_info.wProductType > VER_NT_WORKSTATION ? TEXT("whql") : TEXT("attsgn") : TEXT("")); + uiResult = MsiSetProperty(hInstall, TEXT("DRIVERCERTIFICATION"), ver_info.dwMajorVersion >= 10 ? ver_info.wProductType > VER_NT_WORKSTATION ? TEXT("whql") : TEXT("attsgn") : TEXT("")); if (uiResult != ERROR_SUCCESS) { SetLastError(uiResult); /* MSDN does not mention MsiSetProperty() to set GetLastError(). But we do have an error code. Set last error manually. */ - msg(M_NONFATAL | M_ERRNO, "%s: MsiSetProperty(\"TAPINTERFACES\") failed", __FUNCTION__); + msg(M_NONFATAL | M_ERRNO, "%s: MsiSetProperty(\"DRIVERCERTIFICATION\") failed", __FUNCTION__); goto cleanup_CoInitialize; }