当前位置:文档之家› 清理系统垃圾及优化网络 批处理命令代码

清理系统垃圾及优化网络 批处理命令代码

清理系统垃圾及优化网络 批处理命令代码
清理系统垃圾及优化网络 批处理命令代码

把下面代码复制到记事本中,然后改后缀为…….dat 如

然后打开点能运行

运行效果如图

下面代码一直到最后

@echo off

cls

rem

rem Contact: [url=] [/url]

rem

rem This program is free software; you can redistribute it and/or modify it under

rem the terms of the GNU General Public License as published by the Free Software Foundation; rem either version 2 of the License, or (at your option) any later version.

rem This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;

rem without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rem See the GNU General Public License for more details.

rem

rem Y ou should have received a copy of the GNU General Public License along with this

program;

rem if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, rem MA 02111-1307, USA.

echo.

REM Tested on ... WinXP_SP2

REM Always basic XP64 Support

REM Modifications to BITS service (cause of v5 WindowsUpdate) - #discharged#

REM Additional notices corresponding to DHCP issue

REM V ariables problems during RESTORE_DEFAULT usage fixed

REM SMBDEVICEENABLED Restore Bug fixed

REM Mod_history-09-27-2005**11-08-2005**11-29-2005**12-07-2005**12-18-2005 setlocal

REM *** INIT_V ARS ***

set CHK_SVC=YES

set XPSP2=FALSE

set SERVER=FALSE

set NT_SERVER_CHK=TRUE

:START

echo "svc2kXp.cmd" 正在检测您的电脑,稍后进行优化!

echo ================================================================ set find=%SystemRoot%\System32\find.exe

set regedit=%SystemRoot%\regedit.exe

if not exist "%find%" goto :NOFIND

if not exist "%regedit%" goto :NOREGEDIT

if not "%1" == "%*" goto :SYNTAX

if /I "%1"=="/?" goto :HELP

if /I "%1"=="/help" goto :HELP

if /I "%1"=="-h" goto :HELP

if /I "%1"=="--help" goto :HELP

if /I "%1"=="-?" goto :HELP

if /I "%1"=="--?" goto :HELP

if /I "%1"=="/fix" goto :FIX

goto :VERSION

:SYNTAX

echo.

echo.

echo !!Syntax error!!

echo ________________

echo Es kann nur ein oder kein Parameter angegeben werden.

echo.

echo Only one or no parameter allowed.

goto :QUIT

:HELP

echo.

echo -= Hilfe =-

echo Parameter:

echo /lan.......Einige Dienste fuer LAN-Betrieb werden nicht veraendert.

echo /std.......Schliesst alle Ports, einige Dienste bleiben unveraendert.

echo /all.......Setzt alle V orschlaege nach www.ntsvcfg.de um (hardening).

echo /restore...Nimmt die zuletzt vorgenommenen Aenderungen zurueck.

echo /reLAN.....Reaktiviert Dienste, die fuer LAN-Betrieb benoetigt werden.

echo /default...Setzt alle Diensteinstellungen auf urspr黱gliche Werte zur點k.

echo.

echo Parameters:

echo /lan.......Some services needed for LAN-usage stay unchanged!

echo /std.......Closes all Ports, but some services stay unchanged

echo /all.......Changes all issues recommended by www.ntsvcfg.de ("hardening")

echo /restore...Undo last changes.

echo /reLAN.....Reactivates services required for LAN.

echo /default...Restoring factory service settings (before first time usage)

echo.

echo example: svc2kxp.cmd /all

echo.

set /P CHS= [Press "G" for GNU GPL informations or "Q" for quit]?

if /I "%CHS%"=="G" goto :GNU_GPL

if /I "%CHS%"=="Q" goto :QUIT_EXT

CLS

goto :HELP

:GNU_GPL

CLS

echo Informations about GNU-General Public License for "svc2kxp.cmd"

echo =============================================================== echo.

echo Copyright (C) 2003-05 Ansgar Wiechers, Torsten Mann

echo Contact: [url=mailto:admin@ntsvcfg.de]admin@ntsvcfg.de[/url]

echo.

echo This program is free software; you can redistribute it and/or modify it under

echo the terms of the GNU General Public License as published by the Free Software

echo Foundation; either version 2 of the License, or (at your option) any later

echo version. This program is distributed in the hope that it will be useful, but

echo WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or

echo FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more echo details.

echo.

echo Y ou should have received a copy of the GNU General Public License along with

echo this program; if not, write to the:

echo.

echo Free Software Foundation, Inc.

echo 59 Temple Place, Suite 330

echo Boston, MA 02111-1307, USA.

echo.

set /P CHS= [Press "H" for help or "Q" for quit]?

CLS

if /I "%CHS%"=="H" goto :HELP

if /I "%CHS%"=="Q" goto :QUIT_EXT

goto GNU_GPL

:VERSION

echo Checking system version ...

if /I "%NT_SERVER_CHK%"=="FALSE" goto :SKIP_NT_SERVER_CHK

REM Checking for running server version

"%regedit%" /e "%TEMP%\~svr.txt" "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions"

type "%TEMP%\~svr.txt"|"%find%" /i "Server" >NUL

if not errorlevel 1 set SERVER=TRUE

type "%TEMP%\~svr.txt"|"%find%" /i "LanMan" >NUL

if not errorlevel 1 set SERVER=TRUE

if exist "%TEMP%\~svr.txt" del /F /Q "%TEMP%\~svr.txt"

if /I "%SERVER%"=="TRUE" goto :NTSERVER

:SKIP_NT_SERVER_CHK

ver | "%find%" /i "Windows 2000" > nul

if not errorlevel 1 goto :OS2K

ver | "%find%" /i "Windows XP" > nul

if not errorlevel 1 goto :OSXP

ver | "%find%" /i "Microsoft Windows [V ersion 5.2.3790]" > nul

if not errorlevel 1 goto :OSXP64

echo !!Failed!!

echo __________

echo.

echo Dieses Script ist nur unter Windows 2000 oder XP lauffaehig!

echo.

echo This script works only on Windows 2000/XP machines!

echo.

goto :QUIT

:NOFIND

echo.

echo !!Failed!!

echo __________

echo.

echo Leider konnte folgende Datei nicht gefunden werden:

echo.

echo Sorry, but following file is missing:

echo.

echo.

echo # %SystemRoot%\System32\FIND.EXE

echo.

echo.

goto :QUIT

:NOREGEDIT

echo.

echo !!Failed!!

echo __________

echo.

echo Leider konnte folgende Datei nicht gefunden werden:

echo.

echo Sorry, but following file is missing:

echo.

echo.

echo # %SystemRoot%\REGEDIT.EXE

echo.

echo.

goto :QUIT

:NTSERVER

echo.

echo !!Failed!!

echo __________

echo.

echo Dieses Script unterstuetzt keine NT Server V ersionen!

echo.

echo This script doesn't support NT server versions!

echo.

goto :QUIT

:OS2K

rem Specific OS Detection I

set SYSTEM=2k

rem Testing for XP ServicePacks

"%regedit%" /e "%TEMP%\~svclist.txt" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentV ersion"

type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 4" >NUL

if errorlevel==1 (

type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 3" >NUL

if errorlevel==1 (

type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 2" >NUL

if errorlevel==1 (

type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 1" >NUL

if errorlevel==1 (

echo !Windows 2000 [no or unknown Service Pack] detected!

goto NO_2KSP

)

echo !Windows 2000 [Service Pack 1] detected!

goto :NO_2KSP

)

echo !Windows 2000 [Service Pack 2] detected!

goto :NO_2KSP

)

echo !Windows 2000 [Service Pack 3] detected!

goto :NO_2KSP

)

echo !Windows 2000 [Service Pack 4] detected!

goto :NO_2KSP

:NO_2kSP

if exist "%TEMP%\~svclist.txt" del /F /Q "%TEMP%\~svclist.txt"

goto :CONTINUE

:OSXP

rem Specific OS detection II

set SYSTEM=xp

rem Testing for XP ServicePack 2

"%regedit%" /e "%TEMP%\~svclist.txt" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentV ersion"

type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 2" >NUL

if errorlevel==1 (

type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 1" >NUL

if errorlevel==1 (

SET XPSP2=FALSE

echo !Windows XP [no or unknown Service Pack] detected!

goto NO_XPSP

)

SET XPSP2=FALSE

echo !Windows XP [Service Pack 1] detected!

goto :NO_XPSP

)

SET XPSP2=TRUE

echo !Windows XP [ServicePack 2] detected!

