VB script to remove unwanted application data from profiles

We currently have several hundred PC users with roaming profiles. We would like a script to remove any unesseccary application data from the profiles on the PC's so that this data is not copied back to the profile server at logoff.
We currently use a VB login script and we would like to incorporate the data deletion into this script. Unfortunately the person that created this script no longer works for us and we have no VB script knowledge in the team. Can you help?
Who is Participating?
RobSampsonConnect With a Mentor Commented:
Hi, in that case, with a "logoff" script, you could do something like the following, but I'm sure if the Logoff script would fire before the roaming profile replication....


Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
strAppData = objShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\Application Data"
objFSO.DeleteFolder strAppData & "\Unwanted Folder", True

Open in new window

Hi, I'm currently trying to do the same thing, using the Group Policy approach here:

but haven't had much time to test it properly....if you have success with it, let me know.


Sam_BullockAuthor Commented:
Hi Rob - I had seen the group policy change before but this would cause us problems with laptop users as there would be no local profile on the machine. Thanks anyway
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.