无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 2006|回复: 8
打印 上一主题 下一主题

[求助] 请教, 注册表挂载HKEY_CURRENT_USER

[复制链接]
跳转到指定楼层
1#
发表于 2019-1-10 23:56:17 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
我用.bat将WinPE的注册表挂载到win7:

REG LOAD "HKLM\WinPE-DEFAULT" Default
REG LOAD "HKLM\WinPE-SOFTWARE" Software
REG LOAD "HKLM\WinPE-SYSTEM" System
START /B REGEDIT

例如我要加入WinRAR到HKEY_CURRENT_USER\SOFTWARE:

[HKEY_CURRENT_USER\SOFTWARE\WinRAR\Extraction]
"DefFolder"="C:\\(Test-1)"

WinRAR.reg改成下面导入到.DEFAULT:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\WinPE-.DEFAULT\SOFTWARE\WinRAR\Extraction]
"DefFolder"="C:\\(Test-1)"

导出注册表:

REG UNLOAD "HKLM\WinPE-.DEFAULT"
REG UNLOAD "HKLM\WinPE-SOFTWARE"
REG UNLOAD "HKLM\WinPE-SYSTEM"
attrib -s -h -r *.*

完成之后, 在WinPE内看到WinRAR是在HKEY_USERS\.DEFAULT\Software\WinRAR
HKEY_CURRENT_USER\Software内没有WinRAR.

请问如何才能加到HKEY_CURRENT_USER\Software内的?

谢谢.
2#
发表于 2019-1-11 00:29:22 | 只看该作者
说的复杂看不懂。我pe是这样的@ECHO OFF
PUSHD %~dp0

REGEDIT /S "%CD%\WinRAR.REG"
REG ADD HKCR\CLSID\{B41DB860-8EE4-11D2-9906-E49FADC173CA}\InProcServer32 /ve /t REG_SZ /d "%CD%\rarext.dll" /F >NUL
REG DELETE HKCR\.zip\ShellNew /F >NUL
REG ADD HKCR\WinRAR\DefaultIcon /ve /t REG_SZ /d "%CD%\WinRAR.exe,0" /F >NUL
REG ADD HKCR\WinRAR\shell\open\command /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\"" /F >NUL
REG ADD HKCR\WinRAR.REV\DefaultIcon /ve /t REG_SZ /d "%CD%\WinRAR.exe,1" /F >NUL
REG ADD HKCR\WinRAR.REV\shell\open\command /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\"" /F >NUL
REG ADD HKCR\WinRAR.ZIP\DefaultIcon /ve /t REG_SZ /d "%CD%\WinRAR.exe,0" /F >NUL
REG ADD HKCR\WinRAR.ZIP\shell\open\command /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\"" /F >NUL
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /ve /t REG_SZ /d "%CD%\WinRAR.exe" /F >NUL
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /v Path /t REG_SZ /d "%CD%\WinRAR" /F >NUL
If Not Exist "%SystemRoot%\System32\CABINET.DLL" GOTO END
REG ADD HKCR\.CAB /ve /t REG_SZ /d WinRAR /F>NUL
REG ADD HKCU\Software\WinRAR\Setup\.cab /v Set /t REG_DWORD /d 1 /F>NUL
REG ADD HKCU\Software\WinRAR\Setup\.cab /v Exist /t REG_DWORD /d 1 /F>NUL
REG ADD HKCU\Software\WinRAR\Setup\.cab /v Type /t REG_SZ /d "CLSID\{0CD7A5C0-9F37-11CE-AE65-08002B2E1262}" /F>NUL
REG ADD HKCU\Software\WinRAR\Setup\.cab /v Content /t REG_SZ /F>NUL
REG ADD HKCU\Software\WinRAR\Setup\.cab /v ShellNew /t REG_SZ /F>NUL

rem regsvr32.exe /s "%CD%\RarExt.dll"
reg add "HKLM\SOFTWARE\Classes\*\ShellEx\ContextMenuHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\CLSID\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d "WinRAR"
reg add "HKLM\SOFTWARE\Classes\CLSID\{B41DB860-64E4-11D2-9906-E49FADC173CA}\InProcServer32" /f /ve /t REG_SZ /d "%CD%\rarext.dll"
reg add "HKLM\SOFTWARE\Classes\CLSID\{B41DB860-64E4-11D2-9906-E49FADC173CA}\InProcServer32" /f /v "ThreadingModel" /t REG_SZ /d "Apartment"
reg add "HKLM\SOFTWARE\Classes\Directory\ShellEx\ContextMenuHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\Directory\ShellEx\DragDropHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\Drive\shellex\DragDropHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\exefile\shellex\PropertySheetHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""
reg add "HKLM\SOFTWARE\Classes\folder\ShellEx\ContextMenuHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\folder\ShellEx\DragDropHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\WinRAR" /f /ve /t REG_SZ /d "WinRAR 压缩文件"
reg add "HKLM\SOFTWARE\Classes\WinRAR\DefaultIcon" /f /ve /t REG_SZ /d "%CD%\WinRAR.exe,0"
reg add "HKLM\SOFTWARE\Classes\WinRAR\shell\open\command" /f /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\WinRAR\shellex\ContextMenuHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""
reg add "HKLM\SOFTWARE\Classes\WinRAR\shellex\DropHandler" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\WinRAR\shellex\PropertySheetHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""
reg add "HKLM\SOFTWARE\Classes\WinRAR.REV" /f /ve /t REG_SZ /d "RAR 恢复卷"
reg add "HKLM\SOFTWARE\Classes\WinRAR.REV\DefaultIcon" /f /ve /t REG_SZ /d "%CD%\WinRAR.exe,1"
reg add "HKLM\SOFTWARE\Classes\WinRAR.REV\shell\open\command" /f /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP" /f /ve /t REG_SZ /d "WinRAR ZIP 压缩文件"
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP\DefaultIcon" /f /ve /t REG_SZ /d "%CD%\WinRAR.exe,0"
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP\shell\open\command" /f /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP\shellex\ContextMenuHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP\shellex\DropHandler" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP\shellex\PropertySheetHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""