goto :NO_XPSP

:OSXP64

rem Specific OS detection II

set SYSTEM=xp

rem Testing for XP ServicePack 2

"%regedit%" /e "%TEMP%\~svclist.txt" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentV ersion"

type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 2" >NUL

if errorlevel==1 (

type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 1" >NUL

if errorlevel==1 (

SET XPSP2=FALSE

echo !EXPERIMENTAL! Windows XP64 [no or unknown Service Pack] detected!

goto NO_XPSP

)

SET XPSP2=FALSE

echo !EXPERIMENTAL! Windows XP64 [Service Pack 1] detected!

goto :NO_XPSP

)

SET XPSP2=TRUE

echo !EXPERIMENTAL! Windows XP64 [ServicePack 2] detected!

goto :NO_XPSP

:NO_XPSP

if exist "%TEMP%\~svclist.txt" del /F /Q "%TEMP%\~svclist.txt"

goto :CONTINUE

:CONTINUE

REM Creating subdirectory "ntsvcfg" in userprofile if necessary

if not exist "%USERPROFILE%\ntsvcfg\*.*" mkdir "%USERPROFILE%\ntsvcfg"

REM Moving old script backup files to ...\%USERNAME%\ntsvcfg :

if exist "%USERPROFILE%\dcom.reg" move /Y"%USERPROFILE%\dcom.reg" "%USERPROFILE%\ntsvcfg\dcom.reg"

if exist "%USERPROFILE%\dcomp.reg" move /Y"%USERPROFILE%\dcomp.reg" "%USERPROFILE%\ntsvcfg\dcomp.reg"

if exist "%USERPROFILE%\services.reg" move /Y"%USERPROFILE%\services.reg" "%USERPROFILE%\ntsvcfg\services.reg"

if exist "%USERPROFILE%\current_services_config.reg" move /Y "%USERPROFILE%\current_services_config.reg"

"%USERPROFILE%\ntsvcfg\current_services_config.reg"

if exist "%USERPROFILE%\smb.reg" move /Y"%USERPROFILE%\smb.reg" "%USERPROFILE%\ntsvcfg\smb.reg"

if exist "%USERPROFILE%\FPRINT.REF" move /Y"%USERPROFILE%\FPRINT.REF" "%USERPROFILE%\ntsvcfg\FPRINT.REF"

if exist "%USERPROFILE%\handler_aim.reg" move /Y"%USERPROFILE%\handler_aim.reg" "%USERPROFILE%\ntsvcfg\handler_aim.reg"

if exist "%USERPROFILE%\handler_gopher.reg" move /Y "%USERPROFILE%\handler_gopher.reg" "%USERPROFILE%\ntsvcfg\handler_gopher.reg"

if exist "%USERPROFILE%\handler_telnet.reg" move /Y "%USERPROFILE%\handler_telnet.reg" "%USERPROFILE%\ntsvcfg\handler_telnet.reg"

if exist "%USERPROFILE%\services.reg.default" move /Y "%USERPROFILE%\services.reg.default" "%USERPROFILE%\ntsvcfg\services.reg.default"

if exist "%USERPROFILE%\dcom.reg.default" move /Y"%USERPROFILE%\dcom.reg.default"

"%USERPROFILE%\ntsvcfg\dcom.reg.default"

if exist "%USERPROFILE%\dcomp.reg.default" move /Y "%USERPROFILE%\dcomp.reg.default" "%USERPROFILE%\ntsvcfg\dcomp.reg.default"

if exist "%USERPROFILE%\smb.reg.default" move /Y"%USERPROFILE%\smb.reg.default" "%USERPROFILE%\ntsvcfg\smb.reg.default"

if exist "%USERPROFILE%\handler_aim.reg.default" move /Y "%USERPROFILE%\handler_aim.reg.default"

"%USERPROFILE%\ntsvcfg\handler_aim.reg.default"

if exist "%USERPROFILE%\handler_gopher.reg.default" move /Y "%USERPROFILE%\handler_gopher.reg.default"

"%USERPROFILE%\ntsvcfg\handler_gopher.reg.default"

if exist "%USERPROFILE%\handler_telnet.reg.default" move /Y "%USERPROFILE%\handler_telnet.reg.default"

"%USERPROFILE%\ntsvcfg\handler_telnet.reg.default"

REM *****Declarations*****

set SELECT="no"

set SVC_BAK=%USERPROFILE%\ntsvcfg\services.reg

set SVC_SA V=%USERPROFILE%\ntsvcfg\current_services_config.reg

set DCOM_BAK=%USERPROFILE%\ntsvcfg\dcom.reg

set DCOMP_BAK=%USERPROFILE%\ntsvcfg\dcomp.reg

set SMB_BAK=%USERPROFILE%\ntsvcfg\smb.reg

set DCOM_TMP=%TEMP%\dcomoff.reg

set DCOMP_TMP=%TEMP%\dcompoff.reg

set SMB_TMP=%TEMP%\smboff.reg

set FPRINT=%USERPROFILE%\ntsvcfg\FPRINT.REF

set HANDLER1=%USERPROFILE%\ntsvcfg\handler_aim.reg

set HANDLER2=%USERPROFILE%\ntsvcfg\handler_gopher.reg

set HANDLER3=%USERPROFILE%\ntsvcfg\handler_telnet.reg

set NB_TMP=%TEMP%\nb_off.vbs

set srctmp=%USERPROFILE%\ntsvcfg\~srcreate.vbs

set DHCP_CHANGES="YES"

REM *****Options*****

set SCHEDULER_ENABLED=NO

set UseXPSysRestore=YES

set RESTORE=NO

set SVC_MOD=NO

set USE_FPRINT=YES

set Deactivate_NetBIOS=YES

set RESTORE_MODE=2

REM *****APP_PA THs******

set NET=%SystemRoot%\system32\net.exe

set SC=%SystemRoot%\system32\sc.exe

set FC=%SystemRoot%\system32\fc.exe

set IPCONFIG=%SystemRoot%\system32\ipconfig.exe

echo Checking available permissions: [local], please wait ...

"%net%" user "%USERNAME%" 2> nul | "%find%" /i "admin" | "%find%" /i /v "name" > nul

if errorlevel 1 (

echo " " " : [domain], please wait ...

"%net%" user "%USERNAME%" /domain 2> nul | "%find%" /i "admin" | "%find%" /i /v "name" > nul

if errorlevel 1 (

echo.

echo Failed!

echo __________

echo Leider verfuegen Sie nicht ueber die erforderlichen Rechte!

echo Melden Sie sich bitte als Administrator an.

echo.

echo Sorry but you don't have the permissions required for this task.

echo Please login as Administrator.

echo.

goto :END

)

)

set IMPORT_OLD_FILES=FALSE

rem searching for sc.exe

if not exist "%FPRINT%" echo Checking for presence of SC.EXE ...

"%sc%" qc > nul 2>&1

if errorlevel 1 (

echo !!Failed!!

echo __________

echo Die notwendige Datei SC.EXE konnte leider nicht unter

echo [%SystemRoot%\SYSTEM32\] gefunden werden.

echo Bitte laden Sie sich diese Datei von der unten genannten Adresse herunter:

echo.

echo SC.EXE couldn't be found in [%SystemRoot%\SYSTEM32\].

echo Please download it from following location:

echo.

echo.

echo -= ftp://https://www.doczj.com/doc/0416974711.html,/reskit/win2000/sc.zip =-

echo.

echo Self-installing SC.EXE

echo ======================

echo svx2kxp.cmd kann versuchen, die notwendige Datei selbst zu installieren.

echo Hierzu benoetigen Sie eine bestehende Internetverbindung.

echo.

echo svc2kxp.cmd may try to download the required file SC.EXE itself if an

echo active internet connection exists.

goto :SC_DOWNLOAD

)

if /I "%1"=="/all" (

set SELECT="/all"

goto :SKIP_MENUE

)

if /I "%1"=="/relan" (

set SELECT="/relan"

goto :SKIP_MENUE

)

if /I "%1"=="/std" (

set SELECT="/std"

goto :SKIP_MENUE

)

if /I "%1"=="/default" goto :RESTORE_DEFAULTS

rem checking for modified services

