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

合集下载

清理系统垃圾文件需要用什么代码

清理系统垃圾文件需要用什么代码

清理系统垃圾文件需要用什么代码电脑是需要定时维护以及清理垃圾文件的,如果嫌手动太麻烦的话,一般用代码也是可以清理成功的,今天小编就为大家准备了清理系统垃圾文件代码,希望大家可以去用用。

@echo off::修正于2007-09-12color 2fTitle 系统垃圾文件清理器echo.echo =========================================================echo ***** 系统垃圾文件清理器 *****echo.echoecho =========================================================echo.echo 本程序特点echo.echo 鉴于很多人把IE缓存等文件夹转移到非系统盘,echo 所以,本程序清理垃圾文件时,首先进行判断系echo 统的设置。

echo.echo 优点:清理位置更加准确,策略更加科学。

echo.echo 开始执行清理……echo.echo 正在检查cookies、历史纪录等目录位置(当前用户)……reg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v Cache>%temp%cleantmp.txtreg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v Cookies>>%temp%cleantmp.txtreg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v History>>%temp%cleantmp.txtreg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v NetHood>>%temp%cleantmp.txtreg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v Recent>>%temp%cleantmp.txtecho 正在清理Cookies、IE缓存、历史纪录等(当前用户)……for /f "tokens=3*" %%a in (%temp%cleantmp.txt) do (for /d %%i in ("%%a %%b*.*") do rd /s /q "%%i"del /a /f /s /q "%%a %%b*.*")::跟上面几项未必是重复的(!),也是对当前用户目录echo 正在清理临时文件 (系统目录)……del /a /f /s /q "%userprofile%Locals~1Tempor~1*.*"del /a /f /s /q "%userprofile%Locals~1Temp*.*"del /a /f /s /q "%userprofile%cookies*.*"del /a /f /s /q "%userprofile%recent*.*"del /a /f /s /q "%Temp%*.*"del /a /f /s /q "%Tmp%*.*"del /a /f /s /q "%HomePath%..IconCache.db"echo 正在清理系统目录中的垃圾文件 (稍候,需要点时间)……del /a /f /s /q "%systemdrive%*._mp"del /a /f /s /q "%systemdrive%*.log"del /a /f /s /q "%systemdrive%*.dmp"del /a /f /s /q "%systemdrive%*.gid"del /a /f /s /q "%systemdrive%*.old"del /a /f /s /q "%systemdrive%*.tmp"del /a /f /s /q "%systemdrive%recycled*.*"del /a /f /s /q "%SystemRoot%*.bak"del /a /f /s /q "%SystemRoot%*.query"rd /s /q "%SystemRoot%Downloaded Program Files"rd /s /q "%SystemRoot%Offline Web Pages"rd /s /q "%systemroot%Connection Wizard"rd /s /q "%SystemRoot%SoftwareDistributionDownload"rd /s /q "%SystemRoot%Assembly"rd /s /q "%SystemRoot%Help"rd /s /q "%SystemRoot%system32ReinstallBackups"del /a /s /q "%SystemRoot%inf*.pnf"del /a /f /s /q "%SystemRoot%infInfCache.1"dir %SystemRoot%inf*.* /ad/b >%SystemRoot%vTmp.txtfor /f %%a in (%SystemRoot%vTmp.txt) do rd /s /q "%SystemRoot%inf%%a"del /a /f /s /q "%SystemRoot%Driver Cache*.pnf"del /a /f /s /q "%SystemRoot%Driver CacheInfCache.1"del /a /f /s /q "%SystemRoot%system32drivers*.pnf"del /a /f /s /q "%SystemRoot%system32driversInfCache.1"rd /s /q "%SystemRoot%temp" & md "%SystemRoot%temp"del /a /f /s /q "%SystemRoot%Prefetch*.*"del /a /f /s /q "%SystemRoot%minidump*.*"echo 正在清除无用的磁盘检错文件 (系统分区)……del /a /f /q "%SystemDrive%*.chk"dir %SystemDrive%found.??? /ad/b >%SystemRoot%vTmp.txtfor /f %%a in (%SystemRoot%vTmp.txt) do rd /s /q "%SystemDrive%%%a"echo 正在清理系统升级补丁留下来的反安装目录 (已修正能正确清除)……dir %SystemRoot%$*$ /ad/b >%SystemRoot%vTmp.txtfor /f %%a in (%SystemRoot%vTmp.txt) do rd /s /q "%SystemRoot%%%a"echo 正在清除常见的软件垃圾项目 (按默认目录)……rd /s /q "%ProgramFiles%InstallShield Installation Information"Ren "%ProgramFiles%Common~1RealUpdate_OBrealsched.exe" realsched.ex_Del "%ProgramFiles%Common~1RealUpdate_OBrealsched.exe"Reg Delete "HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun" /v TkBellExe /f rd /s /q "%ProgramFiles%TencentQQGameDownload"taskkill /f /im "TIMPlatform.exe" /tdel /a /f /s /q "%ProgramFiles%Kaspersky Lab*.tmp"echo.echo 全部清理完毕,任意键退出 (注: 若提示文件没找到是正常的)……pause >nuldel %SystemRoot%vTmp.txt信息来自:/xtjc/20120820/1651_3.html代码有点长,有兴趣的童鞋要好好看看,可以去尝试用用看。

命令行清理电脑垃圾提供运行速度的方法

命令行清理电脑垃圾提供运行速度的方法

命令行清理电脑垃圾提供运行速度的方法在命令行中清理电脑垃圾可以提高其运行速度和性能。

以下是一些可以通过命令行进行的电脑垃圾清理方法:1. Windows 命令-清理临时文件:-打开命令提示符(以管理员身份运行)。

-输入以下命令并按回车键:```del /q/f/s %TEMP%\*```-这将删除临时文件夹中的所有内容。

-清理回收站:-打开命令提示符(以管理员身份运行)。

-输入以下命令并按回车键:```rd /s/q %systemdrive%\$Recycle.bin```-这将彻底清空回收站。

-执行磁盘清理:-打开命令提示符(以管理员身份运行)。

-输入以下命令并按回车键:```cleanmgr```-这将打开磁盘清理实用程序,您可以选择要清理的文件类型。

2. macOS 命令-清理临时文件:-打开终端。

-输入以下命令并按回车键:```rm -rf /private/var/tmp/*rm -rf /Volumes/*/.Trashes```- 这将删除临时文件夹和挂载卷中的 .Trashes 文件。

-清理回收站:-打开终端。

-输入以下命令并按回车键:```rm -rf ~/.Trash/*```-这将永久删除回收站中的所有项目。

-清理缓存:-打开终端。

-输入以下命令并按回车键:```rm -rf ~/Library/Caches/*```-这将清空用户缓存文件夹。

3. Linux 命令-清理临时文件:-打开终端。

-输入以下命令并按回车键:```rm -rf /tmp/*```-这将删除临时文件夹中的所有内容。

-清理回收站:-打开终端。

-输入以下命令并按回车键:```rm -rf ~/.local/share/Trash/files/*```-这将清空回收站。

-清理缓存:-打开终端。

-输入以下命令并按回车键:```sudo apt-get clean```-这将清理APT缓存。

除了这些基本的垃圾清理方法之外,您还可以创建批处理脚本或使用第三方工具来自动化和加强垃圾清理过程。

cmd里清理的命令

cmd里清理的命令

cmd里清理的命令清理命令是在cmd中常用的一种操作,它可以帮助我们清理系统中的垃圾文件、临时文件、缓存等,从而提高系统的运行效率和性能。

下面将介绍一些常见的清理命令及其使用方法。

1. 清理临时文件在cmd中,我们可以使用以下命令清理系统中的临时文件:```shelldel /s /q %temp%\*```这条命令会删除系统中所有的临时文件,从而释放磁盘空间。

2. 清理回收站回收站是系统中用于存放删除文件的地方,为了释放磁盘空间,我们可以使用以下命令清空回收站:```shellcleanmgr /sagerun:1```这条命令会自动清空回收站中的所有文件。

3. 清理磁盘垃圾文件系统中的磁盘垃圾文件会占用大量的磁盘空间,为了释放空间,我们可以使用以下命令清理磁盘垃圾文件:```shellcleanmgr /d C:```这条命令会打开磁盘清理工具,可以选择删除不需要的文件。

4. 清理DNS缓存DNS缓存是系统中存放域名解析结果的地方,为了确保域名解析的准确性,我们可以使用以下命令清理DNS缓存:```shellipconfig /flushdns```这条命令会刷新系统中的DNS缓存,清除已解析的域名信息。

5. 清理网络缓存系统中的网络缓存可以提高网络访问的速度,但也会占用一定的磁盘空间,为了释放空间,我们可以使用以下命令清理网络缓存:```shellnetsh interface ip delete arpcache```这条命令会清理系统中的网络缓存,从而释放磁盘空间。

6. 清理系统日志系统中的日志文件会占用一定的磁盘空间,为了释放空间,我们可以使用以下命令清理系统日志:```shellwevtutil cl System```这条命令会清空系统中的事件日志。

7. 清理卸载残留文件在系统中进行软件卸载时,有时会留下一些残留文件,为了彻底清除这些文件,我们可以使用以下命令清理卸载残留文件:```shellpnputil /e```这条命令会列出系统中的所有设备驱动程序包,我们可以根据需要选择删除。

清除系统垃圾文件的批处理

清除系统垃圾文件的批处理

清除系统垃圾文件的批处理根据垃圾文件形成方法的不同,将垃圾文件分为安装和运行软件过程中产生的垃圾文件、系统内核程序所产生的垃圾文件、卸载软硬件后产生的垃圾文件、使用浏览器时产生的垃圾文件,以及无用的个人帐户和字体文件等几种。

接下来是小编为大家收集的清除系统垃圾文件的批处理,希望能帮到大家。

清除系统垃圾文件的批处理“清除系统垃圾.bat”,“clear.bat”,“一键清除系统垃圾.bat”,“30秒清除系统垃圾.bat”,“快速清除系统垃圾.bat”基本上找到的者是一个文件,但这里面也有很多不足或需要改进的地方,但大多数人看不懂DOS命令,所以被改的机会会很少,下面是我所发现的问题及其改进,可以说是比较完美的版本了。

从网上找的,修改了一行,以解决ASP+ACCESS错误:“Microsoft JET Database Engine 错误 '80004005' 未指定的错误”这个过程的原理是:删除系统的临时目录并重新建立.这个过程没有加上这个临时文件夹原来的权限,一般程序都没问题,但ASP+access程序会出问题。

如果已经出现此问题可以这么解决:给此文件夹的users用户加上修改权限复制代码代码如下:rem 临时文件(如:*.tmp、*._mp)日志文件(*.log)、临时帮助文件(*.gid)、磁盘检查文件(*.chk)、临时备份文件(如: *.old、*.bak) rem %systemdrive%是系统盘,%windir%是系统文件夹,%userprofile%当前用户文件夹,recent是最近浏览过的文档rem del /f /s /q %windir%\prefetch\*.*rem 上面这一行删除的是“系统预先装载”文件,一般不要删rem rd /s /q %windir%\temp & md %windir%\temprem 上一行的操作会改变文件夹的属性,这个属性会影响asp+access程序,所以给注释掉了,换成下边的了,缺点是不能删除这个文件夹下的文件夹,但文件都删除了rem 新增加的清除C:根目录下的MSN"用户体验改善计划"生成的临时文件rem del /f /a /q %systemdrive%\*.sqmrem 去掉了,下边这一行,今天在控制面板里装DNS时提示要sp2 光盘,插上我制作的光盘不行。

使用CMD命令清理和优化Windows系统资源

使用CMD命令清理和优化Windows系统资源

使用CMD命令清理和优化Windows系统资源Windows操作系统是目前最广泛使用的操作系统之一,但随着时间的推移,系统资源的积累和碎片化可能会导致系统运行速度变慢。

为了保持系统的良好运行状态,我们可以通过使用CMD命令来清理和优化Windows系统资源。

本文将介绍一些常用的CMD命令,帮助您提升系统性能。

一、清理临时文件临时文件是在系统运行过程中产生的,它们会占用硬盘空间并降低系统性能。

通过CMD命令,我们可以轻松清理这些临时文件。

首先,打开CMD命令提示符。

您可以按下Win键+R,然后输入"cmd"并按下回车键。

接下来,输入以下命令并按下回车键:```rd /s /q %temp%```这个命令将删除系统临时文件夹中的所有文件和文件夹。

二、优化硬盘空间硬盘空间的不足可能会导致系统运行缓慢。

使用CMD命令可以帮助我们释放硬盘空间并优化系统性能。

首先,打开CMD命令提示符。

然后,输入以下命令并按下回车键:```cleanmgr```这个命令将打开磁盘清理工具,您可以选择要清理的文件类型,并释放硬盘空间。

三、修复系统文件系统文件的损坏可能会导致系统崩溃或运行缓慢。

通过CMD命令,我们可以扫描和修复这些损坏的系统文件。

首先,打开CMD命令提示符。

然后,输入以下命令并按下回车键:```sfc /scannow```这个命令将扫描系统文件并自动修复任何损坏的文件。

四、优化启动项启动项过多可能会导致系统启动缓慢。

通过CMD命令,我们可以管理启动项,从而提高系统启动速度。

首先,打开CMD命令提示符。

然后,输入以下命令并按下回车键:```msconfig```这个命令将打开系统配置工具,您可以在"启动"选项卡中选择要禁用的启动项,从而优化系统启动速度。

五、清理注册表注册表是Windows系统的核心组成部分,但随着时间的推移,注册表中可能会积累大量无效的或错误的条目。

通过CMD命令,我们可以清理注册表,提高系统性能。

清除系统垃圾代码

清除系统垃圾代码

在电脑屏幕的左下角按“开始→程序→附件→记事本”,把下面的文字复制进去(黑色部分),点“另存为”,路径选“桌面”,保存类型为“所有文件”,文件名为“清除系统LJ.bat”,就完成了。

记住后缀名一定要是.bat,ok!你的垃圾清除器就这样制作成功了!双击它就能很快地清理垃圾文件,大约一分钟不到。

======就是下面的文字(这行不用复制)=============================@echo offecho 正在清除系统垃圾文件,请稍等......del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.olddel /f /s /q %systemdrive%\recycled\del /f /s /q %windir%\*.bakdel /f /s /q %windir%\prefetch\rd /s /q %windir%\temp & md %windir%\tempdel /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

以下是完整的一键清理BAT批处理代码可以有效清理日常动作垃圾系统缓存文件和注册表冗杂垃圾方法是将以下代码全部复制到文本文档然后保存重命名后缀名为“.bat”@echo offcolor 0Atitle 历史痕迹兼系统垃圾清理beta1.0::全盘删除Thumbs.db(缩略图缓存文件)@echo off&setlocal enabledelayedexpansionfor /f "delims=\" %%i in ('fsutil fsinfo drives^|find ""') do (set drive_=%%ifsutil fsinfo drivetype !drive_:~0,2!|find "固定">nul && del /a /f /q /s !drive_:~0,2!\Thumbs.db )echo 正在清理系统垃圾文件,请稍等......del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.olddel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakdel /f /s /q %windir%\*.tmpdel /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /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\*.*"del /f /q "%ALLUSERSPROFILE%\Documents\DrWatson\*.*">nul 2>nuldel /f /q "%USERPROFILE%\Application Data\Microsoft\Office\Recent\*.lnk">nul 2>nul::清理局域网共享痕迹reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\WorkgroupCrawler\Shares"/f >nul 2>nul::用户运行或操作历史记录reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\Folder" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.txt" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.rar" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.mp3" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.jpg" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.ini" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.bmp" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.doc" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.eip" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.htm" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.ico" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.inf" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.gif" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.wav" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.xls" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\.rm" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedMRU" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\*"/va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\mp3" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\rm" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\wav" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\bat" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\exe" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\eip" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\ico" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\htm" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\jpg" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{5E6AB780-7743-11 CF-A12B-00AA004AE837}\Count" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{75048700-EF1F-11D 0-9888-006097DEACF9}\Count" /va /f >nul 2>nulreg delete "HKCU\Software\WinRAR\ArcHistory" /va /f >nul 2>nulreg delete "HKCU\Software\WinRAR\DialogEditHistory\ArcName" /va /f >nul 2>nulreg delete "HKCU\Software\WinRAR\DialogEditHistory\ExtrPath" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\MediaPlayer\Player\RecentFileList" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Microsoft Management Console\Recent File List" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Office\11.0\PowerPoint\Recent File List" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Office\11.0\Excel\Recent File" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Office\11.0\Word\Data" /v "Settings" /f >nul 2>nulreg delete "HKCU\Software\VMware, Inc." /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Internet Explorer\TypedUrls" /va /f >nul 2>nulecho -----------------------------------------------------------------------------到此为止以下是IE 垃圾清理可以清理浏览器历史记录动作等方法:新建文本文档-复制以下代码-保存-改名-后缀为“.bat”(引号不要)@echo offecho -----------------------------------------------------------------------------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%\*.tmpdel /f /s /q %systemdrive%\*._mprem .log大部分有可能有用rem del /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.oldecho 清空垃圾箱,备份文件和预缓存脚本...del /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakdel /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\temprem cooke和最近历史还是保留吧...rem del /f /q %userprofile%\COOKIES s\*.*rem del /f /q %userprofile%\recent\*.*echo 清理系统盘无用文件...%windir%\system32\sfc.exe /purgecacheecho 优化预读信息...%windir%\system32\defrag.exe %systemdrive% -becho 清除系统完成!echo -----------------------------------------------------------------------------。

