- 已加入
- 3/9/08
- 訊息
- 163
- 互動分數
- 35
- 點數
- 28
因Vista導入iCacls存取權限機制,導致無法置換Code Page 950下的C_950.nls
造成Unicode安裝失敗,Unicode也停留在XP時代下的安裝模式,沒有一個新的配套措施
都需要使用手動新增擁有者,來置換C_950.nls,相當麻煩
在2010年時本人就在youtube上放上了Vista安裝補完計畫的教學影片
良久還是不見有人開發安裝版,所以就釋出了這個一件安裝版相容於各Windwos系統x64、x86平台
載點:點我下載
code 一樣開源,有需要的人自取
造成Unicode安裝失敗,Unicode也停留在XP時代下的安裝模式,沒有一個新的配套措施
都需要使用手動新增擁有者,來置換C_950.nls,相當麻煩
在2010年時本人就在youtube上放上了Vista安裝補完計畫的教學影片
良久還是不見有人開發安裝版,所以就釋出了這個一件安裝版相容於各Windwos系統x64、x86平台
載點:點我下載
code 一樣開源,有需要的人自取
#RequireAdmin
#NoTrayIcon
#Region
#AutoIt3Wrapper_icon=C:\NewDang.ico
#AutoIt3Wrapper_Compression=5
#AutoIt3Wrapper_Res_Comment=Unicode補完計畫
#AutoIt3Wrapper_Res_Description=Unicode補完計畫
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=噹噹
#EndRegion
Dim $DirPath = "C:\Windows\System32"
Dim $FileName = "C_950.NLS"
Dim $FilePath = $DirPath&"\"&$FileName
Dim $C_950_MD_5 = "7f69955ce72ba9f187a686a637b8ffdd"
If StringInStr ( _MD5 ($FilePath), $C_950_MD_5) Then
MsgBox ( 0, "", "已安裝過unicode,無須再次安裝。")
Else
RunWait ( @ComSpec & " /c " & 'takeown /f '&$FilePath&' && icacls '&$FilePath&' /grant administrators:F ', $DirPath, @SW_HIDE)
FileInstall ( "C_950.nls", $FilePath, 1)
RunWait ( @ComSpec & " /c " & 'takeown /f '&$FilePath&' && icacls '&$FilePath&' /grant:r administrators:(RX)', $DirPath, @SW_HIDE)
RunWait ( @ComSpec & " /c " & 'takeown /f '&$FilePath&' && icacls '&$FilePath&' /setowner "NT Service\TrustedInstaller" /C', $DirPath, @SW_HIDE)
MsgBox ( 0, "Unicode補完計畫", "Unicode補完計畫,已安裝完成,重開機即可。")
EndIf
Func _MD5($sFile)
$hFile = FileOpen ($sFile, 16)
$bData = FileRead ($hFile)
$iLength = BinaryLen ($bData)
FileClose($hFile)
$tBuffer = DllStructCreate("byte[" & $iLength & "]")
$pBuffer = DllStructGetPtr($tBuffer)
DllStructSetData($tBuffer, 1, $bData)
$iResult = DllCall ("Crypt32.dll", "int", "CryptHashCertificate", "hWnd", 0, "dword", 0x8003, "dword", 0, "ptr", $pBuffer, "dword", $iLength, "ptr", 0, "dword*", 0)
$tResult = DllStructCreate ("byte[" & $iResult[7] & "]")
$pResult = DllStructGetPtr ($tResult)
$iResult = DllCall ("Crypt32.dll", "int", "CryptHashCertificate", "hWnd", 0, "dword", 0x8003, "dword", 0, "ptr", $pBuffer, "dword", $iLength, "ptr", $pResult, "dword*", $iResult[7])
If $iResult[0] <> 0 Then Return StringTrimLeft (DllStructGetData ($tResult, 1), 2)
$tBuffer = 0
$tResult = 0
EndFunc
最後編輯: