Solved

VB script to remove unwanted application data from profiles

Posted on 2008-10-28
3
252 Views
Last Modified: 2012-05-05
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?
0
Comment
Question by:Sam_Bullock
  • 2
3 Comments
 
LVL 65

Expert Comment

by:RobSampson
ID: 22827791
Hi, I'm currently trying to do the same thing, using the Group Policy approach here:
http://support.microsoft.com/kb/814592

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

Regards,

Rob.
0
 

Author Comment

by:Sam_Bullock
ID: 22829401
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
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 250 total points
ID: 22834947
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....

Regards,

Rob.
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

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now