清除系统垃圾的代码

清除系统垃圾的代码

清除系统垃圾的代码清除系统垃圾是为了保持系统的稳定性和提高其运行速度,同时也可以释放磁盘空间。

以下是一份清除系统垃圾的代码,适用于Windows操作系统。

import osdef clear_system_junk():paths = ["C:\\Windows\\Temp","C:\\Users\\Username\\AppData\\Local\\Temp","C:\\Windows\\Prefetch","C:\\Windows\\SoftwareDistribution\\Download","C:\\Windows\\Logs\\CBS"]for path in paths:if os.path.exists(path):print("Cleaning up path", path)try:for root, dirs, files in os.walk(path):for file in files:os.remove(os.path.join(root, file))for folder in dirs:os.rmdir(os.path.join(root, folder))except PermissionError:print("Permission denied to access", path)else:print(path, "does not exist")return "System junk cleared successfully"代码首先定义了需要清除垃圾的文件夹路径,如C:\Windows\Temp和C:\Users\Username\AppData\Local\Temp等,这些路径包含了一些临时文件、日志和缓存文件,占用了较多的磁盘空间。

电脑技术-简单批处理命令就能彻底有效清理电脑中的垃圾

电脑技术-简单批处理命令就能彻底有效清理电脑中的垃圾

简单批处理命令就能彻底有效清理电脑中的垃圾用简单的批处理命令文件就可以真正有效彻底的清理电脑中的残余垃圾,一直珍藏中。

下面是代码:-----------------------开始(请勿粘贴此行)---------------------------@echo offcolor 70Title 系统垃圾文件清理echo.echo ***** 系统垃圾文件清理器*****echo 制作:36389232echo.echo 本程序特点:echo 鉴于很多人把IE缓存等文件夹转移到非系统盘,echo 所以,本程序清理垃圾文件时,首先进行判断系统echo 的设置。

echo.echo 优点:清理位置更加准确,策略更加科学。

echo.echo 开始执行清理……echo.echo 正在检查cookies、历史纪录等目录位置(当前用户)……reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cache>%temp%\cleantmp.txtreg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cookies>>%temp%\cleantmp.txtreg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v History>>%temp%\cleantmp.txtreg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v NetHood>>%temp%\cleantmp.txtreg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Recent>>%temp%\cleantmp.txtecho 正在清理Cookies、IE缓存、历史纪录等(当前用户)……for /f "tokens=3*" %%a in (%temp%\cleantmp.txt) do (for /d %%i in ("%%a %%b\*.*") do rd /s /q "%%i">Nul 2>Nuldel /a /f /s /q "%%a %%b\*.*">Nul 2>Nul)::跟上面几项未必是重复的(!),也是对当前用户目录echo 正在清理临时文件(系统目录)……del /a /f /s /q "%userprofile%\Locals~1\Tempor~1\*.*" >Nul 2>Nuldel /a /f /s /q "%userprofile%\Locals~1\Temp\*.*" >Nul 2>Nuldel /a /f /s /q "%userprofile%\cookies\*.*" >Nul 2>Nuldel /a /f /s /q "%userprofile%\recent\*.*" >Nul 2>Nuldel /a /f /s /q "%Temp%\*.*" >Nul 2>Nuldel /a /f /s /q "%Tmp%\*.*" >Nul 2>Nuldel /a /f /s /q "%HomePath%\..\IconCache.db" >Nul 2>Nulecho 正在清理系统目录中的垃圾文件(稍候,需要点时间)……del /a /f /s /q "%SystemRoot%\*._mp">Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.bak">Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.log">Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.dmp">Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.gid">Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.old">Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.query">Nul 2>Nuldel /a /f /q "%SystemRoot%\*.tmp">Nul 2>Nulrd /s /q "%SystemRoot%\Downloaded Program Files" >Nul 2>Nulrd /s /q "%SystemRoot%\Offline Web Pages" >Nul 2>Nulrd /s /q "%systemroot%\Connection Wizard" >Nul 2>Nulrd /s /q "%SystemRoot%\SoftwareDistribution\Download" >Nul 2>Nulrd /s /q "%SystemRoot%\Assembly" >Nul 2>Nulrd /s /q "%SystemRoot%\Help" >Nul 2>Nulrd /s /q "%SystemRoot%\ReinstallBackups" >Nul 2>Nuldel /a /s /q "%SystemRoot%\inf\*.pnf" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\inf\InfCache.1" >Nul 2>Nuldir %SystemRoot%\inf\*.* /ad/b >%SystemRoot%\vTmp.txtfor /f %%a in (%SystemRoot%\vTmp.txt) do rd /s /q "%SystemRoot%\inf\%%a" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\driver?\*.pnf" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\driver?\InfCache.1" >Nul 2>Nuldel /a /f /s /q "%SystemDrive%\driver?\*.pnf" >Nul 2>Nuldel /a /f /s /q "%SystemDrive%\driver?\InfCache.1" >Nul 2>Nulrd /s /q "%SystemRoot%\temp" & md "%SystemRoot%\temp" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\Prefetch\*.*">Nul 2>Nuldel /a /f /s /q "%SystemRoot%\minidump\*.*">Nul 2>Nulecho 正在清除无用的磁盘检错文件(系统分区)……del /a /f /q "%SystemDrive%\*.chk" >Nul 2>Nuldir %SystemDrive%\found.??? /ad/b >%SystemRoot%\vTmp.txtfor /f %%a in (%SystemRoot%\vTmp.txt) do rd /s /q "%SystemDrive%\%%a" >Nul 2>Nul echo 正在清理系统升级补丁留下来的反安装目录(已修正能正确清除)……dir %SystemRoot%\$*$ /ad/b >%SystemRoot%\vTmp.txtfor /f %%a in (%SystemRoot%\vTmp.txt) do rd /s /q "%SystemRoot%\%%a" >Nul 2>Nul echo 正在清除常见的软件垃圾项目(按默认目录)……rd /s /q "%ProgramFiles%\InstallShield Installation Information" >Nul 2>NulRen "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" realsched.ex_ >Nul 2>NulDel "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" >Nul 2>NulReg Delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v TkBellExe /f >Nul 2>Nulrd /s /q "%ProgramFiles%\Tencent\QQGame\Download" >Nul 2>Nultaskkill /f /im "TIMPlatform.exe" /t >Nul 2>Nuldel /a /f /s /q "%ProgramFiles%\Tencent\QQ\TIMPlatform.exe" >Nul 2>Nuldel /a /f /s /q "%ProgramFiles%\PKaspersky Lab\*.tmp" >Nul 2>Nulecho.del %SystemRoot%\vTmp.txt-----------------------结束(请勿粘贴此行)---------------------------把上面的代码粘贴到记事本里面,另存为“清理垃圾.bat”文档,使用时点击运行就可。

系统垃圾清理批处理

系统垃圾清理批处理

系统垃圾清理批处理在Windows在安装和使用过程中都会产生相当多的垃圾文件,包括临时文件(如:*.tmp、*._mp)日志文件(*.log)、临时帮助文件(*.gid)、磁盘检查文件(*.chk)、临时备份文件(如:*.old、*.bak)以及其他临时文件。

这些垃圾文件不仅仅浪费了宝贵的磁盘空间,严重时还会使系统运行慢如蜗牛。

经过下面的简单操作,便可达到清理系统垃圾的目的:第一步:“开始→程序→附件→记事本”,打开记事本;第二步:复制以下内容:@echo offecho 正在清除系统垃圾文件,请稍等......del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.olddel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakdel /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /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第三步:“另存为→桌面”,保存类型为“所有文件”,文件名为“清除系统垃圾.bat”,就完成了。

[电脑技术]XP和Win7一键清理垃圾系统代码

[电脑技术]XP和Win7一键清理垃圾系统代码

[电脑技术]XP和Win7一键清理垃圾系统代码第一步打开记事本,也就是TXT文本文档,自己手工做一个系统批量处理的执行文件,清理电脑没有用的垃圾和上网缓存文件。

