Good batch processing script Part 1

Source: Internet
Author: User
Tags gpupdate

@ Echo off
CLS
: List selection
@ Echo off
Set := ::::::::::::::
Set to = plaintext bat Author:
@ Title List select-% to %
@ Prompt
@ Color
CLS
Echo.
Echo.
Echo.
Echo 1 recovery zone ------ restore all unrecoverable recovery. -- spear
Echo 2 Forbidden Zone ------ prohibit all prohibited things. -- Shield
Echo 3 command disable ------ User-Defined disable cmd some commands.
Echo 4 master disk creation ------ prevention and optimization.

echo -------------------------------------------------------------------------
echo example: enter 5 and press ENTER = process killing
echo directly press ENTER = Refresh QQ and press ENTER = QQ space Q and press ENTER = exit
@ set yslbxz = ""
@ set /P yslbxz =
If/I "% yslbxz %" = "1" Goto recovery zone
If/I "% yslbxz %" = "2" Goto disable area
If/I "% yslbxz %" = "3" Goto disable cmd command
If/I "% yslbxz %" = "4" Goto master disk create
If/I "% yslbxz %" = "QQ" Start i0000e
If/I "% yslbxz %" = "Q" (Exit)
select a goto list

Echo ---------------------------- 1. Restore area ---------------------------------------> NUL
: Recovery area
Title recovery area-% to %
CLS
Echo ── ─
Echo → restore the region
Echo ----------------------------------------------------------------------
Echo %: % ① my PC-right-click to manage %: % restore ::
Echo %: % ② network connection-local connection %: % too many ::
Echo %: % ③ my PC-right-click property % ::
Echo %: % ④ note table % ::
Echo %: % ⑤ Folder Options % ::
Echo %: % 6 taskbar attributes % ::
Echo %: % 7 Right-click % ::
Echo %: % manage Task Manager % ::
Echo %: % Cancel message % ::
Echo %: % locked the computer % ::
Echo %: % login Change Password % ::
Echo %: % login console % ::
Echo %: % ⒀ ie download % ::
Echo %: % running c m d %: % running failed ::
Echo %: % restore Internet property %: % restore ::
Echo ----------------------------------------------------------------------
Echo. If no change is found, refresh F5.
Echo ----------------------------------------------------------------------

Enter the corresponding value for ECHO recovery. For example, enter 14 and press ENTER = resume to use cmd.
Echo press ENTER = Refresh recovery list G = List select QQ = QQ space q = quit

: Jzzqzl1
@ Set Jinzhi = ""
@ Set/P Jinzhi =
If/I "% Jinzhi %" = "1" Goto ① 1
If/I "% Jinzhi %" = "2" Goto ② 1
If/I "% Jinzhi %" = "3" Goto ③ 1
If/I "% Jinzhi %" = "4" Goto ④ 1
If/I "% Jinzhi %" = "5" Goto ⑤ 1
If/I "% Jinzhi %" = "6" Goto ⑥ 1
If/I "% Jinzhi %" = "7" Goto 71.
If/I "% Jinzhi %" = "8" Goto limit 1
If/I "% Jinzhi %" = "9" Goto limit 1
If/I "% Jinzhi %" = "10" Goto limit 1
If/I "% Jinzhi %" = "11" Goto limit 1
If/I "% Jinzhi %" = "12" Goto limit 1
If/I "% Jinzhi %" = "13" Goto limit 1
If/I "% Jinzhi %" = "14" Goto limit 1
If/I "% Jinzhi %" = "15" Goto limit 1
If/I "% Jinzhi %" = "G" Goto list select
If/I "% Jinzhi %" = "QQ" Start iexplore
If/I "% Jinzhi %" = "Q" (Exit)
Goto recovery area

