Windows defender auto update schedule

Page 3 of 4 FirstFirst 1234 LastLast
  1. MaloK's Avatar
    Posts : 1,440
    Windows 7 Pro
       #21

    ok try this instead

    Code:
    @Echo off
    "%ProgramFiles%\Windows Defender\MpCmdRun.exe" –signatureupdate
    pause
    And double-click on it
      My Computers


  2. Posts : 53
    Windows 10 Pro
    Thread Starter
       #22

    CmdTool: Failed with hr = 0x80070667. Check C:\Users\Z800-2\AppData\Local\Temp\MpCmdRun.log for more information
    CmdTool: Invalid command line argument

    Log file:-
    MpCmdRun: Command Line: "C:\Program Files\Windows Defender\MpCmdRun.exe" ûsignatureupdate
    Start Time: ‎Mon ‎Nov ‎29 ‎2021 19:05:49

    MpEnsureProcessMitigationPolicy: hr = 0x1
    MpCmdRun.exe: hr = 0x80070667.
    MpCmdRun: End Time: ‎Mon ‎Nov ‎29 ‎2021 19:05:49

    - - - Updated - - -

    if I run the command from inside a cmd window - this is the log entry:-

    MpCmdRun: Command Line: "C:\Program Files\Windows Defender\MpCmdRun.exe" -signatureupdate
    Start Time: ‎Sun ‎Nov ‎28 ‎2021 17:06:30

    MpEnsureProcessMitigationPolicy: hr = 0x1
    Start: MpSignatureUpdate()
    Calling MpUpdateStartEx with option 0x1
    Update started
    Search Started (MU/WU update) (Path: https://fe2cr.update.microsoft.com/v6/)...
    Search Completed
    Update completed succesfully . no updates needed (hr:0x00000001)
    Finish: MpSignatureUpdate()
    MpCmdRun: End Time: ‎Sun ‎Nov ‎28 ‎2021 17:06:37


    The difference is the "-" in front of the peramater in the log record.
      My Computers

  3. MaloK's Avatar
    Posts : 1,440
    Windows 7 Pro
       #23

    Cheese...

    Where does that " û" before "signatureupdate" comes from ? Looks like a page code problem.

    modify the cmd file to:

    Code:
    @Echo off
    chcp 437
    "%ProgramFiles%\Windows Defender\MpCmdRun.exe" –signatureupdate
    pause
    And double-click on it.

    Normally the console may not show characters correctly, but it will understand them
      My Computers


  4. Posts : 53
    Windows 10 Pro
    Thread Starter
       #24

    Active code page: 437
    CmdTool: Failed with hr = 0x80070667. Check C:\Users\Z800-2\AppData\Local\Temp\MpCmdRun.log for more information
    CmdTool: Invalid command line argument
    Press any key to continue . . .

    Log entry

    MpCmdRun: Command Line: "C:\Program Files\Windows Defender\MpCmdRun.exe" ûsignatureupdate
    Start Time: ‎Mon ‎Nov ‎29 ‎2021 19:50:34

    MpEnsureProcessMitigationPolicy: hr = 0x1
    MpCmdRun.exe: hr = 0x80070667.
    MpCmdRun: End Time: ‎Mon ‎Nov ‎29 ‎2021 19:50:34
      My Computers

  5. MaloK's Avatar
    Posts : 1,440
    Windows 7 Pro
       #25

    Ok.......... Are you saving the files in other format than ANSI or UTF-8 ???

    I'm starting to hope someone will chime in with some idea on whats going on...
      My Computers


  6. Posts : 53
    Windows 10 Pro
    Thread Starter
       #26

    I have run this in power shell to get charact encoding :-
    PS C:\Windows\system32> [System.Text.Encoding]::default

    IsSingleByte : True
    BodyName : iso-8859-1
    EncodingName : Western European (Windows)
    HeaderName : Windows-1252
    WebName : Windows-1252
    WindowsCodePage : 1252
    IsBrowserDisplay : True
    IsBrowserSave : True
    IsMailNewsDisplay : True
    IsMailNewsSave : True
    EncoderFallback : System.Text.InternalEncoderBestFitFallback
    DecoderFallback : System.Text.InternalDecoderBestFitFallback
    IsReadOnly : True
    CodePage : 1252

    - - - Updated - - -



    Found this page:-
    https://docs.microsoft.com/en-us/pow...sserver2019-ps

    So changed the command line to:-
    "C:\Program Files\Windows Defender\MpCmdRun.exe" -Update-MpSignature

    Created a new scheduled task with this and ran it
    Scheduler log says:-

    Task Scheduler successfully completed task "\Defender update" , instance "{8cc47181-d7ed-4728-a885-3002cd5597f3}" , action "C:\Program Files\Windows Defender\MpCmdRun.exe" with return code 2147942402.

    Task Scheduler successfully finished "{8cc47181-d7ed-4728-a885-3002cd5597f3}" instance of the "\Defender update" task for user "Z800-2\Z800-2".

    Can't be sure it has worked as there are no current updates pending, last one was yesterday, so will have to keep checking the last update date.
      My Computers

  7. MaloK's Avatar
    Posts : 1,440
    Windows 7 Pro
       #27

    Ok,

    Let's Register this as a "Windows change"... On what version are you ?

    When I run "C:\Program Files\Windows Defender\MpCmdRun.exe" -Update-MpSignature

    I receive

    Code:
    CmdTool: Failed with hr = 0x80070667. Check C:\Users\jf\AppData\Local\Temp\MpCmdRun.log for more information
    CmdTool: Invalid command line argument
      My Computers


  8. Posts : 53
    Windows 10 Pro
    Thread Starter
       #28

    Settings/System/About:

    This system:
    Edition - Win 10 Pro
    Version - 21H1
    Installed - 10/10/2021
    OS build - 19043.1237
    Experience - 120.2212.3530.0

    Other system:
    Edition - 10 Pro
    Version - 20H2
    Installed - 16/01/2021
    OS build - 19042.804
    Experience - 120.2212.5510

    Both have the same behaviour

    BUT:
    If I run - "C:\Program Files\Windows Defender\MpCmdRun.exe" -Update-MpSignature in DOS it errors
    If I run it in Powershell - it completes

    If I run - "C:\Program Files\Windows Defender\MpCmdRun.exe" –SignatureUpdate in DOS it completes
    If I run it in Powershell it errors
      My Computers


  9. Posts : 482
    Windows 10 Home
       #29

    Snodon said:
    If I run - "C:\Program Files\Windows Defender\MpCmdRun.exe" -Update-MpSignature in DOS it errors
    If I run it in Powershell - it completes
    This is because "Update-MpSignature" is a valid Powershell command, but is not a valid parameter for "MpCmdRun.exe".

    If I run - "C:\Program Files\Windows Defender\MpCmdRun.exe" –SignatureUpdate in DOS it completes
    If I run it in Powershell it errors
    This is because the hyphen in the command is not a true hyphen, it's an en dash. When the line is pasted into a command prompt, it somehow converts to a real hyphen, but when pasted into Powershell, it simply disappears. Also, when pasted into Notepad and saved to the disk as a text file in ANSI, it becomes "û", which makes it useless in a batch or cmd file and probably explains the problems with Task Scheduler as well. Try replacing it with a real hyphen or a forward slash.

    Ben
      My Computer


  10. Posts : 53
    Windows 10 Pro
    Thread Starter
       #30

    Interesting - we are learning new things every day.
    What is your definition of "a real hyphen"
    I have an"object" on my keyboard that puts a short horizontal line at waist level into a string of text. But many programms convert this into a long horizontal line, which is not an "object" on my keyboard.
    Which, if either, of these do you call a real hyphen. I remember in the good old days you could put a code page value into text to create non keyboard characters but it was too long ago to remember.

    Please explain further
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:47.
Find Us




Windows 10 Forums