下面有XP的和Win7的已经写好的代码。

直接复制保存格式就可以打开使用。

(简单版)XP一键清理垃圾系统.BAT代码如下:echo正在清理系统垃圾文件,请稍候......del/f/s/q%systemdrive%\*.tmpRD%windir% \$hf_mig$/Q/Sdel%windir%\2950800.txt/f/qfor/f% %iin(%windir%\2950800.txt)dord%windir%\%%i/s/q dir%windir%\$NtUninstall*/a:d/b%windir%\295080 0.txtdel/f/s/q%systemdrive%\*._mpdel/f/s/q%systemdrive%\*.logdel/f/s/q%systemdrive%\*.giddel /f/s/q%systemdrive%\*.pnfdel/f/s/q%systemdrive %\infcache.1del/f/s/q%systemdrive%\*.chkdel/f/ s/q%systemdrive%\*.olddel/f/s/q%systemdrive%\r ecycled\*.*del/f/s/q%windir%\*.bakdel/f/s/q%wi ndir%\prefetch\*.*rd/s/q%windir%\temp&md%w indir%\tempdel/f/q%userprofile%\cookies\*.*del /f/q%userprofile%\recent\*.*del/f/s/q"%userpro file%\LocalSettings\TemporaryInterFiles\*.*"de l/f/s/q"%userprofile%\LocalSettings\Temp\*.*"d el/f/s/q"%userprofile%\recent\*.*"rd/s/q"c:\vo d_cache_data"2NULrd/s/q"d:\vod_cache_data"2NUL rd/s/q"e:\vod_cache_data"2NULrd/s/q"f:\vod_cac he_data"2NULrd/s/q"G:\vod_cache_data"2NULrd/s/ q"h:\vod_cache_data"2NULrd/s/q"I:\vod_cache_da ta"2NULrd/s/q"j:\vod_cache_data"2NULrd/s/q"k:\ vod_cache_data"2NULrd/s/q"l:\vod_cache_data"2NULrd/s/q"m:\vod_cache_data"2NULrd/s/q"n:\vod_c ache_data"2NULrd/s/q"o:\vod_cache_data"2NULrd/ s/q"p:\vod_cache_data"2NULrd/s/q"q:\vod_cache_ data"2NULrd/s/q"r:\vod_cache_data"2NULrd/s/q"s :\vod_cache_data"2NULrd/s/q"t:\vod_cache_data" 2NULrd/s/q"u:\vod_cache_data"2NULrd/s/q"v:\vod _cache_data"2NULrd/s/q"w:\vod_cache_data"2NULr d/s/q"x:\vod_cache_data"2NULrd/s/q"y:\vod_cach e_data"2NULrd/s/q"z:\vod_cache_data"2NULrd/s/q "c:\gvod_cache_data"2NULrd/s/q"d:\gvod_cache_d ata"2NULrd/s/q"e:\gvod_cache_data"2NULrd/s/q"f :\gvod_cache_data"2NULrd/s/q"G:\gvod_cache_dat a"2NULrd/s/q"h:\gvod_cache_data"2NULrd/s/q"I:\ gvod_cache_data"2NULrd/s/q"j:\gvod_cache_data" 2NULrd/s/q"k:\gvod_cache_data"2NULrd/s/q"l:\gv od_cache_data"2NULrd/s/q"m:\gvod_cache_data"2N ULrd/s/q"n:\gvod_cache_data"2NULrd/s/q"o:\gvod_cache_data"2NULrd/s/q"p:\gvod_cache_data"2NUL rd/s/q"q:\gvod_cache_data"2NULrd/s/q"r:\gvod_c ache_data"2NULrd/s/q"s:\gvod_cache_data"2NULrd /s/q"t:\gvod_cache_data"2NULrd/s/q"u:\gvod_cac he_data"2NULrd/s/q"v:\gvod_cache_data"2NULrd/s /q"w:\gvod_cache_data"2NULrd/s/q"x:\gvod_cache _data"2NULrd/s/q"y:\gvod_cache_data"2NULrd/s/q "z:\gvod_cache_data"2NULrd/s/q"c:\$recycle.bin \vod_cache_data"2NULrd/s/q"d:\$recycle.bin\vod _cache_data"2NULrd/s/q"e:\$recycle.bin\vod_cac he_data"2NULrd/s/q"f:\$recycle.bin\vod_cache_d ata"2NULrd/s/q"G:\$recycle.bin\vod_cache_data" 2NULrd/s/q"h:\$recycle.bin\vod_cache_data"2NUL rd/s/q"I:\$recycle.bin\vod_cache_data"2NULrd/s /q"j:\$recycle.bin\vod_cache_data"2NULrd/s/q"k :\$recycle.bin\vod_cache_data"2NULrd/s/q"l:\$r ecycle.bin\vod_cache_data"2NULrd/s/q"m:\$recycle.bin\vod_cache_data"2NULrd/s/q"n:\$recycle.b in\vod_cache_data"2NULrd/s/q"o:\$recycle.bin\v od_cache_data"2NULrd/s/q"p:\$recycle.bin\vod_c ache_data"2NULrd/s/q"q:\$recycle.bin\vod_cache _data"2NULrd/s/q"r:\$recycle.bin\vod_cache_dat a"2NULrd/s/q"s:\$recycle.bin\vod_cache_data"2N ULrd/s/q"t:\$recycle.bin\vod_cache_data"2NULrd /s/q"u:\$recycle.bin\vod_cache_data"2NULrd/s/q "v:\$recycle.bin\vod_cache_data"2NULrd/s/q"w:\ $recycle.bin\vod_cache_data"2NULrd/s/q"x:\$rec ycle.bin\vod_cache_data"2NULrd/s/q"y:\$recycle .bin\vod_cache_data"2NULrd/s/q"z:\$recycle.bin \vod_cache_data"2NUL(复制框里面的代码到TXT文本文档)然后另存为名字:XP一键清理垃圾系统代码.BAT(升级版)XP一键清理垃圾系统.BAT代码如下:@echoofftitle珠峰科技系统清理color2echo.echo.echo珠峰科技系统清理,献给我最亲爱的朋友们!请不要关闭此窗口!echo.echo珠峰科技开始清理垃圾文件,请稍等......echo.echo正在清理数据库文件,请稍等......del/f/s/q%systemdrive%\*.tmpdel/f/s/q% systemdrive%\*._mpdel/f/s/q%systemdrive%\*.log del/f/s/q%systemdrive%\*.giddel/f/s/q%systemdr ive%\*.chkdel/f/s/q%systemdrive%\*.olddel/f/s/ q%systemdrive%\recycled\*.*del/f/s/q%windir%\* .bakdel/f/s/q%windir%\prefetch\*.*del/f/s/q%sy stemdrive%\*.tmpRD%windir%\$hf_mig$/Q/Sdel%win dir%\2950800.txt/f/qfor/f%%iin(%windir%\295080 0.txt)dord%windir%\%%i/s/qdir%windir%\$NtUnins tall*/a:d/b%windir%\2950800.txtdel/f/s/q%syste mdrive%\*._mpdel/f/s/q%systemdrive%\*.logdel/f /s/q%systemdrive%\*.giddel/f/s/q%systemdrive%\*.pnfdel/f/s/q%systemdrive%\infcache.1del/f/s/ q%systemdrive%\*.chkdel/f/s/q%systemdrive%\*.o lddel/f/s/q%systemdrive%\recycled\*.*del/f/s/q %windir%\*.bakdel/f/s/q%windir%\prefetch\*.*rd /s/q%windir%\temp&md%windir%\tempdel/f/q%u serprofile%\cookies\*.*del/f/q%userprofile%\re cent\*.*del/f/s/q"%userprofile%\LocalSettings\ TemporaryInterFiles\*.*"del/f/s/q"%userprofile %\LocalSettings\Temp\*.*"del/f/s/q"%userprofil e%\recent\*.*"rd/s/q"c:\vod_cache_data"2NULrd/ s/q"d:\vod_cache_data"2NULrd/s/q"e:\vod_cache_ data"2NULrd/s/q"f:\vod_cache_data"2NULrd/s/q"G :\vod_cache_data"2NULrd/s/q"h:\vod_cache_data" 2NULrd/s/q"I:\vod_cache_data"2NULrd/s/q"j:\vod _cache_data"2NULrd/s/q"k:\vod_cache_data"2NULr d/s/q"l:\vod_cache_data"2NULrd/s/q"m:\vod_cach e_data"2NULrd/s/q"n:\vod_cache_data"2NULrd/s/q"o:\vod_cache_data"2NULrd/s/q"p:\vod_cache_dat a"2NULrd/s/q"q:\vod_cache_data"2NULrd/s/q"r:\v od_cache_data"2NULrd/s/q"s:\vod_cache_data"2NU Lrd/s/q"t:\vod_cache_data"2NULrd/s/q"u:\vod_ca che_data"2NULrd/s/q"v:\vod_cache_data"2NULrd/s /q"w:\vod_cache_data"2NULrd/s/q"x:\vod_cache_d ata"2NULrd/s/q"y:\vod_cache_data"2NULrd/s/q"z: \vod_cache_data"2NULrd/s/q"c:\gvod_cache_data" 2NULrd/s/q"d:\gvod_cache_data"2NULrd/s/q"e:\gv od_cache_data"2NULrd/s/q"f:\gvod_cache_data"2N ULrd/s/q"G:\gvod_cache_data"2NULrd/s/q"h:\gvod _cache_data"2NULrd/s/q"I:\gvod_cache_data"2NUL rd/s/q"j:\gvod_cache_data"2NULrd/s/q"k:\gvod_c ache_data"2NULrd/s/q"l:\gvod_cache_data"2NULrd /s/q"m:\gvod_cache_data"2NULrd/s/q"n:\gvod_cac he_data"2NULrd/s/q"o:\gvod_cache_data"2NULrd/s /q"p:\gvod_cache_data"2NULrd/s/q"q:\gvod_cache_data"2NULrd/s/q"r:\gvod_cache_data"2NULrd/s/q "s:\gvod_cache_data"2NULrd/s/q"t:\gvod_cache_d ata"2NULrd/s/q"u:\gvod_cache_data"2NULrd/s/q"v :\gvod_cache_data"2NULrd/s/q"w:\gvod_cache_dat a"2NULrd/s/q"x:\gvod_cache_data"2NULrd/s/q"y:\ gvod_cache_data"2NULrd/s/q"z:\gvod_cache_data" 2NULrd/s/q"c:\$recycle.bin\vod_cache_data"2NUL rd/s/q"d:\$recycle.bin\vod_cache_data"2NULrd/s /q"e:\$recycle.bin\vod_cache_data"2NULrd/s/q"f :\$recycle.bin\vod_cache_data"2NULrd/s/q"G:\$r ecycle.bin\vod_cache_data"2NULrd/s/q"h:\$recyc le.bin\vod_cache_data"2NULrd/s/q"I:\$recycle.b in\vod_cache_data"2NULrd/s/q"j:\$recycle.bin\v od_cache_data"2NULrd/s/q"k:\$recycle.bin\vod_c ache_data"2NULrd/s/q"l:\$recycle.bin\vod_cache _data"2NULrd/s/q"m:\$recycle.bin\vod_cache_dat a"2NULrd/s/q"n:\$recycle.bin\vod_cache_data"2NULrd/s/q"o:\$recycle.bin\vod_cache_data"2NULrd /s/q"p:\$recycle.bin\vod_cache_data"2NULrd/s/q "q:\$recycle.bin\vod_cache_data"2NULrd/s/q"r:\ $recycle.bin\vod_cache_data"2NULrd/s/q"s:\$rec ycle.bin\vod_cache_data"2NULrd/s/q"t:\$recycle .bin\vod_cache_data"2NULrd/s/q"u:\$recycle.bin \vod_cache_data"2NULrd/s/q"v:\$recycle.bin\vod _cache_data"2NULrd/s/q"w:\$recycle.bin\vod_cac he_data"2NULrd/s/q"x:\$recycle.bin\vod_cache_d ata"2NULrd/s/q"y:\$recycle.bin\vod_cache_data" 2NULrd/s/q"z:\$recycle.bin\vod_cache_data"2NUL rd/s/q%windir%\temp&md%windir%\tempdel/f/q %userprofile%\cookies\*.*del/f/q%userprofile%\ recent\*.*del/f/s/q"%userprofile%\LocalSetting s\TemporaryInterFiles\*.*"del/f/s/q"%userprofi le%\LocalSettings\Temp\*.*"del/f/s/q"%userprof ile%\recent\*.*"echo.echo正在清理系统分区根目录下tmp文件,请稍等......del/f/s/q%systemdrive%\*.tmpecho.echo 清理系统分区根目录下tmp文件完成!echo.echo正在清理系统分区根目录下_mp文件,请稍等......del/f/s/q%systemdrive%\*._mpecho.echo 清理系统分区根目录下_mp文件完成!echo.echo正在清理系统分区根目录下日志文件,请稍等......del/f/s/q%systemdrive%\*.logecho.echo 清理系统分区根目录下日志文件完成!echo.echo正在清理系统分区根目录下gid文件,请稍等......del/f/s/q%systemdrive%\*.gidecho.echo 清理系统分区根目录下gid文件完成!echo.echo正在清理系统分区根目录下chk文件,请稍等......del/f/s/q%systemdrive%\*.chkecho.echo 清理系统分区根目录下chk文件完成!echo.echo正在清理系统分区根目录下old文件,请稍等......del/f/s/q%systemdrive%\*.oldecho.echo清理系统分区根目录下old文件完成!echo.echo正在清理系统分区根目录下回收的文件,请稍等......del/f/s/q%systemdrive%\recycled\*.*ech o.echo清理系统分区根目录下回收的文件完成!echo.echo正在清理系统windows目录下的所有备份文件,请稍等......del/f/s/q%windir%\*.bakecho.echo清理系统windows目录下的所有备份文件完成!echo.echo 正在清理系统windows\prefetch\目录下预读文件,请稍等......del/f/s/q%windir%\prefetch\*.*echo.ech o清理系统windows\prefetch\目录下预读文件完成!echo.echo正在清理系统windows临时目录下的文件,请稍等......rd/s/q%windir%\temp&md%windir%\tem pecho.echo清理系统windows临时目录下的文件完成!echo.echo正在清理当前用户目录下的cookies文件,请稍等......del/f/q%userprofile%\cookies\*.*echo.e cho清理当前用户目录下的cookies文件完成!echo.echo正在清理用户目录下用户最近使用的信息文件,请稍等......del/f/q%userprofile%\recent\*.*echo.ec ho清理用户目录下用户最近使用的信息文件完成!echo.echo正在清理用户目录下的Inter临时文件,请稍等......del/f/s/q"%userprofile%\LocalSettings\ TemporaryInterFiles\*.*"echo.echo清理用户目录下的Inter临时文件完成!echo.echo正在清理用户目录下的临时文件,请稍等......del/f/s/q"%userprofile%\LocalSettings\ Temp\*.*"echo.echo清理用户目录下的临时文件完成!echo.echo正在清理用户目录下最近打开文件记录,请稍等......del/f/s/q"%userprofile%\recent\*.*"ech o.echoECHO.ECHO@echooffechoWScript.Sleep300%te mp%.\tmp$$$.vbsset/ai=3:Timeoutif%i%==0gotoNex tsetlocalset/ai=%i%-1echocscript//nologo%temp% .\tmp$$$.vbsgotoTimeoutgotoEnd:Nextcls&ech o.for%%fin(%temp%.\tmp$$$.vbs*)dodel%%fecho.保存格式为:.BATWin7一键清理垃圾系统.BAT代码如下:@echooffcolor0atitlewindows7系统垃圾清理---echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★echo.★☆☆★echo.★☆☆★echo.★☆为您清理系统垃圾文件,.....☆★echo★☆☆★echo.★☆☆★echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★echo清理垃圾文件,速度由电脑文件大小而定。

