Cleanup for "policy.client.invoker.exe" (batch file)

Version 3

    Verified Product Versions

    Endpoint Manager 9.5Endpoint Manager 9.6

    This is a batch file to help correct an issue where the "policy.client.invoker.exe" causes excessive CPU and/or Memory use.  This batch file will work for both WinXP and Win7, 32bit or 64bit.

     

    Copy the text below and save as a batch file (ex: Cleanup.bat)

     

    @echo off
    ECHO This script will delete the clients landesk database, recreate it, validate it and clean up
    ECHO old xml files. Any xml files that are still required will repopulate as needed
    ECHO this is also good at fixing portal and other policy issues
    ECHO.
    ECHO.
    
    if "%PROCESSOR_ARCHITECTURE%"=="x86" goto 32bit
    if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto 64bit
    EXIT /B 0
    
    :32bit
    ECHO 32bit Detected
    ECHO.
    ECHO.
    net stop "Landesk Policy Invoker"
    
    del "%ALLUSERSPROFILE%\application data\LANDesk\ManagementSuite\database" /q
    del "%ALLUSERSPROFILE%\Application Data\LANDesk\ManagementSuite\landesk\files" /q
    del "%ALLUSERSPROFILE%\Application Data\vulScan\*.xml" /q
    del "%PROGRAMFILES%\LANDesk\LDClient\sdmcache\landesk\files\*.xml" /q
    
    "%PROGRAMFILES%\LANDesk\LDClient\clientdbutil.exe" /create
    "%PROGRAMFILES%\LANDesk\LDClient\clientdbutil.exe" /validate
    net start "Landesk Policy Invoker"
    "%PROGRAMFILES%\LANDesk\LDClient\policy.sync.exe"
    "%PROGRAMFILES%\LANDesk\LDClient\policy.client.invoker.exe"
    EXIT /B 0
    
    :64bit
    ECHO 64bit Detected
    ECHO.
    ECHO.
    net stop "Landesk Policy Invoker"
    
    del "%ALLUSERSPROFILE%\LANDesk\ManagementSuite\database" /q
    del "%ALLUSERSPROFILE%\LANDesk\ManagementSuite\landesk\files" /q
    del "%ALLUSERSPROFILE%\vulScan\*.xml" /q
    del "%PROGRAMFILES(x86)%\LANDesk\LDClient\sdmcache\landesk\files\*.xml" /q
    
    "%PROGRAMFILES(x86)%\LANDesk\LDClient\clientdbutil.exe" /create
    "%PROGRAMFILES(x86)%\LANDesk\LDClient\clientdbutil.exe" /validate
    net start "Landesk Policy Invoker"
    "%PROGRAMFILES(x86)%\LANDesk\LDClient\policy.sync.exe"
    "%PROGRAMFILES(x86)%\LANDesk\LDClient\policy.client.invoker.exe"
    EXIT /B 0