if /I %CHK_SVC%==YES (

if /I %USE_FPRINT%==YES (

if exist "%FPRINT%" (

rem Creating fingerprint of current service settings...

if exist "%USERPROFILE%\ntsvcfg\svc2cmp.sav" del /F /Q "%USERPROFILE%\ntsvcfg\svc2cmp.sav"

"%sc%" query type= service state= all bufsize= 8192 | %FIND% "SERVICE_NAME" >%TEMP%\~svclist.txt

for /F "tokens=1*" %%a in (%TEMP%\~svclist.txt) do (

echo %%b >>"%USERPROFILE%\ntsvcfg\svc2cmp.sav"

"%sc%" query "%%b" | %FIND% "STA TE" >>"%USERPROFILE%\ntsvcfg\svc2cmp.sav"

"%sc%" qc "%%b" | %FIND% "DISPLAY_NAME" >>"%USERPROFILE%\ntsvcfg\svc2cmp.sav"

"%SC%" qc "%%b" | %FIND% "START_TYPE" >>"%USERPROFILE%\ntsvcfg\svc2cmp.sav" echo. >> "%USERPROFILE%\ntsvcfg\svc2cmp.sav"

)

del "%TEMP%\~svclist.txt"

"%FC%" "%FPRINT%" "%USERPROFILE%\ntsvcfg\svc2cmp.sav" >NUL

if errorlevel 1 goto :DIFF

goto OK

:DIFF

echo Checking for modified services ... failed-services maybe modified! [E]valuate

set SVC_MOD=YES

goto :MOD_END

:OK

echo Checking for modified services ... OK

set SVC_MOD=NO

if exist "%USERPROFILE%\ntsvcfg\svc2cmp.sav" del /F /Q "%USERPROFILE%\ntsvcfg\svc2cmp.sav"

goto :MOD_END

:MOD_END

REM

)

)

)

set CHK_SVC=NO

if /I "%1"=="/restore" goto :RESTORE

:MENUE

if /I "%1"=="/lan" goto :SKIP_MENUE

echo.

set /P CHS= 请选择您的优化方式: [1]深度优化[2]简洁优化:选择后按回车键继续

if /I "%CHS%"=="1" (

set SELECT="/lan"

goto :SKIP_MENUE

)

if /I "%CHS%"=="2" (

set SELECT="/std"

goto :SKIP_MENUE

)

if /I "%CHS%"=="3" (

set SELECT="/all"

goto :SKIP_MENUE

)

if /I "%CHS%"=="4" goto :RESTORE

if /I "%CHS%"=="R" goto :RESTORE

if /I "%CHS%"=="M" goto :MORE_OPTIONS

if /I "%SVC_MOD%"=="YES" if /I "%CHS%"=="E" goto :EV ALUA TE_SERVICES

if /I "%CHS%"=="G" goto :CREA TING_NEW_FINGERPRINT

if /I "%CHS%"=="Q" goto :QUIT

cls

goto :START

:SKIP_MENUE

rem Checking if old restorefiles exists.

rem if it is so old files will be restored before new changes

if not exist "%SVC_BAK%" goto :NO_RESTORE

if /I %RESTORE_MODE%==3 goto :NO_RESTORE

if /I %RESTORE_MODE%==4 goto :NO_RESTORE

set RESTORE=YES

echo.

echo _______________________________________________________________________ echo.

echo [Selected Restore Mode: %RESTORE_MODE%]

echo.

echo # Achtung: Alte Sicherungsdateien gefunden!

echo.

echo "Svc2kXp.cmd" wurde schon einmal ausgefuehrt. Damit neue Aenderungen

echo korrekt durchgefuehrt werden koennen, werden die Sicherungsdateien

echo eingespielt.

echo.

echo.

echo Attention: old restore-files found!

echo.

echo This program runs not for the first time. To apply all new changes

echo correctly old restore files will used to get an definite state.

echo.

echo.

echo # Starting restore ...

goto RESTORE_EXT

:NO_RESTORE

rem query if taskplaner should run

if /I "%SYSTEM%"=="2k" goto :SKIP_SQUERY

if /I "%SYSTEM%"=="xp" (

if /I %SELECT%=="" goto :SKIP_SQUERY

if /I %SELECT%=="/all" goto :SKIP_SQUERY

if /I %XPSP2%==True (

set SCHEDULER_ENABLED=YES

goto :SKIP_SQUERY

)

)

echo.

echo.

echo Rueckfrage / Query

echo ==================

echo.

echo Soll der Dienst "Taskplaner" beendet werden?

echo.

echo Wenn sie zeitgesteuerten Aufgaben [z.B. Antiviren-Updates] oder die automati- echo sche Erstellung von Systemwiederherstellungspunkten nicht benoetigen, druecken echo Sie eine BELIEBIGE TASTE, um auch Port 135 [RPC] sowie Port 1025 [Taskplaner] echo zu schliessen [empfohlen!]. Andernfalls druecken Sie "N"!

echo.

echo.

echo Should the "scheduler service" be disabled?

echo.

echo If you have time-controlled tasks [i.e. A V-Updates] or you will not set

echo automatic system restore points press ANY KEY TO CONTINUE to close port 135

echo [RPC] and port 1025 [scheduler] instantly. Otherwise press "N"

echo ___________________________________________

echo.

set /P UNDO= 是否对网络进行加速[Y/N]? 【选择后按回车键】

if /I "%UNDO%"=="n" set SCHEDULER_ENABLED=YES

:SKIP_SQUERY

if not exist "%SVC_BAK%.default" (

echo.

echo Creating backup of defaults ...

"%regedit%" /e "%SVC_BAK%.default" HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

"%regedit%" /e "%DCOM_BAK%.default" HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole

"%regedit%" /e "%DCOMP_BAK%.default" HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc

"%regedit%" /e "%SMB_BAK%.default" HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters

"%regedit%" /e "%HANDLER1%.default" HKEY_CLASSES_ROOT\AIM

"%regedit%" /e "%HANDLER2%.default" HKEY_CLASSES_ROOT\gopher

"%regedit%" /e "%HANDLER3%.default" HKEY_CLASSES_ROOT\telnet

echo ... done.

)

if exist "%SVC_BAK%" (

if /I %RESTORE_MODE%==2 goto :SKIP_SA VING

if /I %RESTORE_MODE%==4 goto :SKIP_SA VING

)

rem saving registry settings

echo _________________________________________________________________________ echo.

echo [Selected Restore Mode: %RESTORE_MODE%]

echo.

echo Saving services settings to

echo %SVC_BAK% ...

"%regedit%" /e "%SVC_BAK%" HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

echo Saving DCOM settings to

echo %DCOM_BAK% ...

"%regedit%" /e "%DCOM_BAK%" HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole echo Saving DCOM standard protocols settings to

echo %DCOMP_BAK% ...

"%regedit%" /e "%DCOMP_BAK%" HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc echo Saving SMB settings to

echo %SMB_BAK%

"%regedit%" /e "%SMB_BAK%" HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters

echo Saving URL-Handler [AIM, GOPHER, TELNET] to

echo %HANDLER1%

"%regedit%" /e "%HANDLER1%" HKEY_CLASSES_ROOT\AIM

echo %HANDLER2%

"%regedit%" /e "%HANDLER2%" HKEY_CLASSES_ROOT\gopher

echo %HANDLER3%

"%regedit%" /e "%HANDLER3%" HKEY_CLASSES_ROOT\telnet

echo.

echo All done.

echo ___________________________________________

echo.

:SKIP_SA VING

if /I "%SYSTEM%"=="xp" (

if /I %UseXPSysRestore%==YES (

goto :XPSYSRESTORE

)

)

:XPSYSRESTORE_DONE

rem reconfigure services

rem startup: demand

echo.

echo Setting services to "demand" ...

echo ___________________________________________

echo.

echo # Checking DHCP ...

"%ipconfig%" -all | "%find%" /i "Lease" > nul

if errorlevel 1 (

rem trying other method for DHCP

"%ipconfig%" -all | "%find%" /i "DHCP-Server" > nul

if errorlevel 1 (

echo ... no active DHCP found.

echo.

echo Hinweis

echo =======

echo Ihre Konfiguration deutet an, das kein DHCP benoetigt wird. Falls

echo Sie dennoch einen DSL-Internetzugang besitzen und DHCP irrtuemlich

echo deaktivert wurde, kann es nach einem Neustart zu Problemen mit der

echo Internetverbindung kommen. Starten sie zur Problembehebung den

echo DHCP-Dienst manuell neu.

echo.

echo Notice

echo ======

echo Y our configuration indicates that DHCP no longer will be required. echo But if you use a DSL internet connection this choice probably echo might be wrong. If you experiences problems during accessing the echo internet please re-activate the "DHCP Service" manually.

echo.

echo ___________________________________________

echo.

"%sc%" config DHCP start= demand

goto :SKIP_DHCP

)

)

