Need Windows Defender to be up to date with making ISO file

Apache

Member
Hello,
Is there a way to get windows defender antivirus defections put into the custom ISO file using NTLite so that windows defender is up to date.

Thanks

Matthew
 
I have tested in only on Windows 7 and it can be done and maybe it can work for all Windows version. Which Windows version do you use?

Latest defender definitions can be downloaded here.

This is how I'm updating Windows Defender using CMD. %IMAGE% is path where is mounted image
Code:
if exist "%IMAGE%\ProgramData\Microsoft\Windows Defender" (

    echo         KB915597 - Windows Defender Definition

    if exist "%IMAGE%\ProgramData\Microsoft\Windows Defender" (
        if exist "%IMAGE%\ProgramData\Microsoft\Windows Defender\Definition Updates" (
            takeown /F "%IMAGE%\ProgramData\Microsoft\Windows Defender\Definition Updates" /A >nul 2>nul
            icacls "%IMAGE%\ProgramData\Microsoft\Windows Defender\Definition Updates" /grant Administrators:F >nul 2>nul
            rd /q /s "%IMAGE%\ProgramData\Microsoft\Windows Defender\Definition Updates" >nul 2>nul
        )
    )
    
    md "%IMAGE%\ProgramData\Microsoft\Windows Defender\Definition Updates"
    md "%IMAGE%\ProgramData\Microsoft\Windows Defender\Definition Updates\Updates"
    md "%IMAGE%\ProgramData\Microsoft\Windows Defender\Definition Updates\Backup"
    
    "%~dp0apps\7z\%PROCESSOR_ARCHITECTURE%\7z.exe" x "%~dp0updates\mpas-fe-%ARCH%.exe" -o"%IMAGE%\ProgramData\Microsoft\Windows Defender\Definition Updates\Updates" >nul

    if exist "%IMAGE%\Windows\System32\MpSigStub.exe" (
        takeown /F "%IMAGE%\Windows\System32\MpSigStub.exe" /A >nul 2>nul
        icacls "%IMAGE%\Windows\System32\MpSigStub.exe" /grant Administrators:F >nul 2>nul
        del /q /s "%IMAGE%\Windows\System32\MpSigStub.exe" >nul
    )

    move /y "%IMAGE%\ProgramData\Microsoft\Windows Defender\Definition Updates\Updates\MpSigStub.exe" "%IMAGE%\Windows\System32\MpSigStub.exe" >nul

    icacls "%IMAGE%\Windows\System32\MpSigStub.exe" /setowner "NT SERVICE\TrustedInstaller" >nul
    icacls "%IMAGE%\Windows\System32\MpSigStub.exe" /grant:r Administrators:RX >nul

    icacls "%IMAGE%\ProgramData\Microsoft\Windows Defender\Definition Updates" /setowner "NT SERVICE\TrustedInstaller" >nul
    icacls "%IMAGE%\ProgramData\Microsoft\Windows Defender\Definition Updates" /grant:r Administrators:RX >nul
    
    attrib +h "%IMAGE%\ProgramData" >nul
)
 
Back
Top