|
由于那个Office 2003绿色版采用的是 INF 文件注册,而这种注册方法经常会遇到安装失败的错误,因此本人彻底修改注册方式,采用批处理脚本注册,可以适应任何环境!
为方便大家DIY,这里附上我的Office.cmd的完整内容(可以通过XCMD.INI自动加载。已经测试成功,进入PE后可直接使用三大件):
Office.cmd
--------------------------------
@echo off
SET Var0=%0
FOR /f "delims=" %%I in ("%Var0%") do Set D=%%~dPI
REM “D”为外挂程序所在的分区号,这个批处理用来注册外挂程序与其文档的关联。
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\Toolbars" /v "AdaptiveMenus" /t REG_DWORD /d 0x00000000 /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\PowerPoint\Options" /v "StartupDialog" /t REG_DWORD /d 0x00000000 /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\PowerPoint\First Run" /v "FirstRun" /t REG_DWORD /d 0x00000001 /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options" /v "FirstRun" /t REG_DWORD /d 0x00000001 /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options" /v "StartupDialog" /t REG_DWORD /d 0x00000000 /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Options" /v "FirstRun" /t REG_DWORD /d 0x00000001 /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Options" /v "StartupDialog" /t REG_DWORD /d 0x00000000 /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Common\InstallRoot" /v "InstallCount" /t REG_DWORD /d 0x00000001 /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Common\InstallRoot" /v "Path" /d "%D%" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Common\FilesPaths" /v "mso.dll" /d "%D%MSO.DLL" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Registration\{90110804-6000-11D3-8CFE-0150048383C9}" /v "DigitalProductID" /t REG_BINARY /d "a40000000300000037333934312d3634302d303030303130362d353739393500720000003132332d31323334350000000000000000354e1105b8180a8a53ae4c0c2e010000000000bb5d714541460d0000000000000000000000000000000000000000000000000032343830300000000000000000000000ec11164400020000fa17000000000000000000000000000000000000000000000000000000000000de8f3a91" /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\Licensing" /v "1EBDE4BC9A514630B5412561FA45CCC5" /t REG_BINARY /d "01000000270000007b39303131303830342d363030302d313144332d384346452d3031353030343833383343397d00560000004d006900630072006f0073006f006600740020004f00660066006900630065002000500072006f00660065007300730069006f006e0061006c002000450064006900740069006f006e00200032003000300033000000" /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\Licensing" /v "A2B280D420FB472099F740C09FBCE10A" /t REG_BINARY /d "01000000270000007b39303131303830342d363030302d313144332d384346452d3031353030343833383343397d00560000004d006900630072006f0073006f006600740020004f00660066006900630065002000500072006f00660065007300730069006f006e0061006c002000450064006900740069006f006e00200032003000300033000000" /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\Licensing" /v "C86C0B9263C04E358605281275C21F97" /t REG_BINARY /d "01000000270000007b39303131303830342d363030302d313144332d384346452d3031353030343833383343397d00560000004d006900630072006f0073006f006600740020004f00660066006900630065002000500072006f00660065007300730069006f006e0061006c002000450064006900740069006f006e00200032003000300033000000" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe" /v "Path" /d "%D%" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe" /v "useURL" /d "1" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe" /d "%D%WinWord.exe"" /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.doc" /v "Application" /d "WinWord.exe" /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.doc\OpenWithList" /v "b" /d "WORDPAD.EXE" /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.doc\OpenWithList" /v "MRUList" /d "ab" /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.doc\OpenWithList" /v "a" /d "WinWord.exe" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\WINWORD.EXE\shell" /ve "open" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\WINWORD.EXE\shell" /v "FriendlyCacheCTime" /t REG_BINARY /d 00B9DD34878DBE01 /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\WINWORD.EXE\shell" /v "FriendlyCache" /d "Microsoft Word for Windows" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\WINWORD.EXE\shell\open\command" /d "%D%WinWord.exe\" \"%%1" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\WINWORD.EXE\DefaultIcon" /ve /d "%D%WinWord.exe,1" /f >nul
reg add "HKEY_CLASSES_ROOT\CLSID\{00020906-0000-0000-C000-000000000046}" /ve "Microsoft Word 文档" /f >nul
reg add "HKEY_CLASSES_ROOT\CLSID\{00020906-0000-0000-C000-000000000046}\DefaultExtension" /ve ".doc,Word Document (.doc)" /f >nul
reg add "HKEY_CLASSES_ROOT\CLSID\{00020906-0000-0000-C000-000000000046}\DefaultIcon" /ve /d "%D%WinWord.exe,1" /f >nul
reg add "HKEY_CLASSES_ROOT\CLSID\{00020906-0000-0000-C000-000000000046}\ProgID" /ve "Word.Document.8" /f >nul
reg add "HKEY_CLASSES_ROOT\CLSID\{00020906-0000-0000-C000-000000000046}\Version" /ve "9" /f >nul
reg add "HKEY_CLASSES_ROOT\CLSID\{00020906-0000-0000-C000-000000000046}\VersionIndependentProgID" /ve "Word.Document" /f >nul
reg add "HKEY_CLASSES_ROOT\CLSID\{00020906-0000-0000-C000-000000000046}\LocalServer32" /d "%D%WinWord.exe" /f >nul
reg add "HKEY_CURRENT_USER\Software\Netscape\Netscape Navigator\Suffixes" /v "application/rtf" /d "RTF" /f >nul
reg add "HKEY_CURRENT_USER\Software\Netscape\Netscape Navigator\Suffixes" /v "application/msword" /d "DOC" /f >nul
reg add "HKEY_CURRENT_USER\Software\Netscape\Netscape Navigator\Viewers" /v "TYPE4" /d "application/msword" /f >nul
reg add "HKEY_CURRENT_USER\Software\Netscape\Netscape Navigator\Viewers" /v "TYPE5" /d "application/rtf" /f >nul
reg add "HKEY_CURRENT_USER\Software\Netscape\Netscape Navigator\Viewers" /v "application/rtf" /d "%D%WinWord.exe" /f >nul
reg add "HKEY_CURRENT_USER\Software\Netscape\Netscape Navigator\Viewers" /v "application/msword" /d "%D%WinWord.exe" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Accepted Documents" /v "*" /d "application/msword" /f >nul
reg add "HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/msword" /v "Extension" /d ".doc" /f >nul
reg add "HKEY_CLASSES_ROOT\.rtf" /ve "Word.RTF.8" /f >nul
reg add "HKEY_CLASSES_ROOT\.rtf" /v "Content Type" /d "application/msword" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.RTF.8" /v "EditFlags" /t REG_BINARY /d 00000100 /f >nul
reg add "HKEY_CLASSES_ROOT\Word.RTF.8" /ve "RTF 格式" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.RTF.8\shell" /ve "Open" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.RTF.8\shell\Open" /ve "打开(&O)" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.RTF.8\shell\Open\command" /ve "%01%\WinWord.exe\" \"%%1" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.RTF.8\DefaultIcon" /ve /d "%D%WinWord.exe,1" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.RTF.8\CLSID" /ve "{00020906-0000-0000-C000-000000000046}" /f >nul
reg add "HKEY_CLASSES_ROOT\.doc" /ve "Word.Document.8" /f >nul
reg add "HKEY_CLASSES_ROOT\.doc" /v "Content Type" /d "application/msword" /f >nul
reg add "HKEY_CLASSES_ROOT\.doc\Word.Document.8\ShellNew" /v "FileName" /d "winword8.doc" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document" /ve "Microsoft Word 文档" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document\CurVer" /ve "Word.Document.8" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document\CLSID" /ve "{00020906-0000-0000-C000-000000000046}" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document.8" /v "EditFlags" /t REG_BINARY /d 00000100 /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document.8" /ve "Microsoft Word 文档" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document.8\shell" /ve "Open" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document.8\shell\Open" /ve "打开(&O)" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document.8\shell\Open\command" /ve "%01%\WinWord.exe\" \"%%1" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document.8\protocol\StdFileEditing\server" /d "%D%WinWord.exe" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document.8\DefaultIcon" /ve /d "%D%WinWord.exe,1" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document.8\CLSID" /ve "{00020906-0000-0000-C000-000000000046}" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Document\CurVer" /ve "Word.Document.8" /f >nul
reg add "HKEY_CLASSES_ROOT\.dot" /ve "Word.Template.8" /f >nul
reg add "HKEY_CLASSES_ROOT\.dot" /v "Content Type" /d "application/msword" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Template.8" /v "EditFlags" /t REG_BINARY /d 00000100 /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Template.8" /ve "Microsoft Word 模板" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Template.8\shell" /ve "Open" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Template.8\shell\Open" /ve "打开(&O)" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Template.8\shell\Open\command" /ve "%01%\WinWord.exe\" \"%%1" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Template.8\DefaultIcon" /ve /d "%D%WinWord.exe,2" /f >nul
reg add "HKEY_CLASSES_ROOT\Word.Template.8\CLSID" /ve "{00020906-0000-0000-C000-000000000046}" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\Excel.exe\shell" /ve "open" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\Excel.exe\shell" /v "FriendlyCacheCTime" /t REG_BINARY /d 00131BB5B58DBE01 /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\Excel.exe\shell" /v "FriendlyCache" /d "Microsoft Excel for Windows" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\Excel.exe\shell\open\command" /d "%D%Excel.exe\" \"%%1" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\Excel.exe\DefaultIcon" /ve /d "%D%Excel.exe,1" /f >nul
reg add "HKEY_CLASSES_ROOT\.xls" /ve "Excel.Chart.8" /f >nul
reg add "HKEY_CLASSES_ROOT\.xls" /v "Content Type" /d "application/vnd.ms-excel" /f >nul
reg add "HKEY_CLASSES_ROOT\Excel.Chart.8" /v "EditFlags" /t REG_BINARY /d 00000100 /f >nul
reg add "HKEY_CLASSES_ROOT\Excel.Chart.8" /ve "Microsoft Excel 工作簿" /f >nul
reg add "HKEY_CLASSES_ROOT\Excel.Chart.8\shell" /ve "Open" /f >nul
reg add "HKEY_CLASSES_ROOT\Excel.Chart.8\shell\Open" /ve "打开(&O)" /f >nul
reg add "HKEY_CLASSES_ROOT\Excel.Chart.8\shell\Open\command" /ve "%01%\Excel.exe\" \"%%1" /f >nul
reg add "HKEY_CLASSES_ROOT\Excel.Chart.8\DefaultIcon" /ve /d "%D%Excel.exe,1" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\PowerPnt.exe\shell" /ve "open" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\PowerPnt.exe\shell" /v "FriendlyCacheCTime" /t REG_BINARY /d 00131BB5B58DBE01 /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\PowerPnt.exe\shell" /v "FriendlyCache" /d "Microsoft PowerPoint for Windows" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\PowerPnt.exe\shell\open\command" /d "%D%PowerPnt.exe\" "%%1" /f >nul
reg add "HKEY_CLASSES_ROOT\Applications\PowerPnt.exe\DefaultIcon" /ve /d "%D%PowerPnt.exe,1" /f >nul
reg add "HKEY_CLASSES_ROOT\.ppt" /ve "PowerPoint.Show.8" /f >nul
reg add "HKEY_CLASSES_ROOT\.ppt" /v "Content Type" /d "application/vnd.ms-powerpoint" /f >nul
reg add "HKEY_CLASSES_ROOT\PowerPoint.Show.8" /v "EditFlags" /t REG_BINARY /d 00000100 /f >nul
reg add "HKEY_CLASSES_ROOT\PowerPoint.Show.8" /ve "Microsoft PowerPoint 演示文稿" /f >nul
reg add "HKEY_CLASSES_ROOT\PowerPoint.Show.8\shell" /ve "Open" /f >nul
reg add "HKEY_CLASSES_ROOT\PowerPoint.Show.8\shell\Open" /ve "打开(&O)" /f >nul
reg add "HKEY_CLASSES_ROOT\PowerPoint.Show.8\shell\Open\command" /ve "%01%\PowerPnt.exe\" \"%%1" /f >nul
reg add "HKEY_CLASSES_ROOT\PowerPoint.Show.8\shell\Show" /ve "放映(&H)" /f >nul
reg add "HKEY_CLASSES_ROOT\PowerPoint.Show.8\shell\Show\command" /ve "%01%\PowerPnt.exe\" /s \"%%1" /f >nul
reg add "HKEY_CLASSES_ROOT\PowerPoint.Show.8\DefaultIcon" /ve /d "%D%PowerPnt.exe,1" /f >nul
---------------------------完毕 |
|