reg add "HKLM\SOFTWARE\WinRAR\Capabilities" /f /v "ApplicationDescription" /t REG_SZ /d "WinRAR"
reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".rar" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".zip" /t REG_SZ /d "WinRAR.ZIP"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".cab" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".arj" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".lzh" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".lha" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".ace" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".7z" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".tar" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".gz" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".tgz" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".uue" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".xxe" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".uu" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".bz2" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".tbz2" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".bz" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".tbz" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".jar" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".iso" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".z" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".taz" /t REG_SZ /d "WinRAR"
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /ve /t REG_SZ /d "%CD%\WinRAR.exe"
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /v "Path" /t REG_SZ /d "%CD%"

reg add "HKLM\SOFTWARE\Classes\.rar" /f /ve /t REG_SZ /d "WinRAR"
reg add "HKLM\SOFTWARE\Classes\.rar\ShellNew" /f /v "FileName" /t REG_SZ /d "%CD%\rarnew.dat"

rem reg add "HKLM\SOFTWARE\Classes\.zip" /f /ve /t REG_SZ /d "WinRAR.ZIP"
rem reg add "HKLM\SOFTWARE\Classes\.zip\ShellNew" /f /v "FileName" /t REG_SZ /d "%CD%\zipnew.dat"

rem reg add "HKLM\SOFTWARE\Classes\.cab" /f /ve /t REG_SZ /d "WinRAR"
rem rem reg add "HKLM\SOFTWARE\Classes\.7z" /f /ve /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\Classes\.tar" /f /ve /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\Classes\.Gz" /f /ve /t REG_SZ /d "WinRAR"

reg add "HKLM\SOFTWARE\WinRAR" /f /v "exe64" /t REG_SZ /d "%CD%\WinRAR.exe"
REGEDIT /S "%CD%\WinRAR.REG"
:END
EXIT

点评

thanks, 请看5楼.  详情 回复 发表于 2019-1-11 04:58
thanks, 请看5楼.  详情 回复 发表于 2019-1-11 04:58
回复

使用道具 举报

3#
发表于 2019-1-11 00:30:30 | 只看该作者
上命令

捕获.PNG (4.24 KB, 下载次数: 8)

捕获.PNG

点评

在PECMD.INI用这命令之后, 在初始之时, 会弹出cmd窗口, 请问怎样才能不显示这cmd窗口呢? EXEC =X:\PEsoft\Software.cmd  详情 回复 发表于 2019-1-11 04:57
回复

使用道具 举报

4#
 楼主| 发表于 2019-1-11 04:57:20 | 只看该作者

在PECMD.INI用这命令之后, 在初始之时, 会弹出cmd窗口, 请问怎样才能不显示这cmd窗口呢?

EXEC =X:\PEsoft\Software.cmd
回复

使用道具 举报

5#
 楼主| 发表于 2019-1-11 04:58:07 | 只看该作者
qwer-t 发表于 2019-1-11 00:29
说的复杂看不懂。我pe是这样的@ECHO OFF
PUSHD %~dp0

thanks, 请看5楼.
回复

使用道具 举报

6#
 楼主| 发表于 2019-1-11 04:58:07 | 只看该作者
qwer-t 发表于 2019-1-11 00:29
说的复杂看不懂。我pe是这样的@ECHO OFF
PUSHD %~dp0

thanks, 请看5楼.
回复

使用道具 举报

7#
 楼主| 发表于 2019-1-11 04:58:35 | 只看该作者

谢谢, 请看5楼.
回复

使用道具 举报

8#
发表于 2019-1-11 09:09:18 | 只看该作者
写入pecmd,启动不显示。
回复

使用道具 举报

9#
 楼主| 发表于 2019-1-11 11:12:30 | 只看该作者
本帖最后由 clautton 于 2019-1-11 14:09 编辑


只需要这一段All-Software.cmd
我用这不行, 不知哪错了:
EXEC =hide X:\PEsoft\All-Software.cmd

----

//设置分辨率,关闭小键盘,下面'TEXT ********'请勿删除!
TEAM DISP W1600 H1200 B32 F60|NUMK 0
TEXT 初始化 Windows PE 维护系统 #0xFFFFFF L370 T632 R980 B764 $25:Microsoft
EXEC ctfmon.exe

EXEC =hide X:\PEsoft\All-Software.cmd

//对所有分区进行逆序搜索PESOFT.INI并加载外置或内置软件工具
FORX !\PEsoft\PEsoft.ini,MyIni,1,LOAD %MyIni%
EXEC PESET.exe Desktop
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-11-28 11:13

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表