CMD Keeps Repeating Command in Batch File and Avast Scanned A Virus in It

Anonymous
2019-03-31T12:13:18+00:00

My CMD keeps repeating my command again and again and again in my batch file, without running the command.

ex: the batch file i wrote was

shutdown /s /f /t 001

and the CMD window would appear like this

And Avast suddenly appeared . . .

I tried running sfc /scannow, but it didn't worked.

Malware or False positive ?

Anyone please help me .

Windows for home | Windows 10 | Security and privacy

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2019-04-02T20:56:40+00:00

    I'm unsure as to what your purpose is in using this shutdown command, but if you're trying to create a quick shutdown method then it is not necessary to do so using a batch file. You can instead create a new shortcut and enter the command as the shortcut's location. Assuming you are using Windows 7 or later, the proper syntax (depending on what it is you want to do) would be as follows:

    shutdown:

    shutdown.exe /s /t 00

    restart:

    shutdown.exe /r /t 00

    hibernate:

    shutdown.exe /h

    Click next, enter the appropriate name of the shortcut type and then click finish. You can of course add to or change the commands as needed.

    Also, the sfc /scannow command is a System File Checker tool which is used to scan for and replace/repair any missing or corrupted system files. It's not necessary to use in this particular case. As the previous poster mentioned, this is definitely a false positive, and in any case if you still choose to run the command via .bat or .exe, you'll most likely need to add the file to the exclusions list in Avast. Just be sure that you are using the proper syntax.

    2 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. DaveM121 817.4K Reputation points Independent Advisor
    2019-03-31T12:19:23+00:00

    Hi B3AN5J

    Definitely a false positive, you should add your bat file to the exclusions in Avast . . .

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2019-04-03T10:06:52+00:00

    Dear DaveM121 and FRX ValaK,

    Thank you for answering my question.

    I hope it'll work and help me in the future similar problems.

    Rgds,

    B3AN5J

    0 comments No comments