Solved

VB script to remove unwanted application data from profiles

Posted on 2008-10-28
3
258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

719 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