set DHCP_CHANGES="NO"

echo ... DHCP active, status of service will NOT be changed!

echo.

:SKIP_DHCP

"%sc%" config dmadmin start= demand

"%sc%" config DNSCache start= demand

"%sc%" config mnmsrvc start= demand

"%sc%" config MSIServer start= demand

"%sc%" config NetDDE start= demand

"%sc%" config NetDDEdsdm start= demand

"%sc%" config Netman start= demand

"%sc%" config NTLMSsp start= demand

"%sc%" config NtmsSvc start= demand

"%sc%" config PolicyAgent start= demand

"%sc%" config RASAuto start= demand

"%sc%" config RASMan start= demand

"%sc%" config RSVP start= demand

"%sc%" config Scardsvr start= demand

"%sc%" query ScardDrv | "%find%" /i "OpenService FAILED" >NUL if errorlevel 1 "%sc%" config ScardDrv start= demand

if /I %XPSP2%==True (

rem If XP SP2 is installed there are less changes to XP-ICF

if /I %SELECT%=="/std" goto :SKIP_FIREWALL

)

"%sc%" config SharedAccess start= demand

:SKIP_FIREWALL

"%sc%" config Sysmonlog start= demand

"%sc%" config TAPISrv start= demand

"%sc%" config TrkWks start= demand

"%sc%" config UPS start= demand

"%sc%" config W32Time start= demand

"%sc%" config WMI start= demand

if /I %SELECT%=="/all" (

"%sc%" config SamSs start= demand

"%sc%" config LmHosts start= demand

"%sc%" config Winmgmt start= demand

)

if /I "%SYSTEM%"=="2k" (

"%sc%" config AppMgmt start= demand

"%sc%" config Browser start= demand

"%sc%" config clipsrv start= demand

"%sc%" config EventSystem start= demand

"%sc%" config Fax start= demand

"%sc%" config netlogon start= demand

"%sc%" config RPCLocator start= demand

"%sc%" config Utilman start= demand

if /I %SELECT%=="/all" (

"%sc%" config seclogon start= demand

"%sc%" config RPCSs start= demand

"%sc%" config lanmanServer start= demand

)

)

if /I "%SYSTEM%"=="xp" (

"%sc%" config ALG start= demand

"%sc%" config FastUserSwitchingCompatibility start= demand

"%sc%" config helpsvc start= demand

"%sc%" config ImapiService start= demand

"%sc%" config Nla start= demand

"%sc%" config RdSessMgr start= demand

"%sc%" config seclogon start= demand

"%sc%" config stisvc start= demand

"%sc%" config SwPrv start= demand

"%sc%" config TermService start= demand

"%sc%" config upnphost start= demand

"%sc%" config VSS start= demand

"%sc%" query WmdmPmSp | "%find%" /i "OpenService FAILED" >NUL if errorlevel 1 "%sc%" config WmdmPmSp start= demand

"%sc%" config WmiApSrv start= demand

rem Wireless Zero Configuration - fuer WLAN-V erbindungen notwendig. rem Falls erforderlich auf AUTO stellen.

rem "%sc%" config WZCSVC start= demand

)

echo.

rem startup: auto

echo Setting services to "auto" ...

"%sc%" config dmserver start= auto

"%sc%" config eventlog start= auto

"%sc%" config PlugPlay start= auto

"%sc%" config ProtectedStorage start= auto

"%sc%" config sens start= auto

"%sc%" config spooler start= auto

if /I "%SYSTEM%"=="2k" (

"%sc%" config lanmanworkstation start= auto

"%sc%" config alerter start= auto

)

if /I "%SYSTEM%"=="xp" (

"%sc%" query InteractiveLogon | "%find%" /i "OpenService FAILED" >NUL if errorlevel 1 "%sc%" config InteractiveLogon start= auto

"%sc%" config Audiosrv start= auto

"%sc%" config CryptSvc start= auto

"%sc%" config RPCSs start= auto

"%sc%" config ShellHWDetection start= auto

"%sc%" config srservice start= auto

"%sc%" query uploadmgr | "%find%" /i "OpenService FAILED" >NUL

if errorlevel 1 "%sc%" config uploadmgr start= auto

"%sc%" config WebClient start= auto

)

echo.

rem startup: disabled

echo Setting services to "disabled" ...

"%sc%" config cisvc start= disabled

"%sc%" config MSDTC start= disabled

"%sc%" config RemoteAccess start= disabled

"%sc%" config TlntSvr start= disabled

"%sc%" config messenger start= disabled

if /I %SELECT%=="/all" (

"%sc%" query BITS | "%find%" /i "SERVICE_NAME" >NUL

if not errorlevel 1 "%sc%" config BITS start= disabled

"%sc%" query wuauserv | "%find%" /i "SERVICE_NAME" >NUL

if not errorlevel 1 "%sc%" config wuauserv start= disabled

"%sc%" config schedule start= disabled

"%sc%" config RemoteRegistry start= disabled

)

if /I "%SYSTEM%"=="xp" (

"%sc%" config ERSvc start= disabled

"%sc%" config HidServ start= disabled

"%sc%" config SSDPSRV start= disabled

if /I %SELECT%=="/lan" (

if /I %SCHEDULER_ENABLED%==NO "%sc%" config schedule start= disabled )

if /I %SELECT%=="/std" (

if /I %SCHEDULER_ENABLED%==NO "%sc%" config schedule start= disabled )

if /I %XPSP2%==True (

echo.

echo XPSP2: Disabling Security Center ...

"%sc%" config wscsvc start= disabled

)

)

echo.

echo ------------------

echo # Checking and stopping unnecessary system services ...

echo.

"%sc%" query cisvc | "%find%" /i "4 RUNNING" >NUL

if not errorlevel 1 "%net%" stop cisvc

"%sc%" query RemoteAccess | "%find%" /i "4 RUNNING" >NUL

if not errorlevel 1 "%net%" stop RemoteAccess

"%sc%" query TlntSvr | "%find%" /i "4 RUNNING" >NUL

if not errorlevel 1 "%net%" stop TlntSvr

"%sc%" query MSDTC | "%find%" /i "4 RUNNING" >NUL

if not errorlevel 1 "%net%" stop MSDTC

"%sc%" query messenger | "%find%" /i "4 RUNNING" >NUL

if not errorlevel 1 "%net%" stop messenger

if /I %SELECT%=="/all" (

"%sc%" query BITS | "%find%" /i "SERVICE_NAME" >NUL

if not errorlevel 1 (

"%sc%" query BITS | "%find%" /i "4 RUNNING" >NUL

if not errorlevel 1 "%net%" stop BITS

)

"%sc%" query wuauserv | "%find%" /i "SERVICE_NAME" >NUL

if not errorlevel 1 (

"%sc%" query wuauserv | "%find%" /i "4 RUNNING" >NUL

if not errorlevel 1 "%net%" stop wuauserv

)

"%sc%" query schedule | "%find%" /i "4 RUNNING" >NUL

if not errorlevel 1 "%net%" stop schedule

)

if /I "%SYSTEM%"=="xp" (

if /I %SELECT%=="/lan" (

if /I %SCHEDULER_ENABLED%==NO "%net%" (

"%sc%" query schedule | "%find%" /i "4 RUNNING" >NUL

if not errorlevel 1 "%net%" stop schedule

)

)

if /I %SELECT%=="/std" (

if /I %SCHEDULER_ENABLED%==NO "%net%" (

"%sc%" query schedule | "%find%" /i "4 RUNNING" >NUL

if not errorlevel 1 "%net%" stop schedule

)

if /I %XPSP2%==True (

"%sc%" query wscsvc | "%find%" /i "4 RUNNING" >NUL

if not errorlevel 1 "%net%" stop wscsvc

)

)

echo ------------------

echo Disabling DCOM ...

echo REGEDIT4 > "%DCOM_TMP%"

echo. >> "%DCOM_TMP%"

echo [HKEY_LOCAL_MACHINE\SOFTW ARE\Microsoft\Ole] >> "%DCOM_TMP%"

echo "EnableDCOM"="N" >> "%DCOM_TMP%"

echo "EnableDCOMHTTP"="N" >> "%DCOM_TMP%"

echo. >> "%DCOM_TMP%"

echo. >> "%DCOM_TMP%"

"%regedit%" /s "%DCOM_TMP%"

del /F /Q "%DCOM_TMP%"

echo Disabling DCOM standard protocols ...

echo REGEDIT4 > "%DCOMP_TMP%"

echo. >> "%DCOMP_TMP%"

echo [HKEY_LOCAL_MACHINE\SOFTW ARE\Microsoft\Rpc] >> "%DCOMP_TMP%"

echo "DCOM Protocols"=hex(7):00,00,00,00 >> "%DCOMP_TMP%"

echo. >> "%DCOMP_TMP%"

echo. >> "%DCOMP_TMP%"

"%regedit%" /s "%DCOMP_TMP%"

del /F /Q "%DCOMP_TMP%"

echo Disabling port 135 (maybe 1025 too) ...

echo - Removing RPC Client Protocols

echo REGEDIT4 > "%SMB_TMP%"

echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\ClientProtocols] >> "%SMB_TMP%"