: ① 1
Reg add hkcu \ SOFTWARE \ Policies \ Microsoft \ MMC \ {58221c67-ea27-11cf-adcf-00aa00a80033}/V restrict_run/T REG_DWORD/D 0/F> NUL
Compmgmt. MSC
Echo %: % ① right-click my computer-manage recovery: OK
Goto jinzhijs1
: ② 1
Reg Delete "hkcu \ SOFTWARE \ Policies \ Microsoft \ Windows \ Network Connections"/F> NUL 4> NUL 2> NUL
Echo [version]> % Temp % \ netman. inf
Echo Signature = "$ Windows NT $" >>% TEMP % \ netman. inf
Echo [defainstall install. Services]> % Temp % \ netman. inf
Echo addservice = netman, my_addservice_name> % Temp % \ netman. inf
Echo [my_addservice_name]> % Temp % \ netman. inf
Echo servicetype = 0x20> % Temp % \ netman. inf
Echo starttype = 2> % Temp % \ netman. inf
Echo errorcontrol = 1> % Temp % \ netman. inf
Echo servicebinary = % SystemRoot % \ system32 \ svchost.exe-K netsvcs> % Temp % \ netman. inf
Rundll32 syssetup, setupinfobjectinstallaction defainstall install 128% TEMP % \ netman. inf> NUL 4> NUL 2> NUL
Net start netman> NUL 4> NUL 2> NUL
Del % Temp % \ netman. inf
NCPA. CPL
Echo %: % ② network connection-local connection recovery: OK
Goto jinzhijs1
: ③ 1
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer/V nopropertiesmycomputer/T REG_DWORD/D 0/F> NUL
Sysdm. CPL
Echo %: % ③ my PC-right-click property restore: OK
Goto jinzhijs1
: ④ 1
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System/V disableregistrytools/T REG_DWORD/D 0/F> NUL
Regedit
Echo %: % ④ recovery of the volume-Filling Table: OK
Goto jinzhijs1
: ⑤ 1
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer/V nofolderoptions/T REG_DWORD/D 0/F> NUL
Echo %: % ⑤ folder option recovery: OK
Goto jinzhijs1
: 1
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer/V nosettaskbar/T REG_DWORD/D 0/F> NUL
Echo %: % 6 taskbar attribute recovery: OK
Goto jinzhijs1
: 7. 1
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer/V noviewcontextmenu/T REG_DWORD/D 0/F> NUL
Echo %: % 7 Right-click Restore: OK
Goto jinzhijs1
: Limit 1
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System/V disabletaskmgr/T REG_DWORD/D 0/F> NUL
Taskmgr
Echo %: % resume Task Manager recovery: OK
Goto jinzhijs1
: Limit 1
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer/V nologoff/T REG_DWORD/D 0/F> NUL
Echo %: % cancel injection recovery: OK
Goto jinzhijs1
: Limit 1
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System/V disablelockworkstation/T REG_DWORD/D 0/F> NUL
Echo %: % unlock locked computer recovery: OK
Goto jinzhijs1
: Limit 1
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System/V disablechangepassword/T REG_DWORD/D 0/F> NUL
Echo %: % reboot Change Password Recovery: OK
Goto jinzhijs1
: Limit 1
Reg add hkcu \ SOFTWARE \ Policies \ Microsoft \ MMC/V restrictauthormode/T REG_DWORD/D 0/F> NUL
Echo %: % restore console recovery: OK
Goto jinzhijs1
: Limit 1
Reg add hkcu \ SOFTWARE \ Policies \ Microsoft \ MMC/V restrictauthormode/T REG_DWORD/D 0/F> NUL
Echo %: % recovery ie download recovery: OK
Echo Note: Although ie download has been restored, software downloads can also be used, for example, Thunder.
Goto jinzhijs1
: Limit 1
Reg add hkcu \ SOFTWARE \ Policies \ Microsoft \ WINDOWS \ SYSTEM \/V disablecmd/T REG_DWORD/D 0/F> NUL
Echo %: % restored c m d recovery: OK
Goto jinzhijs1
: Limit 1
: General
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V generaltab/T REG_DWORD/D 0/F> NUL
: Security
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V securitytab/T REG_DWORD/D 0/F> NUL
: Privacy
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V privacytab/T REG_DWORD/D 0/F> NUL
: Content
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V contenttab/T REG_DWORD/D 0/F> NUL
: Connection
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V connectionstab/T REG_DWORD/D 0/F> NUL
:: Program
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V programstab/T REG_DWORD/D 0/F> NUL
: Advanced
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V advancedtab/T REG_DWORD/D 0/F> NUL
Echo %: % restore Internet property recovery: OK
Goto jinzhijs1

: Jinzhijs1
Gpupdate/force> NUL
Echo ── ─
Echo reminder: the recovery list is not displayed. Press enter to refresh.
@ Set Jinzhi = ""
Goto jzzqzl1

Echo ---------------------------- 2. Disable zone -------------------------------------> NUL
: Prohibited area
@ Title prohibit area-% to %
CLS
Echo ── ─
Echo → disable the limit in the specified region
Echo ----------------------------------------------------------------------
Echo %: % ① my computer-right-click to manage %: % forbidden ::
Echo %: % ② network connection-local connection %: % too many ::
Echo %: % ③ my PC-right-click property % ::
Echo %: % ④ note table % ::
Echo %: % ⑤ Folder Options % ::
Echo %: % 6 taskbar attributes % ::
Echo %: % 7 Right-click % ::
Echo %: % manage Task Manager % ::
Echo %: % Cancel message % ::
Echo %: % locked the computer % ::
Echo %: % login Change Password % ::
Echo %: % login console % ::
Echo %: % ⒀ ie download % ::
Echo %: % running c m d %: % running failed ::
Echo %: % forbidden Internet property %: % forbidden ::
Echo ----------------------------------------------------------------------
Echo. If no changes are displayed, refresh F5.
Echo ----------------------------------------------------------------------

If echo disables your need, enter the corresponding value. For example, enter 14 and press ENTER = disables cmd.
Echo press ENTER = Refresh prohibited list G = List select QQ = QQ space q = quit

