0 Replies Latest reply on Oct 15, 2014 5:30 PM by Landon Winburn

    Deleting old profiles from c:\appsensevirtual

    Landon Winburn ITSMMVPGroup
      Customer wanted offline mode enabled but wanted a way of purging old stale profiles from shared machines. This script will purge any profile from c:\appsensevirual that is over 30 days old. Just call it at shutdown or startup.

      Set Fso = CreateObject("Scripting.FileSystemObject")
      Set Fol = Fso.GetFolder("c:\appsensevirtual")
      For Each SubFol in Fol.SubFolders
        Set F = Fso.GetFile(SubFol.Path & "\profileconfig.xml")
        If DateDiff("d", F.DateLastModified, Now) > 30 Then
        End If