WinHlp32 for Windows 10

顯示結果從第 1 筆 到 1 筆,共計 1 筆
  1. #1
    萌え尽き症候群 琥珀 的大頭照
    註冊日期
    2002-08-17
    所在地區
    中和區
    討論區文章
    10,022

    WinHlp32 for Windows 10

    永遠的測試版。想要實作一下,結果花了三天才寫好。

    參考來源:
    How to Open .HLP WinHelp Files in Windows 10
    Восстановление winhlp32.exe в Windows 10
    Windows 10で古いヘルプファイル(*.hlp)が開けないときに
    Windows10用WinHlp32.exeインストールバッチファイル

    語法:
    @echo on & cd /d %~dp0 & set ele=ele.%processor_architecture%
    
    (ele.%processor_architew6432% "%~f0" && exit /b || net.exe file || openfiles.exe || %ele% "%~f0" && exit /b || exit /b) >nul 2>&1
    
    (for /d %%v in (*kb917607*) do @rd /s /q "%%v") & (md kb917607\x64 kb917607\x86)
    
    (if not exist *8.1-kb917607-x64* wget.exe "http://download.microsoft.com/download/A/5/6/A5651A53-2487-43C6-835A-744EB9C72579/Windows8.1-KB917607-x64.msu" || bitsadmin.exe /transfer kb917607 "http://download.microsoft.com/download/A/5/6/A5651A53-2487-43C6-835A-744EB9C72579/Windows8.1-KB917607-x64.msu" "%cd%\Windows8.1-KB917607-x64.msu") >nul 2>&1
    
    (expand /f:win*.cab Windows8.1-KB917607-x64.msu .
     expand /f:* Windows8.1-KB917607-x64.cab kb917607) >nul
    
    @cd kb917607 & del *.man *.cat *.mum
    
    (for /f "tokens=5 delims=_" %%a in ('dir x86* /b') do @move x86*%%a* x86\%%a
     for /f "tokens=5 delims=_" %%a in ('dir amd* /b') do @move amd*%%a* x64\%%a) >nul
    
    (if /i %processor_architecture%==x86 (
    
    for /f "tokens=4 delims=~" %%v in ('dism.exe /online /get-packages /format:table /english ^| find /i "language pack"') do @(
    
    takeown.exe /f %windir%\%%v\winhlp32.exe.mui
    takeown.exe /f %windir%\system32\%%v\ftsrch.dll.mui
    
    icacls.exe %windir%\%%v\winhlp32.exe.mui /grant "%username%:f"
    icacls.exe %windir%\system32\%%v\ftsrch.dll.mui /grant "%username%:f"
    
    copy x86\%%v\winhlp32.exe.mui %windir%\%%v
    copy x86\%%v\ftsrch.dll.mui %windir%\system32\%%v
    
    icacls.exe %windir%\%%v\winhlp32.exe.mui /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\system32\%%v\ftsrch.dll.mui /setowner "nt service\trustedinstaller"
    
    icacls.exe %windir%\%%v\winhlp32.exe.mui /remove "%username%"
    icacls.exe %windir%\system32\%%v\ftsrch.dll.mui /remove "%username%"
    
    )
    
    takeown.exe /f %windir%\winhlp32.exe
    takeown.exe /f %windir%\system32\ftlx0411.dll
    takeown.exe /f %windir%\system32\ftlx041e.dll
    takeown.exe /f %windir%\system32\ftsrch.dll
    
    icacls.exe %windir%\winhlp32.exe /grant "%username%:f"
    icacls.exe %windir%\system32\ftlx0411.dll /grant "%username%:f"
    icacls.exe %windir%\system32\ftlx041e.dll /grant "%username%:f"
    icacls.exe %windir%\system32\ftsrch.dll /grant "%username%:f"
    
    copy x86\none\winhlp32.exe %windir%
    copy x86\none\ftlx0411.dll %windir%\system32
    copy x86\none\ftlx041e.dll %windir%\system32
    copy x86\none\ftsrch.dll %windir%\system32
    
    icacls.exe %windir%\winhlp32.exe /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\system32\ftlx0411.dll /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\system32\ftlx041e.dll /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\system32\ftsrch.dll /setowner "nt service\trustedinstaller"
    
    icacls.exe %windir%\winhlp32.exe /remove "%username%"
    icacls.exe %windir%\system32\ftlx0411.dll /remove "%username%"
    icacls.exe %windir%\system32\ftlx041e.dll /remove "%username%"
    icacls.exe %windir%\system32\ftsrch.dll /remove "%username%"
    
    ) else (
    
    for /f "tokens=4 delims=~" %%v in ('dism.exe /online /get-packages /format:table /english ^| find /i "language pack"') do @(
    
    takeown.exe /f %windir%\%%v\winhlp32.exe.mui
    takeown.exe /f %windir%\system32\%%v\ftsrch.dll.mui
    takeown.exe /f %windir%\syswow64\%%v\ftsrch.dll.mui
    
    icacls.exe %windir%\%%v\winhlp32.exe.mui /grant "%username%:f"
    icacls.exe %windir%\system32\%%v\ftsrch.dll.mui /grant "%username%:f"
    icacls.exe %windir%\syswow64\%%v\ftsrch.dll.mui /grant "%username%:f"
    
    copy x64\%%v\winhlp32.exe.mui %windir%\%%v
    copy x64\%%v\ftsrch.dll.mui %windir%\system32\%%v
    copy x86\%%v\ftsrch.dll.mui %windir%\syswow64\%%v
    
    icacls.exe %windir%\%%v\winhlp32.exe.mui /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\system32\%%v\ftsrch.dll.mui /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\syswow64\%%v\ftsrch.dll.mui /setowner "nt service\trustedinstaller"
    
    icacls.exe %windir%\%%v\winhlp32.exe.mui /remove "%username%"
    icacls.exe %windir%\system32\%%v\ftsrch.dll.mui /remove "%username%"
    icacls.exe %windir%\syswow64\%%v\ftsrch.dll.mui /remove "%username%"
    
    )
    
    takeown.exe /f %windir%\winhlp32.exe
    takeown.exe /f %windir%\system32\ftlx0411.dll
    takeown.exe /f %windir%\system32\ftlx041e.dll
    takeown.exe /f %windir%\system32\ftsrch.dll
    takeown.exe /f %windir%\syswow64\ftlx0411.dll
    takeown.exe /f %windir%\syswow64\ftlx041e.dll
    takeown.exe /f %windir%\syswow64\ftsrch.dll
    
    icacls.exe %windir%\winhlp32.exe /grant "%username%:f"
    icacls.exe %windir%\system32\ftlx0411.dll /grant "%username%:f"
    icacls.exe %windir%\system32\ftlx041e.dll /grant "%username%:f"
    icacls.exe %windir%\system32\ftsrch.dll /grant "%username%:f"
    icacls.exe %windir%\syswow64\ftlx0411.dll /grant "%username%:f"
    icacls.exe %windir%\syswow64\ftlx041e.dll /grant "%username%:f"
    icacls.exe %windir%\syswow64\ftsrch.dll /grant "%username%:f"
    
    copy x64\none\winhlp32.exe %windir%
    copy x64\none\ftlx0411.dll %windir%\system32
    copy x64\none\ftlx041e.dll %windir%\system32
    copy x64\none\ftsrch.dll %windir%\system32
    copy x86\none\ftlx0411.dll %windir%\syswow64
    copy x86\none\ftlx041e.dll %windir%\syswow64
    copy x86\none\ftsrch.dll %windir%\syswow64
    
    icacls.exe %windir%\winhlp32.exe /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\system32\ftlx0411.dll /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\system32\ftlx041e.dll /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\system32\ftsrch.dll /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\syswow64\ftlx0411.dll /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\syswow64\ftlx041e.dll /setowner "nt service\trustedinstaller"
    icacls.exe %windir%\syswow64\ftsrch.dll /setowner "nt service\trustedinstaller"
    
    icacls.exe %windir%\winhlp32.exe /remove "%username%"
    icacls.exe %windir%\system32\ftlx0411.dll /remove "%username%"
    icacls.exe %windir%\system32\ftlx041e.dll /remove "%username%"
    icacls.exe %windir%\system32\ftsrch.dll /remove "%username%"
    icacls.exe %windir%\syswow64\ftlx0411.dll /remove "%username%"
    icacls.exe %windir%\syswow64\ftlx041e.dll /remove "%username%"
    icacls.exe %windir%\syswow64\ftsrch.dll /remove "%username%"
    
    ) ) >nul
    
    @cd .. & reg.exe import winhelpr.cmd /reg:32 & ping -n 4 localhost > nul
    語法:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WinHelp]
    "AllowIntranetAccess"=dword:00000001
    "AllowProgrammaticMacros"=dword:00000001
    語法:
    Windows Registry Editor Version 5.00 (self-contained registry script) 2>nul
    
    ; @(net.exe file || openfiles.exe || ele.%processor_architecture% "%~f0" && exit /b || exit /b) >nul 2>&1
    ; @(reg.exe import "%~f0" /reg:32 || regedit.exe /s "%~f0" & exit /b) 2>nul
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WinHelp]
    "AllowIntranetAccess"=dword:00000001
    "AllowProgrammaticMacros"=dword:00000001


    附加檔案 附加檔案
    此文章於 2018-01-01 11:37 PM 被 琥珀 編輯。

類似的主題

  1. Windows XP SP1
    作者:ranger 所在討論版:-- Windows 討 論 版
    回覆: 7
    最後發表: 2002-08-26, 10:21 PM
  2. windows
    作者:kanako0605 所在討論版:-- 網路輕鬆版 [圖片 笑話 影片]
    回覆: 6
    最後發表: 2002-01-26, 04:50 PM
  3. Plus! for Windows XP
    作者:阿忠 所在討論版:-- Windows 討 論 版
    回覆: 4
    最後發表: 2001-09-12, 04:50 PM
  4. Windows RG
    作者:怪盜基德 所在討論版:-- 網路輕鬆版 [圖片 笑話 影片]
    回覆: 4
    最後發表: 2001-08-23, 02:09 PM

 

https:www.pczone.com.twthread-157098.html#post1124959

發表文章規則

  • 不可以發表新主題
  • 不可以回覆文章
  • 不可以上傳附加檔案
  • 不可以編輯自己的文章
  •