@echo off
setlocal EnableDelayedExpansion
set name="ExRun"
set txt="%ALLUSERSPROFILE%\桌面\%name%.txt"
set bat="%ALLUSERSPROFILE%\桌面\%name%.bat"
set RegPath=HKEY_CURRENT_USER\Control Panel\Desktop\HungAppTimeout#HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run#HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run#! (以后可能增加项)
set test=#a#b#c#d!
@echo off
for /F "eol=! delims=# tokens=1,2-16" %%i in ("%RegPath%") do (
:echo %%i
::@echo %%j
::@echo %%k
regedit /e HungTime.reg %%i (这句无法执行成功)
regedit /e CurrRun.reg %%j
regedit /e LocalRun.reg %%k
type CurrRun.reg > temp.reg
type LocalRun.reg >> temp.reg
type HungTime.reg >> temp.reg
date /T >> %txt%
time /T >> %txt%
type temp.reg >> %bat%
type temp.reg >> %txt% && del temp.reg
)作者: sixes 时间: 2011-1-25 11:05