1

I've been trying to find a way to stop a process from starting using a batch file. So far I've had no success.

I know I can use taskkill to kill a process that's already running, but I want to stop it from starting in the first place.

I'd appreciate any help.

7
  • Can you expand on what "stop a process from starting using cmd" means? Commented Feb 16, 2022 at 21:35
  • 2
    If you wanted to stop the process procexp64.exe from launching, you could run: reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\procexp64.exe" /v Debugger /t REG_SZ "null" This will prevent the process from starting. Commented Feb 16, 2022 at 21:45
  • @HelpingHand That is a really good answer. Why not write it as such?
    – LPChip
    Commented Feb 16, 2022 at 21:52
  • @HelpingHand I apologize, what I meant was using a batch file. I was wondering if it's possible to write a batch file that blocks a process from starting, in a similar fashion to Software Restriction Policies.
    – Frdcrls
    Commented Feb 16, 2022 at 22:16
  • @Frdcrls You do realize that the contents of a batch file are commands which get executed in sequence in the windows shell? Commented Feb 16, 2022 at 23:01

0

You must log in to answer this question.

Browse other questions tagged .