snarfsmojo
(Just in Town)
2012-01-17 09:35 PM
Kixtart + Symantec Endpoint Protection 12.1 = SLOW

Anyone else experience issues with Kixtart scripts running on a box with SEP 12.1?

My login script clears out

C:\ProgramData\Microsoft\Windows\Start Menu

using the UDF DeleteFF

 Code:
;**********************************************************************************************
;
;     Function                   : DeleteFF($strPath, $strMethod, Optional $blnForce)
;
;     Description                : UDF for Cleaning Up Folders & Files
;
;     Script Language            : KiXtart
;     Version                    : 4.02 or higher
;
;     Script Dependecy           : Microsoft Windows Scripting Host 5.6
;                                  (see http://msdn.microsoft.com/scripting for download)
;
;     Parameters                 : $strPath = full path name to folder or file.
;                                  $strMethod = File to delete file.
;                                               Folder to delete folder
;                                               Content to delete folder content.
;                                  $blnForce = optional, forces to delete, if read-only, hidden or system.
;
;     Returns                    : 0 if succesful
;
;     Examples                   : DeleteFF("fullpathname\filename", "File", "True")
;                                  DeleteFF("fullpathname\foldername", "Folder", "True")
;                                  DeleteFF("fullpathname", "Content", "False")
;
;     Written by                 : Ryan Groeneveld
;     Date                       : 13-07-2002
;
;**********************************************************************************************

Function DeleteFF($strPath, $strMethod, Optional $blnForce, Optional $logit)
    $strFSO                                        = "Scripting.FileSystemObject"
    If KeyExist("HKCR\" + $strFSO) = 0
        $Tmp = MessageBox("Object " + $strFSO + " is not installed !", "Error", 16)
        Return
    Else
        $objFSO                                    = CreateObject($strFSO)
        If @Error <> 0
            $Tmp = MessageBox("Object " + $strFSO + " can not be created !", "Error", 16)
            Return
        EndIf
    EndIf
    If Len($strPath) > 0
    And Exist($strPath) = 1
	if $logit = "1"
	        Log ("  Deleting " + $strMethod + " " + $strPath,1)
	endif
        Select
            Case $strMethod = "File"
                $Tmp                               = $objFSO.DeleteFile($strPath, $blnForce)
                $DeleteFF                          = @Error
            Case $strMethod = "Folder"
                $Tmp                               = $objFSO.DeleteFolder($strPath, $blnForce)
                $DeleteFF                          = @Error
            Case $strMethod = "Content"
                $strContent                        = Dir($strPath)
                While Len($strContent) > 0
                And @Error = 0
                    If $strContent <> "."
                    And $strContent <> ".."
                        If GetFileAttr($strPath + "\" + $strContent) & 16
                            $Tmp                   = $objFSO.DeleteFolder($strPath + "\" + $strContent, $blnForce)
                        Else
                            $Tmp                   = $objFSO.DeleteFile($strPath + "\" + $strContent, $blnForce)
                        Endif
                        $DeleteFF                  = @Error
                    Endif
                    $strContent                    = Dir()
                Loop
            Case 1
                Return
        EndSelect
    Else
	if $logit = "1"
	        Log ("  " + $strMethod + " " + $strPath + " doesn't exist.",1)
	endif
    Endif
EndFunction


When I uninstall SEP 12.1, the script runs lightning fast (at most 10 seconds)

But when run on a box with SEP 12.1 on it, it's slooooooow. About 3 minutes.

I already opened a ticket with Symantec, but thought someone here might have some thoughts on tricks I could try...

Thanks in advance,

SnarfsMojo