win7一键清理垃圾优化代码

win7一键清理垃圾优化代码

win7⼀键清理垃圾优化代码把下⾯的代码复制粘贴到新建⽂本保存,修改⽂本后缀名“.txt”为“.Bat”----------------------------以下代码复制------------------------------------------cls@echo offecho 系统垃圾清理echo 包括IE,软件等等echo Loading...del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.olddel /f /s /q %systemdrive%\*.syddel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakecho 清理IE⽂件,软件等等del /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /f /s /q %windir%\temp\*.*del /f /s /q "%appdata%\Microsoft\Windows\cookies\*.*"del /f /q %userprofile%\recent\*.*del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"del /f /s /q "%userprofile%\Local Settings\Temp\*.*"del /f /s /q "%userprofile%\recent\*.*"del /f /s /q %windir%\SoftwareDistribution\Download\*.*del /f /s /q "%appdata%\Microsoft\Windows\Recent\*.*"rd /s /q "%userprofile%\Local Settings\Temp\" & md "%userprofile%\Local Settings\Temp\"del /f /s /q "%userprofile%\Application Data\PPStream\*.*"del /f /s /q "%userprofile%\AppData\Roaming\PPStream\*.*"del /f /s /q "%userprofile%\AppData\Roaming\TheWorld\data\*.*"del /f /s /q "%userprofile%\Application Data\PPLive\*.*"del /f /s /q "%userprofile%\AppData\Roaming\PPLive\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.*"del /f /s /q "%windir%\Offline Web Pages\*.*del /f /s /q "%userprofile%\UpdateData\*.*"del /f /s /q "%userprofile%\Application Data\QQUpdate\*.*"del /f /s /q "%ProgFile%\Thunder Network\Thunder\Program\Update\*.*"rd /s /q "%ProgramFiles%\Tencent\QQGame\Download"del /a /f /s /q "%ProgramFiles%\Kaspersky Lab\*.tmp"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Recorded TV\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Pictures\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Music\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Videos\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\PPLive\*.*"rd /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\thunder_vod_cache\"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\thunder_dctemp\*.*"del /f /s /q "%systemdrive%\Documents and Settings\Application Data\Kaspersky Lab\AVP8\Data\*.*"del /a /f /s /q "%HOMEDRIVE%\pragramdata\All Users\Application Data\Kaspersky Lab\AVP8\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows Photo Gallery\Original Images\*.*"del /f /s /q "%userprofile%\AppData\Roaming\Kingsoft\KavRep\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Kingsoft\KavRep\*.*"del /f /s /q "%userprofile%\AppData\Roaming\Kingsoft\office6\backup\*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\Search\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\Windows Defender\Backup\*.*" del /f /s /q "%ProgramFiles%\Microsoft Security Essentials\Backup\*.*"del /a /f /s /q "%userprofile%\Application Data\SogouPY\sgim_ext.bin"del /f /s /q "%userprofile%\AppData\LocalLow\SogouPY\sgim_ext.bin"del /a /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\MicrosoftAntimalware\LocalCopy\*.*"del /a /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\WindowsDefender\LocalCopy\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\Thunder_A30B0AF7-D81B-464e-B4E4-4B6DF996FB46_\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\thunder_DEF2CF18-A4A5-468A-ADE3-B410C49964BC_\Temp\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\Thunder_xmp\*.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\风⾏⽹络电影.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\酷我⾳乐盒.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\UUSee ⽹络电视.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\查查看2.0.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\多特软件站.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\⾦⼭清理专家2009.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\⾦⼭⽹镖.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\迅雷看看-免费⾼清影视.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\千千⾳乐.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\在线演⽰.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\酷我游戏.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\多特软件站.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\修复360安全卫⼠.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\风⾏游戏.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\PPLive\最新免费影视展播.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPLive\PPLive ⾸页.*"del /a /f /q "%ProgramFiles%\PPLiveVA\PPLiveVA.url"del /a /f /q "%ProgramFiles%\PPLive\PPLive.url"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\360安全卫⼠\修复360安全卫⼠.*" del /a /f /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\乐鱼影⾳盒\乐鱼影⾳盒主页.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPS⽹络电视\多特知道电脑答疑.*" del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPS⽹络电视\下载软件最新版.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\酷狗\多特知道电脑答疑.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\酷狗\下载软件最新版.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\Microsoft Office\访问完美者精品下载站.*"del /a /f /q "D:\我的⽂档\收藏夹\爱词霸英语学习社区.*"del /a /f /q "D:\我的⽂档\Favorites\QQ⽹址⼤全.*"del /a /f /q "D:\我的⽂档\Favorites\爱词霸英语学习社区.*"del /a /f /q "D:\我的⽂档\Favorites\链接\QQ⽹址⼤全.*"del /a /f /q "D:\我的⽂档\Favorites\⾦狐电脑⼯作室-Jinhu Computer Studio.*"del /a /f /q "D:\我的⽂档\Favorites\搜索王 - Search All.*"del /a /f /q "%USERPROFILE%\收藏夹\爱词霸英语学习社区.*"del /a /f /q "%USERPROFILE%\Favorites\QQ⽹址⼤全.*"del /a /f /q "%USERPROFILE%\Favorites\爱词霸英语学习社区.*"del /a /f /q "%USERPROFILE%\Favorites\链接\QQ⽹址⼤全.*"del /a /f /q "%USERPROFILE%\Favorites\⾦狐电脑⼯作室-Jinhu Computer Studio.*"del /a /f /q "%USERPROFILE%\Favorites\搜索王 - Search All.*"del /a /f /q "%ProgramFiles%\FlashGet Network\FlashGet 3\绿⾊下载吧.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\快车 (FlashGet)\访问⾃由分享绿⾊下载吧!.*"del /a /f /q "%ProgramFiles%\StormII\绿⾊下载吧.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\暴风影⾳\访问⾃由分享绿⾊下载吧!.*"del /a /f /q "%SystemDrive%\WINDOWS\Tasks\SogouImeMgr.job"exit把下⾯的代码复制粘贴到新建⽂本保存,修改⽂本后缀名“.txt”为“.Bat”cls@echo offecho 系统垃圾清理echo 包括IE,软件等等echo Loading...del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.olddel /f /s /q %systemdrive%\*.syddel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakecho 清理IE⽂件,软件等等del /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /f /s /q %windir%\temp\*.*del /f /s /q "%appdata%\Microsoft\Windows\cookies\*.*"del /f /q %userprofile%\recent\*.*del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"del /f /s /q "%userprofile%\Local Settings\Temp\*.*"del /f /s /q "%userprofile%\recent\*.*"del /f /s /q %windir%\SoftwareDistribution\Download\*.*del /f /s /q "%appdata%\Microsoft\Windows\Recent\*.*"rd /s /q "%userprofile%\Local Settings\Temp\" & md "%userprofile%\Local Settings\Temp\"del /f /s /q "%userprofile%\Application Data\PPStream\*.*"del /f /s /q "%userprofile%\AppData\Roaming\PPStream\*.*"del /f /s /q "%userprofile%\AppData\Roaming\TheWorld\data\*.*"del /f /s /q "%userprofile%\Application Data\PPLive\*.*"del /f /s /q "%userprofile%\AppData\Roaming\PPLive\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.*"del /f /s /q "%windir%\Offline Web Pages\*.*del /f /s /q "%userprofile%\UpdateData\*.*"del /f /s /q "%userprofile%\Application Data\QQUpdate\*.*"del /f /s /q "%ProgFile%\Thunder Network\Thunder\Program\Update\*.*"rd /s /q "%ProgramFiles%\Tencent\QQGame\Download"del /a /f /s /q "%ProgramFiles%\Kaspersky Lab\*.tmp"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Recorded TV\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Pictures\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Music\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Videos\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\PPLive\*.*"rd /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\thunder_vod_cache\"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\thunder_dctemp\*.*"del /f /s /q "%systemdrive%\Documents and Settings\Application Data\Kaspersky Lab\AVP8\Data\*.*"del /a /f /s /q "%HOMEDRIVE%\pragramdata\All Users\Application Data\Kaspersky Lab\AVP8\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows Photo Gallery\Original Images\*.*"del /f /s /q "%userprofile%\AppData\Roaming\Kingsoft\KavRep\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Kingsoft\KavRep\*.*"del /f /s /q "%userprofile%\AppData\Roaming\Kingsoft\office6\backup\*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\Search\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\Windows Defender\Backup\*.*"del /f /s /q "%ProgramFiles%\Microsoft Security Essentials\Backup\*.*"del /a /f /s /q "%userprofile%\Application Data\SogouPY\sgim_ext.bin"del /f /s /q "%userprofile%\AppData\LocalLow\SogouPY\sgim_ext.bin"del /a /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\MicrosoftAntimalware\LocalCopy\*.*"del /a /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\WindowsDefender\LocalCopy\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\Thunder_A30B0AF7-D81B-464e-B4E4-4B6DF996FB46_\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\thunder_DEF2CF18-A4A5-468A-ADE3-B410C49964BC_\Temp\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\Thunder_xmp\*.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\风⾏⽹络电影.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\酷我⾳乐盒.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\UUSee ⽹络电视.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\查查看2.0.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\多特软件站.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\⾦⼭清理专家2009.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\⾦⼭⽹镖.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\迅雷看看-免费⾼清影视.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\千千⾳乐.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\在线演⽰.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\酷我游戏.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\多特软件站.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\修复360安全卫⼠.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\风⾏游戏.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\PPLive\最新免费影视展播.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPLive\PPLive ⾸页.*"del /a /f /q "%ProgramFiles%\PPLiveVA\PPLiveVA.url"del /a /f /q "%ProgramFiles%\PPLive\PPLive.url"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\360安全卫⼠\修复360安全卫⼠.*" del /a /f /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\乐鱼影⾳盒\乐鱼影⾳盒主页.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPS⽹络电视\多特知道电脑答疑.*" del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPS⽹络电视\下载软件最新版.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\酷狗\多特知道电脑答疑.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\酷狗\下载软件最新版.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\Microsoft Office\访问完美者精品下载站.*"del /a /f /q "D:\我的⽂档\收藏夹\爱词霸英语学习社区.*"del /a /f /q "D:\我的⽂档\Favorites\QQ⽹址⼤全.*"del /a /f /q "D:\我的⽂档\Favorites\爱词霸英语学习社区.*"del /a /f /q "D:\我的⽂档\Favorites\链接\QQ⽹址⼤全.*"del /a /f /q "D:\我的⽂档\Favorites\⾦狐电脑⼯作室-Jinhu Computer Studio.*"del /a /f /q "D:\我的⽂档\Favorites\搜索王 - Search All.*"del /a /f /q "%USERPROFILE%\收藏夹\爱词霸英语学习社区.*"del /a /f /q "%USERPROFILE%\Favorites\QQ⽹址⼤全.*"del /a /f /q "%USERPROFILE%\Favorites\爱词霸英语学习社区.*"del /a /f /q "%USERPROFILE%\Favorites\链接\QQ⽹址⼤全.*"del /a /f /q "%USERPROFILE%\Favorites\⾦狐电脑⼯作室-Jinhu Computer Studio.*"del /a /f /q "%USERPROFILE%\Favorites\搜索王 - Search All.*"del /a /f /q "%ProgramFiles%\FlashGet Network\FlashGet 3\绿⾊下载吧.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\快车 (FlashGet)\访问⾃由分享绿⾊下载吧!.*"del /a /f /q "%ProgramFiles%\StormII\绿⾊下载吧.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\暴风影⾳\访问⾃由分享绿⾊下载吧!.*"del /a /f /q "%SystemDrive%\WINDOWS\Tasks\SogouImeMgr.job"exit。

