Command prompt code not getting executed in Virtual Machine


#1

Hi guys, I use the below mentioned code : taskkill /F /IM iexplore.exe in a .cmd file to close all the open IE tabs. It works fine in my local machine. But I am unable to execute the .cmd file in Virtual machine even though it is given administrative privileges.

Error message:
‘taskkill’ is not recognized as an internal or external command, operable program or batch file.

Help would be appreciated.


#2

Hi Nakul,

I think it might be problem with path you are executing.
Try this:
cd /
cd Windows
cd System32
taskkill.exe /IM explorer.exe /F

Thanks
Girish


#3

To add to @Girish,

You need to indicate the fullpath of the taskkill exe
For example,
c:\windows\system32\taskkill.exe /F /IM iexplore.exe

Additionally, if you want, I bet you could execute that from the Start Process activity instead of creating a .cmd script.
If you chose to do that, it would look like…
image

Thanks.


#4

Thanks for the help, @ClaytonM and @Girish , It works fine in Local machine, have not tried in Virtual machine, once done will update.