: Jzzqzl
@ Set Jinzhi = ""
@ Set/P Jinzhi =
If/I "% Jinzhi %" = "1" Goto ①
If/I "% Jinzhi %" = "2" Goto ②
If/I "% Jinzhi %" = "3" Goto ③
If/I "% Jinzhi %" = "4" Goto ④
If/I "% Jinzhi %" = "5" Goto ⑤
If/I "% Jinzhi %" = "6" Goto 6
If/I "% Jinzhi %" = "7" Goto 7
If/I "% Jinzhi %" = "8" Goto authorization
If/I "% Jinzhi %" = "9" Goto continue
If/I "% Jinzhi %" = "10" Goto continue
If/I "% Jinzhi %" = "11" Goto continue
If/I "% Jinzhi %" = "12" Goto continue
If/I "% Jinzhi %" = "13" Goto continue
If/I "% Jinzhi %" = "14" Goto resume
If/I "% Jinzhi %" = "15" Goto continue
If/I "% Jinzhi %" = "G" Goto list select
If/I "% Jinzhi %" = "QQ" Start iexplore
If/I "% Jinzhi %" = "Q" (Exit)
Goto prohibited area

: ①
Reg add hkcu \ SOFTWARE \ Policies \ Microsoft \ MMC \ {58221c67-ea27-11cf-adcf-00aa00a80033}/V restrict_run/T REG_DWORD/D 1/F> NUL
Echo %: % ① right-click my computer-manage prohibited: OK
Goto jinzhijs
: ②
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Windows \ Network Connections"/V nc_enableadminprohibits/T REG_DWORD/D 1/F> NUL
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Windows \ Network Connections"/V nc_lanproperties/T REG_DWORD/D 1/F> NUL
Echo %: % ② network connection-local connection prohibited: OK
Goto jinzhijs
: ③
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer/V nopropertiesmycomputer/T REG_DWORD/D 1/F> NUL
Echo %: % ③ my computer-right-click property prohibited: OK
Goto jinzhijs
: ④
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System/V disableregistrytools/T REG_DWORD/D 1/F> NUL
Echo %: % ④ prohibited table: OK
Goto jinzhij
: ⑤
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer/V nofolderoptions/T REG_DWORD/D 1/F> NUL
Echo %: % ⑤ folder option prohibited: OK
Goto jinzhijs
: ⑥
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer/V nosettaskbar/T REG_DWORD/D 1/F> NUL
Echo %: % 6 taskbar attribute prohibited: OK
Goto jinzhijs
: 7
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer/V noviewcontextmenu/T REG_DWORD/D 1/F> NUL
Echo %: % 7 Right-click to disable: OK
Goto jinzhijs
: Bytes
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System/V disabletaskmgr/T REG_DWORD/D 1/F> NUL
Echo %: % uninstall Task Manager forbidden: OK
Goto jinzhijs
: Bytes
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer/V nologoff/T REG_DWORD/D 1/F> NUL
Echo %: % cancel Disable: OK
Goto jinzhijs
: Bytes
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System/V disablelockworkstation/T REG_DWORD/D 1/F> NUL
Echo %: % unlock: OK
Goto jinzhijs
: Bytes
Reg add hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System/V disablechangepassword/T REG_DWORD/D 1/F> NUL
Echo %: % Login Password Change prohibited: OK
Goto jinzhijs
: Bytes
Reg add hkcu \ SOFTWARE \ Policies \ Microsoft \ MMC/V restrictauthormode/T REG_DWORD/D 1/F> NUL
Echo %: % forbidden console forbidden: OK
Goto jinzhijs
: Bytes
Reg add hkcu \ SOFTWARE \ Policies \ Microsoft \ MMC/V restrictauthormode/T REG_DWORD/D 3/F> NUL
Echo %: % ⒀ ie download prohibited: OK
Echo Note: Although ie download is disabled, software downloads can also be used, for example, Thunder.
Goto jinzhijs
: Bytes
Reg add hkcu \ SOFTWARE \ Policies \ Microsoft \ WINDOWS \ SYSTEM \/V disablecmd/T REG_DWORD/D 2/F> NUL
Echo %: % ⒁ c m d Forbidden: OK
Goto jinzhijs
: Bytes
: General
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V generaltab/T REG_DWORD/D 1/F> NUL
: Security
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V securitytab/T REG_DWORD/D 1/F> NUL
: Privacy
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V privacytab/T REG_DWORD/D 1/F> NUL
: Content
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V contenttab/T REG_DWORD/D 1/F> NUL
: Connection
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V connectionstab/T REG_DWORD/D 1/F> NUL
: Program
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V programstab/T REG_DWORD/D 1/F> NUL
: Advanced
Reg Add "hkcu \ SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel"/V advancedtab/T REG_DWORD/D 1/F> NUL
Echo %: % forbidden Internet property prohibited: OK
Goto jinzhijs

: Jinzhijs
Gpupdate/force> NUL
Echo ── ─
Echo reminder: you cannot see the forbidden list. You can press enter to refresh it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.