一键清除系统垃圾批处理文件clean.bat的制作方法

一键清除系统垃圾批处理文件clean.bat的制作方法

一键清除系统垃圾批处理文件的制作方法先新建一个记事本文件,然后把下面这段代码复制到记事本里,保存为后缀名为.bat的批处理文件,例如clean.bat。

然后双击运行它即可以清除系统垃圾。

源代码如下:@echo offecho 清空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%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.oldecho 清空垃圾箱,备份文件和预缓存脚本... del /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakdel /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\temprem cooke和最近历史还是保留吧...rem del /f /q %userprofile%\COOKIES s\*.*rem del /f /q %userprofile%\recent\*.*echo 清理系统盘无用文件...%windir%\system32\sfc.exe /purgecacheecho 优化预读信息...%windir%\system32\defrag.exe %systemdrive% -b echo *echo ***echo *****echo *******echo 清除系统完成!echo 本软件由廖道林制作!echo *****echo ***echo *echo. & pause廖道林2011.3.18。

一键清理系统垃圾代码

一键清理系统垃圾代码

代码一:(会删除系统cookies,保存的密码之类的会被删除)@echo offecho 正在清除系统垃圾文件,请稍等......del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.olddel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakdel /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /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代码二:(不会删除系统cookies,保存的密码之类的不会被删除)@echo offecho 正在清除系统垃圾文件,请稍等......del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.olddel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakdel /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /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用法:复制上述代码到记事本中更改文件给是txt为bat点击是,变为如下点击进入,任意键结束。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

