阅读:12962回复:26
怎么解决安装驱动时提示的“没有找到数字签名”??
我用InstallShield制作了一个虚拟设备的安装程序!使用DEVCON安装!用是可以用!但每次都需要确认“没有找到数字签名”这个对话框!这是给客户的!我开始的想法是准备将系统,硬件中的签署驱动程序这个默认属性改为"忽略",然后再改为原始值,但没有找到注册表健!!!
那位大虾知道吗? |
|
最新喜欢:yushui... |
沙发#
发布于:2004-06-29 22:34
哈哈!搞定了!翻阅了各位大虾的文章!!!
修改3个注册表键值! System:Win2000 HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Driver Signing\\Policy的值改为0; 除此之外,HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Non-Driver Signing\\Policy的值要改为1。 HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Driver Signing\\Policy 这个键值改为1! 打工告成! :D |
|
板凳#
发布于:2004-06-30 09:50
XP下还没测试!测试出来再贴出来! ;)
|
|
地板#
发布于:2004-07-02 08:30
好像打错了!! :D
|
|
地下室#
发布于:2004-07-04 15:43
XP下得也解决了!只要找到当前用户得SID!在HKEY_USER下得SID
\\SoftWare\\Microsoft\\Driver Signing\\Policy改为0!! 取SID得代码可以参照MSDN!!!!!!!!!!!!! |
|
5楼#
发布于:2004-07-08 11:35
extern "C" __declspec (dllexport) int WINAPI GetCurSid(LPTSTR lpszBuff )
{ #define MY_BUFSIZE 256 // all allocations should be dynamic HANDLE hToken; BYTE buf[MY_BUFSIZE]; PTOKEN_USER ptgUser = (PTOKEN_USER)buf; DWORD cbBuffer=MY_BUFSIZE; TCHAR szTextualSid[MY_BUFSIZE]; DWORD cchSid=MY_BUFSIZE; BOOL bSuccess; // // obtain current process token // if(!OpenProcessToken( GetCurrentProcess(), // target current process TOKEN_QUERY, // TOKEN_QUERY access &hToken // resultant hToken )) { //DisplayWinError( TEXT("OpenProcessToken"), GetLastError() ); return RTN_ERROR; } // // obtain user identified by current process' access token // bSuccess = GetTokenInformation( hToken, // identifies access token TokenUser, // TokenUser info type ptgUser, // retrieved info buffer cbBuffer, // size of buffer passed-in &cbBuffer // required buffer size ); // close token handle. do this even if error above CloseHandle(hToken); if(!bSuccess) { //DisplayWinError( TEXT("GetTokenInformation"), GetLastError() ); return RTN_ERROR; } // // obtain the textual representaion of the Sid // if(!GetTextualSid( ptgUser->User.Sid, // user binary Sid szTextualSid, // buffer for TextualSid &cchSid // size/required buffer )) { //DisplayWinError( TEXT("GetTextualSid"), GetLastError() ); return RTN_ERROR; } // display the TextualSid representation _tprintf( TEXT("Process Sid: %s\n"), szTextualSid ); strcpy( lpszBuff, szTextualSid ); return RTN_OK; } BOOL GetTextualSid( PSID pSid, // binary Sid LPTSTR TextualSid, // buffer for Textual representaion of Sid LPDWORD cchSidSize // required/provided TextualSid buffersize in TCHARs ) { PSID_IDENTIFIER_AUTHORITY psia; DWORD dwSubAuthorities; DWORD dwCounter; DWORD cchSidCopy; DWORD cchMaxLen; // // test if parameters passed in are valid, IsValidSid can not take // a NULL parameter // if(!pSid || !IsValidSid(pSid) || !TextualSid || !cchSidSize) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } // obtain SidIdentifierAuthority psia = GetSidIdentifierAuthority(pSid); // obtain sidsubauthority count dwSubAuthorities = *GetSidSubAuthorityCount(pSid); // // compute approximate buffer length // S-SID_REVISION- + identifierauthority + -subauthorities + NULL // cchMaxLen = 6 + 14 + (11 * dwSubAuthorities) + 1; // // check provided buffer length. // If not large enough, indicate proper size and setlasterror // if(*cchSidSize < cchMaxLen) { *cchSidSize = cchMaxLen; SetLastError(ERROR_INSUFFICIENT_BUFFER); return FALSE; } // // prepare S-SID_REVISION- // cchSidCopy = wnsprintf(TextualSid, cchMaxLen, TEXT("S-%lu-"), SID_REVISION ); // // prepare SidIdentifierAuthority // if ( (psia->Value[0] != 0) || (psia->Value[1] != 0) ) { cchSidCopy += wnsprintf(TextualSid + cchSidCopy, cchMaxLen - cchSidCopy, TEXT("0x%02hx%02hx%02hx%02hx%02hx%02hx"), (USHORT)psia->Value[0], (USHORT)psia->Value[1], (USHORT)psia->Value[2], (USHORT)psia->Value[3], (USHORT)psia->Value[4], (USHORT)psia->Value[5]); } else { cchSidCopy += wnsprintf(TextualSid + cchSidCopy, cchMaxLen - cchSidCopy, TEXT("%lu"), (ULONG)(psia->Value[5] ) + (ULONG)(psia->Value[4] << 8) + (ULONG)(psia->Value[3] << 16) + (ULONG)(psia->Value[2] << 24) ); } // // loop through SidSubAuthorities // for(dwCounter = 0 ; dwCounter < dwSubAuthorities ; dwCounter++) { cchSidCopy += wnsprintf(TextualSid + cchSidCopy, cchMaxLen - cchSidCopy, TEXT("-%lu"), *GetSidSubAuthority(pSid, dwCounter) ); } // // tell the caller how many chars we provided, not including NULL // *cchSidSize = cchSidCopy; return TRUE; } |
|
6楼#
发布于:2004-07-23 17:25
肯定是要保存的!
这个在脚本里面都实现了!!! |
|