返回列表 发帖

[注册表类] 批处理怎样如何批量删除注册表项?

HKEY_CLASSES_ROOT\Installer\Features\445456456464646231F01FEC
HKEY_CLASSES_ROOT\Installer\Features\4465464564564561231F01FEC
HKEY_CLASSES_ROOT\Installer\Features\4786786767676767F01FEC
HKEY_CLASSES_ROOT\Installer\Features\43413413123131231F01FEC
……
HKEY_CLASSES_ROOT\Installer\Features\45676464543131231F01FEC


我要批量删除Features下面的以F01FEC结尾的项,该如何操作?

本帖最后由 lxzzr 于 2011-6-11 00:17 编辑

什么操作系统??

PowerShell -command "& {new-psdrive -name hkcr -psprovider registry -root hkey_classes_root; remove-item hkcr:\installer\features\*F01FEC}"

TOP

2# lxzzr


WINDOWS2003,貌似不行。

TOP

@echo off
for /f "delims=" %%i in ('reg query "HKEY_CLASSES_ROOT\Installer\Features"^|findstr /i /e "F01FEC"') do reg delete "%%i" /fCOPY

TOP

4# fastslz


可以了,谢谢,还是不够熟。

TOP

返回列表