0

i want to make a batch file to run cmd and using takkill command to stop specific task in windows. i used this code within a file named batch.com to stop explorer:

start "runas /user:administrator" cmd /k "taskkill /im explorer.exe /f"

but when i execute the batch file a black windows appeare and then shows this error message in a dialogue box.

c:\user\jack\desktop\batch.com
The NTVDM CPU has encountered an illegal instruction.
CS:0000 IP:0077 OP:f0 37 05 0e 02 choos 'close' to terminate the application.

it has two button close and Ignore and bothe close the black window without doing anything.

when i tried the command

taskkill /im explorer.exe /f 

directly in cmd it works properly.

MAli Fahimi
  • 195
  • 11

1 Answers1

0

Thanks to @rostok and @Stephan the problem is the extension. File extension should be .bat

MAli Fahimi
  • 195
  • 11