观看记录
  • 我的观影记录
登录
测试首页自制实用批处理系统工具

自制实用批处理系统工具

便宜适用批处置系统东西,清理系统文件,清理休眠文件,右键添加办理员权限菜单等适用功能的操作。

方式/步骤

  1. 1

    右键点击桌面空白处→新建→文本文档。

  2. 2

    双击打开新建的记事本,输入以下批处置代码:

    :menu

    cls

    @echo off

    title ——Windows 7 适用批处置——

    echo ——————————————————————————

    echo             请选摘要进行的操作,然后按回车

    echo ——————————————————————————

    echo.

    echo 1.系统自带磁盘清理东西的加强功能设置

    echo.

    echo 2.系统自带磁盘清理东西的加强功能执行

    echo.

    echo 3.清理休眠文件,系统盘可以空出与内存一样年夜的空间!

    echo.

    echo 4.清理右下角通知区域图标识表记标帜录,全数图标识表记标帜录将删除!

    echo.

    echo 5.清理Windows 7的垃圾文件,旧文件

    echo.

    echo 6.添加右键办理员权限(适用)

    echo.

    echo q.退出!

    echo.

    :cho

    set /p choice=请选择:

    IF NOT"%choice%"=="" SET choice=%choice:~0,1%

    if /i"%choice%"=="1" goto s1

    if /i"%choice%"=="2" goto s2

    if /i"%choice%"=="3" goto s3

    if /i"%choice%"=="4" goto s4

    if /i"%choice%"=="5" goto s5

    if /i"%choice%"=="6" goto s6

    if /i"%choice%"=="q" goto end

    echo 选择无效,请从头输入……

    echo.

    goto cho

    :s1

    cls

    echo 请选摘要清理的文件类型,确定后主动返回。

    cleanmgr /sageset:99

    echo 设置完毕后请选择“2”执行清理功能。

    pause

    goto menu

    :s2

    cls

    echo 正在执行清理功能,若是速度太慢可以选择打消!

    cleanmgr /sagerun:99

    echo 清理完毕!

    pause

    goto menu

    :s3

    cls

    echo 本功能需要系统打消休眠功能!

    echo 注重!请首先把电源选项中的“使计较机进入睡眠状况”

    echo 设为“从不”,保留后再继续执行,不然设置会掉效!

    pause

    powercfg -h off

    goto menu

    :s4

    cls

    reg delete"HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v"PastIconsStream" /f

    reg delete"HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v"IconStreams" /f

    echo 通知区域的全数图标识表记标帜录已删除!

    echo 此刻重启explorer.exe历程!

    pause

    taskkill /f /im explorer.exe

    start explorer.exe

    goto menu

    :s5

    @echo off

    echo 正在断根系统垃圾文件,请稍等……

    echo 清理垃圾文件,速度由电脑文件大小而定。

    echo 在没看到结从头至尾信息时请勿封闭本窗口。

    echo 正在断根系统垃圾文件,请稍后……

    echo 删除补丁备份目次……

    RD %windir%\$hf_mig$ /Q /S

    dir %windir%\$NtUninstall* /a:d /b >%windir%\update_.txt

    for /f %%i in (%windir%\update_.txt) do rd %windir%\%%i /s /q

    del %windir%\update_.txt /f /q

    echo 删除补丁安装记实内容

    del %windir%\KB*.log /f /q

    echo 删除系统盘目次下姑且文件

    del /f /s /q %systemdrive%\*.tmp

    del /f /s /q %systemdrive%\*._mp

    echo 删除系统盘目次下日记文件

    del /f /s /q %systemdrive%\*.log

    echo 删除系统盘目次下GID姑且文件

    del /f /s /q %systemdrive%\*.gid

    echo 删除系统目次下磁盘扫姑且文件

    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 删除应用法式姑且文件

    del /f /s /q %windir%\prefetch\*.*

    echo 删除系统维护等操作发生的姑且文件

    rd /s /q %windir%\temp md %windir%\temp

    echo 删除internet姑且文件

    del /f /s /q"%userprofile%\local settings\temporary internet files\*.*"

    echo 删除当前用户日常操作姑且文件

    del /f /s /q"%userprofile%\local settings\temp\*.*"

    echo 删除打开文件记实快捷体例

    del /f /s /q"%userprofile%\recent\*.*"

    pause

    goto menu

    :s6

    cls

    echo 正在添加右键菜单选项……

    echo Windows Registry Editor Version 5.00>>reg_.reg

    echo [HKEY_CLASSES_ROOT\*\shell\runas]>>reg_.reg

    echo @="添加办理员权限">>reg_.reg

    echo"NoWorkingDirectory"="">>reg_.reg

    echo [HKEY_CLASSES_ROOT\*\shell\runas\command]>>reg_.reg

    echo @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F">>reg_.reg

    echo"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F">>reg_.reg

    echo [HKEY_CLASSES_ROOT\exefile\shell\runas2]>>reg_.reg

    echo @="添加办理员权限">>reg_.reg

    echo"NoWorkingDirectory"="">>reg_.reg

    echo [HKEY_CLASSES_ROOT\exefile\shell\runas2\command]>>reg_.reg

    echo @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F">>reg_.reg

    echo"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F">>reg_.reg

    echo [HKEY_CLASSES_ROOT\Directory\shell\runas]>>reg_.reg

    echo @="添加办理员权限">>reg_.reg

    echo"NoWorkingDirectory"="">>reg_.reg

    echo [HKEY_CLASSES_ROOT\Directory\shell\runas\command]>>reg_.reg

    echo @="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t">>reg_.reg

    echo"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t">>reg_.reg

    regedit /s reg_.reg

    del /q /f reg_.reg

    echo 已经添加完毕。

    pause

    goto menu

    :end

    exit

  3. 3

    文件→另存为。

  4. 4

    取个名(随意):适用批处置系统东西,关头是后面的扩展名为.bat→保留。

  5. 5

    双击打开建造好的批处置东西。

  6. 6

    按照提醒,就能利用该功能了,先输入数字→再按回车键。

  7. 7

    各项功能别离为:

    ①系统自带磁盘清理东西的加强设置

    ②系统自带磁盘清理东西的加强功能执行

    ③清理休眠文件,系统盘可以空出与内存一样年夜的空间!

    ④.清理右下角通知区域图标识表记标帜录,全数图标识表记标帜录将删除!

    ⑤清理Windows 7的垃圾文件,旧文件

    ⑥添加右键办理员权限(适用)

    Q退出

注重事项

“自制实用批处理系统工具”关联的文章

切换深色外观
留言
视频编辑修改
回到顶部
首页
手机数码
医疗健康
金融管理
社交情感
无名