echo. >> "%SMB_TMP%"

if /I %SCHEDULER_ENABLED%==NO (

echo - Advanced RPC Configuration

echo [HKEY_LOCAL_MACHINE\SOFTW ARE\Microsoft\Rpc\Internet] >> "%SMB_TMP%" echo "PortsInternetA vailable"="N" >> "%SMB_TMP%"

echo "UseInternetPorts"="N" >> "%SMB_TMP%"

echo. >> "%SMB_TMP%"

)

if /I %XPSP2%==TRUE (

echo - Advanced RPC Configuration

echo [HKEY_LOCAL_MACHINE\SOFTW ARE\Microsoft\Rpc\Internet] >> "%SMB_TMP%" echo "PortsInternetA vailable"="N" >> "%SMB_TMP%"

echo "UseInternetPorts"="N" >> "%SMB_TMP%"

echo. >> "%SMB_TMP%"

)

echo - Removing needless URL Handler [AIM,gopher,telnet]

echo [-HKEY_CLASSES_ROOT\AIM] >> "%SMB_TMP%"

echo [-HKEY_CLASSES_ROOT\gopher] >> "%SMB_TMP%"

echo [-HKEY_CLASSES_ROOT\telnet] >> "%SMB_TMP%"

echo. >> "%SMB_TMP%"

echo. >> "%SMB_TMP%"

"%regedit%" /s "%SMB_TMP%"

del /F /Q "%SMB_TMP%"

if /I %SELECT%=="/all" (

echo.

echo Disabling SMB port 445 ...

echo REGEDIT4 > "%SMB_TMP%"

echo. >> "%SMB_TMP%"

echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters] >> "%SMB_TMP%"

echo "SMBDeviceEnabled"=dword:00000000 >> "%SMB_TMP%"

echo. >> "%SMB_TMP%"

echo. >> "%SMB_TMP%"

"%regedit%" /s "%SMB_TMP%"

del /F /Q "%SMB_TMP%"

set REBOOT_REQUIRED=yes

)

if /I %SELECT%=="/std" (

echo.

echo Disabling SMB port 445 ...

echo REGEDIT4 > "%SMB_TMP%"

echo. >> "%SMB_TMP%"

echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters] >> "%SMB_TMP%"

echo "SMBDeviceEnabled"=dword:00000000 >> "%SMB_TMP%"

echo. >> "%SMB_TMP%"

echo. >> "%SMB_TMP%"

"%regedit%" /s "%SMB_TMP%"

del /F /Q "%SMB_TMP%"

set REBOOT_REQUIRED=yes

自制一键清理系统垃圾bat

自制一键清理系统垃圾bat 大多数人都知道随着电脑使用时间边长,电脑中积累的垃圾文件会越来越多。通过安全软件来清除电脑中的垃圾是不错的方法,但是对于部分喜欢“轻量”应用的用户来说能够轻松一键的清理电脑垃圾是最理想的操作。 在Windows在安装和使用过程中都会产生相当多的垃圾文件,包括临时文件(如:*.tmp、*._mp)、临时帮助文件(*.gid)、磁盘检查文件(*.chk)、临时备份文件(如:*.old、*.bak)以及其他临时文件。特别是如果一段时间不清理IE的临时文件夹“TemporaryInternetFiles”,其中的缓存文件有时会占用上百MB的磁盘空间。这些LJ文件不仅仅浪费了宝贵的磁盘空间,严重时还会使系统运行慢如蜗牛。这点相信你肯定忍受不了吧!所以应及时清理系统的LJ文件的淤塞,保持系统的“苗条”身材,轻松流畅上网!朋友来吧,现在就让我们一起来快速清除系统垃圾吧!!下面是步骤很简单就两步! 在电脑屏幕的左下角按“开始→程序→附件→记事本”,把下面的文字复制进去,点“另存为”,路径选“桌面”,保存类型为“所有文件”,文件名为“清除系统LJ.bat”,就完成了。记住后缀名一定要是.bat,ok!你的垃圾清除器就这样制作成功了!双击它就能很快地清理垃圾文件,大约一分钟不到。 复制下面代码粘贴到笔记本上: @echo offecho 《清理垃圾文件》 echo 正在清理系统垃圾文件,请稍等……echo 删除文件或目 录:%systemdrive%\*.tmpdel /f /s /q “%systemdrive%\*.tmp” echo 删除文件或目录:%systemdrive%\*._mpdel /f /s /q “%systemdrive%\*._mp” echo 删除文件或目录:%systemdrive%\*.giddel /f /s /q “%systemdrive%\*.gid” echo 删除文件或目录:%systemdrive%\*.chkdel /f /s /q “%systemdrive%\*.chk” echo 删除文件或目录:%systemdrive%\*.olddel /f /s /q “%systemdrive%\*.old” echo 删除文件或目录:%systemdrive%\recycled\*.*del /f /s /q “%systemdrive%\recycled\*.*” echo 删除文件或目录:%windir%\*.bakdel /f /s /q “%windir%\*.bak” echo 删除文件或目录:%windir%\prefetch\*.*del /f /s /q “%windir%\prefetch\*.*” echo 删除文件或目录:%windir%\temprd /s /q “%windir%\temp” & md “%windir%\temp” echo 删除文件或目录:%userprofile%\cookies\*.*del /f /q “%userprofile%\cookies\*.*”

清理系统垃圾的命令

教你如何自己做清除电脑系统垃圾软件在电脑里点击开始:程序-附件-记事本;请从下面开始复制 @echo off echo 正在清除系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old del /f /s /q %systemdrive%\recycled\*.* del /f /s /q %windir%\*.bak del /f /s /q %windir%\prefetch\*.* rd /s /q %windir%\temp & md %windir%\temp del /f /q %userprofile%\cookies\*.* del /f /q %userprofile%\recent\*.* del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" del /f /s /q "%userprofile%\Local Settings\Temp\*.*" del /f /s /q "%userprofile%\recent\*.*" echo 清除系统LJ完成! echo. & pause 到上面停,文件名为(清除系统LJ.bat)必须是bat后缀名另存为桌面

win7最新版bat垃圾清理

@echo off color 0a title 清理win7系统垃圾--- echo ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ echo ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ echo.★☆☆★ echo.★☆☆★ echo.★☆☆★ echo ★☆正在清除系统垃圾文件,请稍等..... ☆★ echo.★☆☆★ echo ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ echo ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ echo 清理垃圾文件,速度由电脑文件大小而定。在没看到结尾信息时 echo 请勿关闭本窗口。 echo 正在清除系统垃圾文件,请稍后..... color 0a echo 删除补丁备份目录 RD %windir%\$hf_mig$ /Q /S echo 把补丁卸载文件夹的名字保存成2950800.txt dir %windir%\$NtUninstall* /a:d /b >%windir%\2950800.txt echo 从2950800.txt中读取文件夹列表并且删除文件夹 for /f %%i in (%windir%\2950800.txt) do rd %windir%\%%i /s /q echo 删除2950800.txt del %windir%\2950800.txt /f /q echo 删除补丁安装记录内容(下面的del /f /s /q %systemdrive%\*.log已经包含删除此类文件) del %windir%\KB*.log /f /q echo 删除系统盘目录下临时文件 del /f /s /q %systemdrive%\*.tmp echo 删除系统盘目录下临时文件 del /f /s /q %systemdrive%\*._mp echo 删除系统盘目录下日志文件 del /f /s /q %systemdrive%\*.log echo 删除系统盘目录下GID文件(属于临时文件,具体作用不详) del /f /s /q %systemdrive%\*.gid echo 删除系统目录下scandisk(磁盘扫描)留下的无用文件 del /f /s /q %systemdrive%\*.chk echo 删除系统目录下old文件 del /f /s /q %systemdrive%\*.old echo 删除回收站的无用文件 del /f /s /q %systemdrive%\recycled\*.* echo 删除系统目录下备份文件 del /f /s /q %windir%\*.bak

