Function:
1. Prohibit running the specified program
2. Lifting the prohibition of the designation of procedures
3. View all prohibited Programs
Copy Code code as follows:
@echo off
MODE Con cols=40 lines=18
Title prohibits and unlocks the specified program--Chen Bing oo:286569692
: Begin
Setlocal enabledelayedexpansion
Cls
Echo.
Echo. ╭─────────╮
Echo. ╭───┤ Select the following operations ├───╮
Echo. │╰─────────╯│
Echo. ││
Echo. │a. Add a program to be blocked │
Echo. ││
Echo. │b. To remove a program that has been blocked │
Echo. ││
Echo. │c. See all prohibited Programs │
Echo. ││
Echo. │z. Exit Program │
Echo. ││
Echo. ╰─────────────────╯
Echo.
Copy%systemdrive%\windows\jzcx%systemdrive%\windows\jzcx.txt>nul
set/p enter= Please enter your choice:
If not "%enter%" = "" Set enter=%enter:~0,1%
if/i "%enter%" = = "A" goto Jinzhiadd
if/i "%enter%" = = "B" goto Jinzhidel
if/i "%enter%" = = "C" goto Jinzhick
if/i "%enter%" = = "Z" goto exit
Goto BEGIN
: Jinzhiadd
Cls
Echo.
Echo.
Echo. Enter the program to be blocked: press Y to return to the menu
Echo.
set/p input=
if/i "%input%" = = "Y" goto begin
Echo%input%>>%systemdrive%\windows\jzcx.txt
REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution options\%input%"/V debugger/t reg_sz/d debugfile.exe/f
Echo.
Echo. Successfully added a program to be blocked%input%
Echo.
Echo. Any key, return other actions
Copy%systemdrive%\windows\jzcx.txt%systemdrive%\windows\jzcx>nul
Pause>nul
Goto BEGIN
: Jinzhidel
Cls
Echo.
Echo.
Echo.
Echo.
Echo. The procedures for all prohibitions are as follows:
Echo-------------------------------
Echo.
Type%systemdrive%\windows\jzcx.txt
Echo.
Echo-------------------------------
Echo.
Echo. Enter the banned program to remove: Press Y to return to the menu
Echo.
set/p jinzhidel=
if/i "%jinzhidel%" = = "Y" goto begin
reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution options\%jinzhidel%"/F
@for/F "tokens=* delims="%%i in (' findstr/i/v/c:%jinzhidel%%systemdrive%\windows\jzcx.txt ') does (
Set var=%%i
Echo!var!>>temp.txt
)
Copy Temp.txt%systemdrive%\windows\jzcx.txt>nul
Del Temp.txt
Cls
Echo.
Echo.
Echo.
Echo.
Echo. Operation complete
Echo.
Echo.
Echo. Any key, return other actions
Copy%systemdrive%\windows\jzcx.txt%systemdrive%\windows\jzcx>nul
Pause>nul
Goto BEGIN
: Jinzhick
Cls
Echo.
Echo. The procedures for all prohibitions are as follows:
Echo--------------------------------
Echo.
Type%systemdrive%\windows\jzcx.txt
Echo.
Echo--------------------------------
Echo.
Echo. Any key returns other actions
Pause>nul
Goto BEGIN