把下面代码复制到记事本中,然后改后缀为…….dat 如然后打开点能运行运行效果如图下面代码一直到最后@echo offclsremrem Contact: [url=] [/url]remrem This program is free software; you can redistribute it and/or modify it underrem 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.remrem Y ou should have received a copy of the GNU General Public License along with thisprogram;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_SP2REM Always basic XP64 SupportREM Modifications to BITS service (cause of v5 WindowsUpdate) - #discharged#REM Additional notices corresponding to DHCP issueREM V ariables problems during RESTORE_DEFAULT usage fixedREM SMBDEVICEENABLED Restore Bug fixedREM Mod_history-09-27-2005**11-08-2005**11-29-2005**12-07-2005**12-18-2005 setlocalREM *** INIT_V ARS ***set CHK_SVC=YESset XPSP2=FALSEset SERVER=FALSEset NT_SERVER_CHK=TRUE:STARTecho "svc2kXp.cmd" 正在检测您的电脑,稍后进行优化!echo ================================================================ set find=%SystemRoot%\System32\find.exeset regedit=%SystemRoot%\regedit.exeif not exist "%find%" goto :NOFINDif not exist "%regedit%" goto :NOREGEDITif not "%1" == "%*" goto :SYNTAXif /I "%1"=="/?" goto :HELPif /I "%1"=="/help" goto :HELPif /I "%1"=="-h" goto :HELPif /I "%1"=="--help" goto :HELPif /I "%1"=="-?" goto :HELPif /I "%1"=="--?" goto :HELPif /I "%1"=="/fix" goto :FIXgoto :VERSION:SYNTAXecho.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:HELPecho.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 unchangedecho /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 /allecho.set /P CHS= [Press "G" for GNU GPL informations or "Q" for quit]?if /I "%CHS%"=="G" goto :GNU_GPLif /I "%CHS%"=="Q" goto :QUIT_EXTCLSgoto :HELP:GNU_GPLCLSecho Informations about GNU-General Public License for "svc2kxp.cmd"echo =============================================================== echo.echo Copyright (C) 2003-05 Ansgar Wiechers, Torsten Mannecho 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 underecho the terms of the GNU General Public License as published by the Free Softwareecho Foundation; either version 2 of the License, or (at your option) any laterecho version. This program is distributed in the hope that it will be useful, butecho WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY orecho 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 withecho this program; if not, write to the:echo.echo Free Software Foundation, Inc.echo 59 Temple Place, Suite 330echo Boston, MA 02111-1307, USA.echo.set /P CHS= [Press "H" for help or "Q" for quit]?CLSif /I "%CHS%"=="H" goto :HELPif /I "%CHS%"=="Q" goto :QUIT_EXTgoto GNU_GPL:VERSIONecho Checking system version ...if /I "%NT_SERVER_CHK%"=="FALSE" goto :SKIP_NT_SERVER_CHKREM Checking for running server version"%regedit%" /e "%TEMP%\~svr.txt" "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions"type "%TEMP%\~svr.txt"|"%find%" /i "Server" >NULif not errorlevel 1 set SERVER=TRUEtype "%TEMP%\~svr.txt"|"%find%" /i "LanMan" >NULif not errorlevel 1 set SERVER=TRUEif exist "%TEMP%\~svr.txt" del /F /Q "%TEMP%\~svr.txt"if /I "%SERVER%"=="TRUE" goto :NTSERVER:SKIP_NT_SERVER_CHKver | "%find%" /i "Windows 2000" > nulif not errorlevel 1 goto :OS2Kver | "%find%" /i "Windows XP" > nulif not errorlevel 1 goto :OSXPver | "%find%" /i "Microsoft Windows [V ersion 5.2.3790]" > nulif not errorlevel 1 goto :OSXP64echo !!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:NOFINDecho.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.EXEecho.echo.goto :QUIT:NOREGEDITecho.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.EXEecho.echo.goto :QUIT:NTSERVERecho.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:OS2Krem Specific OS Detection Iset SYSTEM=2krem 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" >NULif errorlevel==1 (type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 3" >NULif errorlevel==1 (type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 2" >NULif errorlevel==1 (type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 1" >NULif 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_2kSPif exist "%TEMP%\~svclist.txt" del /F /Q "%TEMP%\~svclist.txt"goto :CONTINUE:OSXPrem Specific OS detection IIset SYSTEM=xprem 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" >NULif errorlevel==1 (type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 1" >NULif errorlevel==1 (SET XPSP2=FALSEecho !Windows XP [no or unknown Service Pack] detected!goto NO_XPSP)SET XPSP2=FALSEecho !Windows XP [Service Pack 1] detected!goto :NO_XPSP)SET XPSP2=TRUEecho !Windows XP [ServicePack 2] detected!goto :NO_XPSP:OSXP64rem Specific OS detection IIset SYSTEM=xprem 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" >NULif errorlevel==1 (type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 1" >NULif errorlevel==1 (SET XPSP2=FALSEecho !EXPERIMENTAL! Windows XP64 [no or unknown Service Pack] detected!goto NO_XPSP)SET XPSP2=FALSEecho !EXPERIMENTAL! Windows XP64 [Service Pack 1] detected!goto :NO_XPSP)SET XPSP2=TRUEecho !EXPERIMENTAL! Windows XP64 [ServicePack 2] detected!goto :NO_XPSP:NO_XPSPif exist "%TEMP%\~svclist.txt" del /F /Q "%TEMP%\~svclist.txt"goto :CONTINUE:CONTINUEREM Creating subdirectory "ntsvcfg" in userprofile if necessaryif 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.regset SVC_SA V=%USERPROFILE%\ntsvcfg\current_services_config.regset DCOM_BAK=%USERPROFILE%\ntsvcfg\dcom.regset DCOMP_BAK=%USERPROFILE%\ntsvcfg\dcomp.regset SMB_BAK=%USERPROFILE%\ntsvcfg\smb.regset DCOM_TMP=%TEMP%\dcomoff.regset DCOMP_TMP=%TEMP%\dcompoff.regset SMB_TMP=%TEMP%\smboff.regset FPRINT=%USERPROFILE%\ntsvcfg\FPRINT.REFset HANDLER1=%USERPROFILE%\ntsvcfg\handler_aim.regset HANDLER2=%USERPROFILE%\ntsvcfg\handler_gopher.regset HANDLER3=%USERPROFILE%\ntsvcfg\handler_telnet.regset NB_TMP=%TEMP%\nb_off.vbsset srctmp=%USERPROFILE%\ntsvcfg\~srcreate.vbsset DHCP_CHANGES="YES"REM *****Options*****set SCHEDULER_ENABLED=NOset UseXPSysRestore=YESset RESTORE=NOset SVC_MOD=NOset USE_FPRINT=YESset Deactivate_NetBIOS=YESset RESTORE_MODE=2REM *****APP_PA THs******set NET=%SystemRoot%\system32\net.exeset SC=%SystemRoot%\system32\sc.exeset FC=%SystemRoot%\system32\fc.exeset IPCONFIG=%SystemRoot%\system32\ipconfig.exeecho Checking available permissions: [local], please wait ..."%net%" user "%USERNAME%" 2> nul | "%find%" /i "admin" | "%find%" /i /v "name" > nulif errorlevel 1 (echo " " " : [domain], please wait ..."%net%" user "%USERNAME%" /domain 2> nul | "%find%" /i "admin" | "%find%" /i /v "name" > nulif 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=FALSErem searching for sc.exeif not exist "%FPRINT%" echo Checking for presence of SC.EXE ..."%sc%" qc > nul 2>&1if errorlevel 1 (echo !!Failed!!echo __________echo Die notwendige Datei SC.EXE konnte leider nicht unterecho [%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:///reskit/win2000/sc.zip =-echo.echo Self-installing SC.EXEecho ======================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 anecho 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_DEFAULTSrem checking for modified servicesif /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.txtfor /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" >NULif errorlevel 1 goto :DIFFgoto OK:DIFFecho Checking for modified services ... failed-services maybe modified! [E]valuateset SVC_MOD=YESgoto :MOD_END:OKecho Checking for modified services ... OKset SVC_MOD=NOif exist "%USERPROFILE%\ntsvcfg\svc2cmp.sav" del /F /Q "%USERPROFILE%\ntsvcfg\svc2cmp.sav"goto :MOD_END:MOD_ENDREM)))set CHK_SVC=NOif /I "%1"=="/restore" goto :RESTORE:MENUEif /I "%1"=="/lan" goto :SKIP_MENUEecho.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 :RESTOREif /I "%CHS%"=="R" goto :RESTOREif /I "%CHS%"=="M" goto :MORE_OPTIONSif /I "%SVC_MOD%"=="YES" if /I "%CHS%"=="E" goto :EV ALUA TE_SERVICESif /I "%CHS%"=="G" goto :CREA TING_NEW_FINGERPRINTif /I "%CHS%"=="Q" goto :QUITclsgoto :START:SKIP_MENUErem Checking if old restorefiles exists.rem if it is so old files will be restored before new changesif not exist "%SVC_BAK%" goto :NO_RESTOREif /I %RESTORE_MODE%==3 goto :NO_RESTOREif /I %RESTORE_MODE%==4 goto :NO_RESTOREset RESTORE=YESecho.echo _______________________________________________________________________ echo.echo [Selected Restore Mode: %RESTORE_MODE%]echo.echo # Achtung: Alte Sicherungsdateien gefunden!echo.echo "Svc2kXp.cmd" wurde schon einmal ausgefuehrt. Damit neue Aenderungenecho korrekt durchgefuehrt werden koennen, werden die Sicherungsdateienecho eingespielt.echo.echo.echo Attention: old restore-files found!echo.echo This program runs not for the first time. To apply all new changesecho correctly old restore files will used to get an definite state.echo.echo.echo # Starting restore ...goto RESTORE_EXT:NO_RESTORErem query if taskplaner should runif /I "%SYSTEM%"=="2k" goto :SKIP_SQUERYif /I "%SYSTEM%"=="xp" (if /I %SELECT%=="" goto :SKIP_SQUERYif /I %SELECT%=="/all" goto :SKIP_SQUERYif /I %XPSP2%==True (set SCHEDULER_ENABLED=YESgoto :SKIP_SQUERY))echo.echo.echo Rueckfrage / Queryecho ==================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 setecho automatic system restore points press ANY KEY TO CONTINUE to close port 135echo [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_SQUERYif 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\telnetecho ... done.)if exist "%SVC_BAK%" (if /I %RESTORE_MODE%==2 goto :SKIP_SA VINGif /I %RESTORE_MODE%==4 goto :SKIP_SA VING)rem saving registry settingsecho _________________________________________________________________________ echo.echo [Selected Restore Mode: %RESTORE_MODE%]echo.echo Saving services settings toecho %SVC_BAK% ..."%regedit%" /e "%SVC_BAK%" HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servicesecho Saving DCOM settings toecho %DCOM_BAK% ..."%regedit%" /e "%DCOM_BAK%" HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole echo Saving DCOM standard protocols settings toecho %DCOMP_BAK% ..."%regedit%" /e "%DCOMP_BAK%" HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc echo Saving SMB settings toecho %SMB_BAK%"%regedit%" /e "%SMB_BAK%" HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parametersecho Saving URL-Handler [AIM, GOPHER, TELNET] toecho %HANDLER1%"%regedit%" /e "%HANDLER1%" HKEY_CLASSES_ROOT\AIMecho %HANDLER2%"%regedit%" /e "%HANDLER2%" HKEY_CLASSES_ROOT\gopherecho %HANDLER3%"%regedit%" /e "%HANDLER3%" HKEY_CLASSES_ROOT\telnetecho.echo All done.echo ___________________________________________echo.:SKIP_SA VINGif /I "%SYSTEM%"=="xp" (if /I %UseXPSysRestore%==YES (goto :XPSYSRESTORE)):XPSYSRESTORE_DONErem reconfigure servicesrem startup: demandecho.echo Setting services to "demand" ...echo ___________________________________________echo.echo # Checking DHCP ..."%ipconfig%" -all | "%find%" /i "Lease" > nulif errorlevel 1 (rem trying other method for DHCP"%ipconfig%" -all | "%find%" /i "DHCP-Server" > nulif errorlevel 1 (echo ... no active DHCP found.echo.echo Hinweisecho =======echo Ihre Konfiguration deutet an, das kein DHCP benoetigt wird. Fallsecho Sie dennoch einen DSL-Internetzugang besitzen und DHCP irrtuemlichecho deaktivert wurde, kann es nach einem Neustart zu Problemen mit derecho Internetverbindung kommen. Starten sie zur Problembehebung denecho DHCP-Dienst manuell neu.echo.echo Noticeecho ======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= demandgoto :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= demandif /I %XPSP2%==True (rem If XP SP2 is installed there are less changes to XP-ICFif /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= demandif /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= demandif /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= demandrem Wireless Zero Configuration - fuer WLAN-V erbindungen notwendig. rem Falls erforderlich auf AUTO stellen.rem "%sc%" config WZCSVC start= demand)echo.rem startup: autoecho 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= autoif /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" >NULif errorlevel 1 "%sc%" config uploadmgr start= auto"%sc%" config WebClient start= auto)echo.rem startup: disabledecho 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= disabledif /I %SELECT%=="/all" ("%sc%" query BITS | "%find%" /i "SERVICE_NAME" >NULif not errorlevel 1 "%sc%" config BITS start= disabled"%sc%" query wuauserv | "%find%" /i "SERVICE_NAME" >NULif 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。

相关文档
最新文档