一键垃圾清理完整代码-超强悍代码

@echo off title @echo off color 2 echo. echo. echo 请不要关闭此窗口! echo. echo 开始清理垃圾文件,请稍等...... echo. echo 正在清理Thumbs.db数据库文件,请稍等...... del c:\Thumbs.db /f/s/q/a del d:\Thumbs.db /f/s/q/a del e:\Thumbs.db /f/s/q/a del f:\Thumbs.db /f/s/q/a del g:\Thumbs.db /f/s/q/a del h:\Thumbs.db /f/s/q/a del i:\Thumbs.db /f/s/q/a echo. echo 清理Thumbs.db数据库完成! echo. echo 正在清理系统分区根目录下tmp文件,请稍等...... del /f /s /q %systemdrive%\*.tmp echo. echo 清理系统分区根目录下tmp文件完成! echo. echo 正在清理系统分区根目录下_mp文件,请稍等...... del /f /s /q %systemdrive%\*._mp echo. echo 清理系统分区根目录下_mp文件完成! echo. echo 正在清理系统分区根目录下日志文件,请稍等...... del /f /s /q %systemdrive%\*.log echo. echo 清理系统分区根目录下日志文件完成! echo. echo 正在清理系统分区根目录下gid文件,请稍等...... del /f /s /q %systemdrive%\*.gid echo. echo 清理系统分区根目录下gid文件完成! echo. echo 正在清理系统分区根目录下chk文件,请稍等...... del /f /s /q %systemdrive%\*.chk echo. echo 清理系统分区根目录下chk文件完成!

Windows系统垃圾如何清理

回家后,在我们不断的使用过程中,因为添加、删除软件和上网冲浪等等行为,硬盘中会产生各种各样的垃圾文件,而随着这些垃圾文件的不断膨胀,它们不仅会平白吞噬掉我们宝贵的硬盘空间,更会拖累机器的运行速度,影响我们的工作效率。 一、垃圾文件的类型 1.软件安装过程中产生的临时文件 许多软件在安装时,首先要把自身的安装文件解压缩到一个临时目录(一般为Windows文件夹下的Temp目录)然后再进行安装。如果软件设计有疏忽或者系统有问题,当安装结束后,这些临时文件就会变得并不“临时”,成为硬盘里的一堆垃圾,很多时候它们以*.tmp的面孔出现。 2.软件运行过程中产生的临时文件 和安装过程一样,在软件的运行过程中通常也会产生一些临时交换文件,有些软件运行过后遗留下来的垃圾甚至多达数百兆,比如一些程序工作时产生的形如*.old、*.bak这样的备份文件,杀毒软件或系统软件检查硬盘时生成的备份文件等。 3.软件卸载后的遗留文件 由于Windows的反安装机制实在让人无法恭维,再加上多数软件都使用了动态链接库(DLL),而其中一些软件的设计还不太成熟,导致了很多软件“请神容易送神难”。当这些软件被卸载后,经常会在硬盘中留下一些文件夹、*.dll文件以及形形色色不知名的小东西,成为名副其实的垃圾。 在现实生活中,有很多初学者往往会错误地使用直接删除文件夹的方法“卸载”软件,这样就会留下更多无效的类似*.ini、*.dll这样的文件。同时还会在注册表中残存大量废弃数据,对系统的稳定造成更大影响。 4.上网冲浪产生的临时文件 我们在上网的时候,浏览器总是将网页文件下载到本地机器上,这些缓存文件不但占用了宝贵的磁盘空间,还常常会把我们的个人隐私公之于众,是可忍,孰不可忍。 5.一些不常用的鸡肋文件 比如一些应用软件自带的帮助或教程文件(常以.hlp等作为后缀),操作系统中多余的字体文件等。既然食之无味索性也将它们视作垃圾文件的一种表现。比如

清理垃圾程序

一、在记事本里复制粘贴下面代码 @echo off echo 正在清除系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old del /f /s /q %systemdrive%\recycled\*.* del /f /s /q %windir%\*.bak del /f /s /q %windir%\prefetch\*.* rd /s /q %windir%\temp & md %windir%\temp del /f /q %userprofile%\cookies\*.* del /f /q %userprofile%\recent\*.* del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" del /f /s /q "%userprofile%\Local Settings\Temp\*.*" del /f /s /q "%userprofile%\recent\*.*" echo 清除系统LJ完成! echo. & pause 另存为——桌面——文件类型(所有)——文件名(LJ.bat)

二、添加快速启动项的法——右键(任务栏)——工具栏——新建工具栏——输入下面的目标文件(%UserProfile%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch)保存——然后就可以拖动想要的图标进去就行 三、如何解开网页对文字全选的锁定 方法是:先选中目标,然后在目标上按下鼠标右键,此时会弹出提示窗口,这时不要松开右键,将鼠标指针移到提示窗口的“确定”按钮上,然后按下左键。现在松开鼠标左键,限制窗口被关闭了,再将鼠标移到目标上松开鼠标右键,呵呵,弹出了鼠标右键菜单,限制取消了! 除此以外,我们还可以按Shift+F10或按动键盘上与右手边的Ctrl键紧挨着的那个键,都可以轻松的破解上面这种对鼠标右键的屏蔽。 最近在某网页中又遇到一种新的屏蔽方法,使用上面这些破解方法无效。关键代码如上二所示 把上面的代码加入到你的网页中,然后你可以按右键试试,不管用了吧?再按Shift+F10试试?还是不行!再用一招:按动键盘上与右手边的Ctrl键紧挨着的那个键试试,,也不灵了。还有一招,在屏蔽鼠标右键的页面中点右键,出现警告窗口,此时不要松开右键,用左手按键盘上的ALT+F4组合键,这时提示窗口就被我们关闭了,松开鼠

自动清除电脑垃圾及删除windows默认共享盘符的批处理bat

自动清除电脑垃圾及删除windows默认共享盘符的批处理bat by:zuifeng258 Windows在默认情况下几个盘多是共享的,它们是隐藏的危险。 在dos下用命令“net share”可以查看。。。 不能截图,就只能打打字了 复制代码代码如下: @echo off echo 正在自动删除admin$管理共享和ipc$管道共享, net share admin$ /del net share IPC$ /del net share C$ /del net share D$ /del net share E$ /del net share F$ /del @echo off并不是DOS程序中的, 而是DOS批处理中的。 当年的DOS,所有操作都用键盘命令来完成, 当你每次都要输入相同的命令时, 可以把这么多命令存为一个批处理。 上面那段是默认admin$管理共享和ipc$管道共享的命令 如果那没有这么多盘符,可以照上面的“net shere *$” /del ' *是你的盘符号。进行增减 复制代码代码如下: @echo off echo 这是正在检查cookies、历史纪录等目录位置(当前用户)…… reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cache>%temp%\cleantmp.txt reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cookies>>%temp%\cleantmp.txt reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v History>>%temp%\cleantmp.txt reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v

清理系统垃圾及优化网络 批处理命令代码

把下面代码复制到记事本中,然后改后缀为…….dat 如 然后打开点能运行 运行效果如图 下面代码一直到最后 @echo off cls rem rem Contact: [url=] [/url] rem rem This program is free software; you can redistribute it and/or modify it under rem the terms of the GNU General Public License as published by the Free Software Foundation; rem either version 2 of the License, or (at your option) any later version. rem This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; rem without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. rem See the GNU General Public License for more details. rem rem Y ou should have received a copy of the GNU General Public License along with this

program; rem if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, rem MA 02111-1307, USA. echo. REM Tested on ... WinXP_SP2 REM Always basic XP64 Support REM Modifications to BITS service (cause of v5 WindowsUpdate) - #discharged# REM Additional notices corresponding to DHCP issue REM V ariables problems during RESTORE_DEFAULT usage fixed REM SMBDEVICEENABLED Restore Bug fixed REM Mod_history-09-27-2005**11-08-2005**11-29-2005**12-07-2005**12-18-2005 setlocal REM *** INIT_V ARS *** set CHK_SVC=YES set XPSP2=FALSE set SERVER=FALSE set NT_SERVER_CHK=TRUE :START echo "svc2kXp.cmd" 正在检测您的电脑,稍后进行优化! echo ================================================================ set find=%SystemRoot%\System32\find.exe set regedit=%SystemRoot%\regedit.exe if not exist "%find%" goto :NOFIND if not exist "%regedit%" goto :NOREGEDIT if not "%1" == "%*" goto :SYNTAX if /I "%1"=="/?" goto :HELP if /I "%1"=="/help" goto :HELP if /I "%1"=="-h" goto :HELP if /I "%1"=="--help" goto :HELP if /I "%1"=="-?" goto :HELP if /I "%1"=="--?" goto :HELP if /I "%1"=="/fix" goto :FIX goto :VERSION :SYNTAX echo. echo. echo !!Syntax error!! echo ________________ echo Es kann nur ein oder kein Parameter angegeben werden. echo. echo Only one or no parameter allowed. goto :QUIT :HELP echo.

