Solve the "unsigned driver" warning message prompted at the installation driver! !

zhaozj2021-02-16  52

Recently write drivers and make a installer. But it is found that there is always a "unknown signature driver" when installing. This prompt box will not occur only if you manually change the system -> hardware -> Signature Device Driver. But I don't know which position in the registration table, I collected some information online, and finally I found related articles in "Drive Development Network", which is to modify the Software // Microsoft // Driver Signing and Software // Microsoft ////miROFT //////. Non-Driver Signing // This is connected to the policy to change the value! I have been tested, I found that I still have a prompt on my machine! ! Do I want to be under the registration of the current user? As a result, it was found that there was another Software // Microsoft // Driver Signing button under Key_Current_User! ! Change the value to 0! by! ! !

The following is the installation script of InstallShield! ^ _ ^

// Global variable save status value

STRING g_svDriverSigning, g_svNonDriverSigning, g_svUserDriverSigning; NUMBER g_nvSize, g_nvUserSize, g_nvNonSize; / * unsigned driver installation operation 0 Default continued 1 but allow installation Warn 2 prohibit the installation * / function NonDriverSigning (bEnable) STRING szKey, svValue, szValue; STRING Szkeyname; Number NvType, NVSIZE; Begin RegdbsetDefaultroot (HKEY_CURRENT_USER); // ----------------------------------- - // Set the unsigned driver installation operation under the HKCU Szkey = "SoftwareMicrosoftDriver Signing"; szkeyName = "policy"; nvType = regdb_number; if (Benable) THEN / / Save the original value IF (RegdBgetKeyValueex (Szkey, SzkeyName, NVTYPE, G_SVUSERDRIVERSIGNING, G_NVUSERSIGNING, G_NVUSERSIZE) <0) THEN G_SVUSERDRIVERSIGNING = "0"; g_nvusersize = -1; ENDIF; // Set to "Default Continue" Szvalue = "0"; nvsize = -1; ELSE // Restore the original value Szvalue = g_svuserdriversigning; nvsize = g_nvusersize; endif; // Set the key value IF (RegdbsetKeyValueex (Szkey, SzkeyName, NV TYPE, SZVALUE, NVSIZE) <0) Then/ Return -1;; Endif; RegdbSetDefaultroot (HKEY_LOCAL_MACHINE); // ----------- --------------------------- // Set the unsigned driver installation operation under HKLM Szkey = "SoftwareMicrosoftDriver Signing"; szkeyName = "Policy"; nvType = regdb_binary; if (Benable) THEN / / Save the original value IF (RegdBgetKeyValueex (Szkey, SzkeyName, NVTYPE, G_SVDRIVERSIGNING, G_NVSIG) <0) Then g_svdriversigning = "

转载请注明原文地址:https://www.9cbs.com/read-18560.html

New Post(0)