By modifying the registry, you can prohibit users from using the command interpreter (CMD.exe) and running batch files (BAT files).
Enter the registry key
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\,
create a double-byte value item DisableCMD, and modify its value to 2.
Then both the command interpreter and batch files cannot be run.
If you only want to prohibit the running of the command interpreter but allow the running of batch files, modify the value of DisableCMD to 1.
Both 1 and 2 are prohibitions, so what is 0? Of course, there are no restrictions.
I saw a method to disable the registry by modifying the registry, which works well, but I want to implement it with a batch file. I don't know how to modify it. Please help me, masters. I also want to learn how to modify the registry with a batch file. The more detailed the better. Thank you!
Enter the registry key
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\,
create a double-byte value item DisableCMD, and modify its value to 2.
Then both the command interpreter and batch files cannot be run.
If you only want to prohibit the running of the command interpreter but allow the running of batch files, modify the value of DisableCMD to 1.
Both 1 and 2 are prohibitions, so what is 0? Of course, there are no restrictions.
I saw a method to disable the registry by modifying the registry, which works well, but I want to implement it with a batch file. I don't know how to modify it. Please help me, masters. I also want to learn how to modify the registry with a batch file. The more detailed the better. Thank you!