iTools要如何清理系统垃圾的方法

iTools要如何清理系统垃圾的方法 随着科学技术的发展,由于苹果无法直接打开系统文件夹,也没有一个好的清理系统垃圾的办法,只能看着iPad mini越来越卡。下面是小编为大家整理的关于iTools要如何清理系统垃圾的方法,一起来看看吧! iTools要如何清理系统垃圾的方法 1、用iTools“清理垃圾”功能直接清理。连接设备,进入iTools高级功能“清理垃圾”,iTools会自动对系统冗余的垃圾进行清理,耐心等待完成即可哦。 若是仍旧担心清理的不干净,不妨给系统来一个彻底大检查,手动查找清理一下吧。 2、【/User/Media/APPlicationArchives/】目录下可以安全删除,里面是删除出错的软件压缩包。

3、【/User/Media/PublicStaging】可以找到安装失败的应用程序冗余文件。 4、想要内存更大的话,还有一个方法,在iTools的应用程序“文档管理”中的打开LibraryCaches,把Caches文件夹中的记录删除(名为Cache.db)。 Ps:Documents里的文件是用户文件。不建议删除。但一些图片和访问记录删除掉也是可以达到清理内存的功效的。 5、如果你的ipad mini越狱了,也用过91cydia等其他工具,Cydia,91助手,手工安装都放在/private/var/stash/Applications文件夹,这里的文件夹名称都一目了然。找到你要的软件垃圾,直接删除之。前提是你在iPad mini上已经删除一遍了,但是没删除干净的情况,也就是你在这些文件夹里发现了一个你已经删除的软件,但是还留有它的文件夹。 6、进入iTools文件系统,【越狱系统—/tmp】新近发现的iTunes同步或删除失败的文件,以install_greenmile.XXXXXX类型命名的文件夹,删。

一键清理系统垃圾,清理系统垃圾bat

一键清理系统垃圾 制作bat文件达到一键清理系统垃圾的目的 步骤: 1、新建一个记事本; 2、将以下红线中间部分代码复制进去; --------------------------------------------------------------------------- @echo off echo LYG提示:正在清理系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old del /f /s /q %systemdrive%\recycled\*.* del /f /s /q %windir%\*.bak del /f /s /q %windir%\prefetch\*.* rd /s /q %windir%\temp & md %windir%\temp del /f /q %userprofile%\cookies\*.* del /f /q %userprofile%\recent\*.* del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" del /f /s /q "%userprofile%\Local Settings\Temp\*.*" del /f /s /q "%userprofile%\recent\*.*" --------------------------------------------------------------------------- 3、将该记事本文件另存为所有文件、名称填写“清理垃圾.bat”。看图 4、双击运行“清理垃圾.bat”就能开始自动清理系统垃圾了。全自动的,清理完毕会自动退出。

电脑用久了教你如何清理垃圾

电脑用久了运行速度慢了,教你们怎样清除电脑里面的垃圾 1、单击“开始”菜单中“程序”的“附件”,单击“系统工具”再单击“清理磁盘”,选择C盘,确认后,选中所有的“口”,再确认;再在“系统工具”中点击“磁盘碎片整理程序”,这需要花很长时间,请耐心等待。一些程序删除了,但并非完全删除,在计算机的注册表中仍然保留安装信息,如不及时删除这些无用的信息,时间久了,注册表就会变得越来越大,影响系统的工作性能。你可利用下述方法将其彻底删除。 2、在多次安装和反安装后,系统保留了很多无用的DLL文件,应将其删除。单击“开始”菜单,单击“运行”,在文本框内键入“regedit”,打开“注册表编辑器”窗口,依次打开 HKEY_LOCAL_MACHINE\Software\Micosoft\Windows\Curren tVersion\SharedDLLs分支。在对话框的右侧,其键值数据后面的括号中都有一个数字,如果数字为0,说明该DLL文件已成为垃圾,将其删除。 3、将不要的程序卸载时,应在“控制面板”中的“添加/删除程序”选择确定删除,这才是彻底的删除方法。在磁盘分区中删除效果不好,有时有些程序是删除不掉的。即使在“控制面板”中的“添加/删除程序”卸载了,但有的程序

在注册表中仍有这些程序的名称,成为垃圾。用上述方法打开“注册表编辑器”窗口,依次打开 HKEY_LOCAL_MACHINE\Software\Micosoft\Windows\Curren tVersion\Uninstall分支。Uninstall主键下的每一个文件夹对应一个应用程序,打开某一文件夹,即可看到程序反安装的内容,包括程序名DisplayName和UninstallString。找到你删除过的程序名后,右键单击其上层文件夹,选择“删除”。 4、一些不带Uninstall程序或不用安装(复制到计算机中的)即可在Windows中直接运行的程序,如许多小型游戏等,注册表记录程序运行的参数。如果删除了这样的程序,仍要在注册表中删除这些无用的信息。依次打开 HKEY_CURRENT_USER\Software分支。从各子键中找到相应程序的文件夹后,将其删除。你也可单击“编辑”|“查找”命令逐一查找包含这些软件信息的子键或键值项,进行彻底清理 ------------------------------------------ winkey+d : 这是高手最常用的第一快捷组合键。这个快捷键组合可以将桌面上的所有窗口瞬间最小化,无论是聊天的窗口还是游戏的窗口……只要再次按下这个组合键,刚

一键清理系统垃圾[1].bat__超级一键删除垃圾.bat__高郊级一键清理C盘垃圾.bat

文章由情难枕精心整理,希望对大家的学习和工作带来帮助 @echo off echo ----------------------------------------------------------------------------- echo 清空IE临时文件目录... del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" del /f /s /q "%userprofile%\Local Settings\Temp\*.*" echo 正在清除系统临时文件 *.tmp *._tmp *.log *.chk *.old ,请稍等... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp rem .log大部分有可能有用 rem del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid

del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old echo 清空垃圾箱,备份文件和预缓存脚本... del /f /s /q %systemdrive%\recycled\*.* del /f /s /q %windir%\*.bak del /f /s /q %windir%\prefetch\*.* rd /s /q %windir%\temp & md %windir%\temp rem cooke和最近历史还是保留吧... rem del /f /q %userprofile%\COOKIES s\*.* rem del /f /q %userprofile%\recent\*.* echo 清理系统盘无用文件... %windir%\system32\sfc.exe /purgecache echo 优化预读信息... %windir%\system32\defrag.exe %systemdrive% -b echo 清除系统完成! echo -----------------------------------------------------------------------------

利用命令提示符 清除系统垃圾

把下面这段话利用记事本存为bat格式这个是windows批处理文件然后双击就可以利用命令提示符清除系统垃圾了 @echo off echo 正在清除系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old del /f /s /q %systemdrive%\recycled\*.* del /f /s /q %windir%\*.bak del /f /s /q %windir%\prefetch\*.* rd /s /q %windir%\temp & md %windir%\temp del /f /q %userprofile%\cookies\*.* del /f /q %userprofile%\recent\*.* del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" del /f /s /q "%userprofile%\Local Settings\Temp\*.*" del /f /s /q "%userprofile%\recent\*.*" echo 清除系统LJ完成! echo. & pause

如何清理电脑垃圾

如何清理电脑垃圾 1、单击“开始”菜单中“程序”的“附件”,单击“系统工具”再单击“清理磁 盘”,选择C盘,确认后,选中所有的“口”,再确认;再在“系统工具”中 点击“磁盘碎片整理程序”,这需要花很长时间,请耐心等待。一些程序 删除了,但并非完全删除,在计算机的注册表中仍然保留安装信息,如 不及时删除这些无用的信息,时间久了,注册表就会变得越来越大,影 响系统的工作性能。你可利用下述方法将其彻底删除。 2、在多次安装和反安装后,系统保留了很多无用的DLL文件,应将其 删除。单击“开始”菜单,单击“运行”,在文本框内键入“regedit”,打 开“注册表编辑器”窗口,依次打开 HKEY_LOCAL_MACHINE\Software\Micosoft\Windows\CurrentVersion\SharedDLLs 分支。在对话框的右侧,其键值数据后面的括号中都有一个数字,如果 数字为0,说明该DLL文件已成为垃圾,将其删除。 3、将不要的程序卸载时,应在“控制面板”中的“添加/删除程序”选择确 定删除,这才是彻底的删除方法。在磁盘分区中删除效果不好,有时有 些程序是删除不掉的。即使在“控制面板”中的“添加/删除程序”卸载了, 但有的程序在注册表中仍有这些程序的名称,成为垃圾。用上述方法打 开“注册表编辑器”窗口,依次打开 HKEY_LOCAL_MACHINE\Software\Micosoft\Windows\CurrentVersion\Uninstall 分支。Uninstall主键下的每一个文件夹对应一个应用程序,打开某一文 件夹,即可看到程序反安装的内容,包括程序名DisplayName和UninstallString。找到你删除过的程序名后,右键单击其上层文件夹,选 择“删除”。 4、一些不带Uninstall程序或不用安装(复制到计算机中的)即可在 Windows中直接运行的程序,如许多小型游戏等,注册表记录程序运行 的参数。如果删除了这样的程序,仍要在注册表中删除这些无用的信 息。依次打开HKEY_CURRENT_USER\Software分支。从各子键中找到 相应程序的文件夹后,将其删除。你也可单击“编辑”|“查找”命令逐一查 找包含这些软件信息的子键或键值项,进行彻底清理----------------------- -------------------

bat命令大全 清理系统垃圾更简单

1.Echo 命令 打开回显或关闭请求回显功能,或显示消息。如果没有任何参数,echo 命令将显示当前回显设置。 语法 echo [{on|off}] [message] Sample:echo off / echo hello world 在实际应用中我们会把这条命令和重定向符号(也称为管道符号,一般用> >> ^)结合来实现输入一些命令到特定格式的文件中.这将在以后的例子中体现出来。 2.@ 命令 表示不显示@后面的命令,在入侵过程中(例如使用批处理来格式化敌人的硬盘)自然不能让对方看到你使用的命令啦。 Sample:@echo off @echo Now initializing the program,please wait a minite... @format X: /q/u/autoset (format 这个命令是不可以使用/y这个参数的,可喜的是微软留了个autoset这个参数给我们,效果和/y是一样的。) 3.Goto 命令 指定跳转到标签,找到标签后,程序将处理从下一行开始的命令。 语法:goto label (label是参数,指定所要转向的批处理程序中的行。) Sample: if {%1}=={} goto noparms if {%2}=={} goto noparms(如果这里的if、%1、%2你不明白的话,先跳过去,后面会有详细的解释。) @Rem check parameters if null show usage :noparms echo Usage: monitor.bat ServerIP PortNumber goto end 标签的名字可以随便起,但是最好是有意义的字母啦,字母前加个:用来表示这个字母是标签,goto命令就是根据这个:来寻找下一步跳到到那里。最好有一些说明这样你别人看起来才会理解你的意图啊。 4.Rem 命令 注释命令,在C语言中相当与/*--------*/,它并不会被执行,只是起一个注释的作用,便于别人阅读和你自己日后修改。 Rem Message Sample:@Rem Here is the description. 5.Pause 命令 运行Pause 命令时,将显示下面的消息: Press any key to continue . . . Sample: @echo off

代码优化 清理垃圾代码

代码优化清理垃圾代码 刚搜索了一下,发现没有人发关于优化代码的帖子,现在将我原来写的一篇教程发出来,供大家学习。 清理垃圾代码是指删除页面中的多余代码。一个页面经过垃圾代码清理后,可以删除接近80%的多余代码。然而,什么样的代码才是垃圾代码呢? 1.垃圾代码简 垃圾代码就是指删除后不会影响页面正常显示的非必要的代码。这些代买占据着庞大的空间,不但消耗用户下载页面的时间,还占用搜索引擎巨大的存储空间,增加搜索引擎分析数据的时间。然而,这么庞大的垃圾代码是如何产生的呢? 2.垃圾代码的产生 一般情况下,我们会使用网页制作软件制作网页,如FrontPage、Word及Dreamweaver。这些网页制作软件在制作网页的时候,会生成相应的HTML代码,其中大部分是必要的,而有一小部分则是可有可无的,这就是所谓的垃圾代码。因此,避免产生垃圾代码最好的办法就是以手工编写代码的方式制作网页。 即使是同样内容的网页,使用不同的网页制作软件进行制作,所产生的代码也会存在很大的区别。在没有掌握手工编写代码前,可以使用Dreamweaver制作网页,完成后再清理其中的垃圾代码。 3.垃圾代码的清理 〇空格 空格字符是网页中最常见的垃圾代码。但此处讨论的空格字符并非HTML语言中的";"标签,而是指在代码编辑环境下敲击键盘上的空格键所产生的符号。网页中每个空格都相当于一个字符,因此,空格字符也会占用巨大的空间。初

步同济,空格字符约占用页面总体积的1.5%。也就是说,一个100KB的页面中,其中1.5KB是空格字符。 空格字符通常会出现在每行代码的开始和结束处,还有就是空行中。 (1)每行代码开始前的空格字符:是网页制作软件生成代码时,默认产生的缩进字符。 (2)每行代码结束处的空格字符:是编辑HTML代码时,不小心加上的。只要我们在每行代码的结束位置向右移动光标,如果光标不换行,则说明该页面还存在空格字符。 (3)空白行:在编写代码时,常利用空行或者注释对不同功能模块进行分隔,这样就产生了空白行。 对于页面中不同位置上的空格字符,清理的方式也有嗦不同,下面介绍几种常用的空格字符清理方法。 每行代码开始前的空格字符 对于每行代码开始钱的空格字符,可以使用Dreamweaver或者EditPlus等软件进行清理。具体操作步骤如下: (1)转至HTML代码编辑模式(如果是Dreamweaver); (2)按Ctrl+A选择全部代码; (3)使用组合键Shift+Tab,直至删除所有空格为止。 下面的代码1是清理空格前的效果,而代码2则是清理空格字符后的效果。 代码1: table width="100%"border="0"cellsoacing="0"cellpadding="0" tr td/td /tr tr td/td /tr tr td/td

一键清理系统垃圾文件制作

一键清理系统垃圾文件制作 [强烈推荐]30秒清除你电脑中的垃圾(使你电脑急速如飞)(高手已测) 要轻松流畅上网你是否注意到你的电脑系统磁盘的可用空间正在一天天在减少呢?是不是像老去的猴王一样动作一天比一天迟缓呢?是不是游戏一天一天慢下来呢? 没错!在Windows在安装和使用过程中都会产生相当多的垃圾文件,包括临时文件(如:*.tmp、*._mp)日志文件(*.log)、临时帮助文件(*.gid)、磁盘检查文件(*.chk)、临时备份文件(如:*.old、*.bak)以及其他临时文件。特别是如果一段时间不清理IE的临时文件夹“Temporary Internet Files”,其中的缓存文件有时会占用上百MB的磁盘空间。这些LJ文件不仅仅浪费了宝贵的磁盘空间,严重时还会使系统运行慢如蜗牛。这点相信你肯定忍受不了吧!所以应及时清理系统的LJ文件的淤塞,保持系统的“苗条”身材,轻松流畅上网!朋友来吧,现在就让我们一起来快速清除系统垃圾吧!!下面是步骤很简单就两步! 在电脑屏幕的左下角按“开始→程序→附件→记事本”,把下面的文字复制进去(黑色部分),点“另存为”,路径选“桌面”,保存类型为“所有文件”,文件名为“清除系统LJ.bat”,就完成了。记住后缀名一定要是.bat,ok!你的垃圾清除器就这样制作成功了! 双击它就能很快地清理垃圾文件,大约一分钟不到。 ======就是下面的文字(这行不用复制)============================= @echo off echo 正在清除系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old del /f /s /q %systemdrive%\recycled\*.* del /f /s /q %windir%\*.bak del /f /s /q %windir%\prefetch\*.* rd /s /q %windir%\temp & md %windir%\temp del /f /q %userprofile%\cookies\*.* del /f /q %userprofile%\recent\*.* del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" del /f /s /q "%userprofile%\Local Settings\Temp\*.*"

相关主题
文本预览
相关文档 最新文档