<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
	<channel>
		<title>Delete Profiles Script v1.9</title>
		<description>Delete Profiles Script v1.9</description>
		<link>http://www.theshonkproject.com</link>
		<lastBuildDate>Wed, 08 Sep 2010 20:04:42 +0100</lastBuildDate>
		<generator>FeedCreator 1.7.2</generator>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc54</link>
			<description>awesome, wildcard support  :cheer:</description>
			<author>fredrik</author>
			<pubDate>Fri, 29 Aug 2008 11:10:44 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc55</link>
			<description>Thank you Joe! It\'s everything I need.
I\'ll be testing it over the next few weeks.</description>
			<author>David</author>
			<pubDate>Wed, 03 Sep 2008 22:32:13 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc59</link>
			<description>Good to see the profiles excluded by the first round of testing are then excluded in the orphan check.  It took a little while to get into the flow of the code and find where I need to make the neccessary changes.  I already completed a modification to 1.8 to do a SID check against the domain to look for deleted accounts.   I will send it to you so you can incorrporate it into your next version</description>
			<author>Randall</author>
			<pubDate>Fri, 19 Sep 2008 00:46:07 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc61</link>
			<description>Excellent script.  I\'ve got a question though.

On our terminal servers there is a key ( plus subtree ) in registry

\\HLM\\Software\\Windows NT\\Current Version\\winlogon\\

that is delete by delprof.exe and the system tool that is not deleted
by your script.   Any thoughts as to whether this too should be deleted?</description>
			<author>Stephen</author>
			<pubDate>Sun, 28 Sep 2008 19:04:30 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc62</link>
			<description>Oops, the SID disappeared from that key.  It should have been

HLM\\Software\\WindowsNT\\Current Version\\winlogon\\SID</description>
			<author>Stephen</author>
			<pubDate>Sun, 28 Sep 2008 19:09:41 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc78</link>
			<description>Has anyone run this script on Vista?  I am having some problems getting it to work properly.  It will delete the registry data, but everything is left in the registry.  If anyone has any ideas, I would greatly appreciate them.
Thanks</description>
			<author>Wood</author>
			<pubDate>Fri, 24 Oct 2008 13:29:08 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc114</link>
			<description>Try to run the vbscript as an administrator in vista, unless you are logged in already as a vista administrator.</description>
			<author>Pat</author>
			<pubDate>Wed, 10 Dec 2008 08:07:53 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc115</link>
			<description>Have you gotten the script to run properly in Vista?  I am running it from the admin account.  I have even run the script as administrator from an admin account.  I do think it is a permissions issue as the script thinks that it has deleted the orphaned directories, but they are still present.</description>
			<author>Wood</author>
			<pubDate>Wed, 10 Dec 2008 10:15:30 +0100</pubDate>
		</item>
		<item>
			<title>Thanks</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc159</link>
			<description>great script - thanks very much!</description>
			<author>Nik</author>
			<pubDate>Thu, 18 Dec 2008 07:55:20 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc165</link>
			<description>I had the same problems at Vista as well.
The logs did mention that the profiles being deleted, but none of the personal folder nor registry being deleted.</description>
			<author>Eric</author>
			<pubDate>Sun, 21 Dec 2008 21:12:58 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc172</link>
			<description>Firstly, excellent scripting!

But...

It needs an extra piece of code to provision the exclusion of the ASPNET profile which is in a slightly different format.

ie. %SystemDrive%\\Documents and Settings\\\\ASPNET

As the script stands, it looks like (by using read-only mode to test) that it will exclude the profile initially (based on the username being in the exclusion list), but flags the folder as an orphan because  doesn\'t match srtUserName (ASPNET)</description>
			<author>Allan Trudgeon</author>
			<pubDate>Tue, 06 Jan 2009 17:00:04 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc173</link>
			<description>Sorry used greater than and less than symbols in my last post...

Firstly, excellent scripting!

But...

It needs an extra piece of code to
provision the exclusion of the ASPNET profile which is in a slightly different
format.

ie. %SystemDrive%\\Documents and Settings\\\&quot;ServerName\&quot;\\ASPNET

As the
script stands, it looks like (by using read-only mode to test) that it will
exclude the profile initially (based on the username being in the exclusion
list), but flags the folder as an orphan because \&quot;ServerName\&quot; doesn\'t match srtUserName
(ASPNET)</description>
			<author>Allan Trudgeon</author>
			<pubDate>Tue, 06 Jan 2009 17:02:09 +0100</pubDate>
		</item>
		<item>
			<title>ASPNET</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc177</link>
			<description>Allan,

Thanks for the feedback!  One way to accomplish what you\'re asking is to use the /E switch to exclude the Profilename/Directory combination.

For Example:

cscript.exe //nologo deleteprofiles.vbs /E %COMPUTERNAME%,ASPNET

You can also use this trick to exclude other Directories in Doc and Settings that otherwise would be flagged as orphaned.  I know a lot of places make a copy of the Default User folder before making modifications to it.  Since the Copy does not have registry value associated with it, it is consider orphaned and deleted.  The exclusion list can specify the folder name instead of the username.

Joe</description>
			<author>Joe</author>
			<pubDate>Wed, 07 Jan 2009 13:48:00 +0100</pubDate>
		</item>
		<item>
			<title>Thanks</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc213</link>
			<description>Great Script!!

to quote \'the Cars\' it was \'Just what I needed\'

greetings from Holland.</description>
			<author>Jochem</author>
			<pubDate>Thu, 05 Feb 2009 07:29:36 +0100</pubDate>
		</item>
		<item>
			<title>Citrix questions</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc220</link>
			<description>Hello Joe,

I guess we have a similar quandry here.  We have roaming profiles on multiple Citrix servers (I am new here, don\'t know why they did it exactly) as well as the profiles are mapped to DFS shares which are mirrored.

At any rate, applications fail if the profile gets corrupt.  Right now we have to log on to each Citrix server that has the roaming profile (we have a VB script to show which servers have the profile and which don\'t) and manually delete them via the Properties of the Computer -&gt; Advanced -&gt; User profiles Settings button -&gt; select -&gt; Delete button.

My questions are as such:  Does your script perform the exact same function as the Windows user profile delete button and two: can your script be easily used to remotely touch a list of servers to perform the same functions on one profile.

It\'s a bit of a toughy but we\'re hitting a wall here.</description>
			<author>Sandy</author>
			<pubDate>Fri, 06 Feb 2009 16:29:10 +0100</pubDate>
		</item>
		<item>
			<title>thank you</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc228</link>
			<description>this is a great job here!

I just have a problem with hidden folder \&quot;Default\&quot; which I must keep, but it\'s always deleted even with option \&quot;/E Default\&quot;.

am I doing something wrong?  :0 

thanks again</description>
			<author>Alex</author>
			<pubDate>Fri, 13 Feb 2009 01:28:30 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc229</link>
			<description>It did not work properly for me either.  I ran it will admin privileges and the logs indicated the profiles were deleted, but they were not deleted.</description>
			<author>Jarud</author>
			<pubDate>Fri, 13 Feb 2009 07:43:08 +0100</pubDate>
		</item>
		<item>
			<title>Default User</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc230</link>
			<description>The exclusion line in the script above is really long (I\'ll split in the next version) so the website word wraps and breaks the line where the space is in default user.   Make that this line:

strProfileExclusionList = \&quot;|administrator|all users|default user|localservice|networkservice|public|ctx_smauser|ctx_cpuuser|ctx_cpsvcuser|ctx_streamingsvc|ctx_configmgr|\&quot;

is really one line and that there is a space between default and user.   It should look something like
|default user|

To exclude using the /E switch the syntax would be /E \&quot;default user\&quot;

Joe</description>
			<author>Joe Shonk</author>
			<pubDate>Fri, 13 Feb 2009 08:46:54 +0100</pubDate>
		</item>
		<item>
			<title>Citrix Questions</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc233</link>
			<description>Hello Sandy,

To answer your questions:

Yes, the script performs the same function as if you were to delete the profile by using the GUI

Second, you can run the script remotely using PSEXEC.EXE as sysinternals tool that is now owned by Microsoft.  You could write a simple CMD script that loops through a list of server names and runs PSEXEC.EXE w/ the DeleteProfiles.vbs script.  You can also use the /I to limit the profile deletion to a single object.

Joe</description>
			<author>Joe Shonk</author>
			<pubDate>Tue, 17 Feb 2009 10:24:34 +0100</pubDate>
		</item>
		<item>
			<title>I have a question</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc235</link>
			<description>Does this script take the local users out of the manage area? Also, I dont want it to take domain profiles, it wont do that will it?</description>
			<author>Stephen</author>
			<pubDate>Wed, 18 Feb 2009 14:30:51 +0100</pubDate>
		</item>
		<item>
			<title>Default User again</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc293</link>
			<description>hello Joe,

thanks for the reply.

I\'ve checked and the strProfileExclusionList line is 1 piece with no space.
But the hidden folder \&quot;Default\&quot; is always deleted :huh:, Public is not, for instance.

I\'m on vista business

what else could I check?</description>
			<author>Alex</author>
			<pubDate>Mon, 23 Feb 2009 01:20:25 +0100</pubDate>
		</item>
		<item>
			<title>Default User</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc294</link>
			<description>I think I\'ve got it now that I have Vista machine up and run.

In the strProfileExclusionList = line append the follow to the end

\&quot;|default user|default|\&quot;

There needs to be a space between the default and user,  there needs to be a pipe delimiter | before and after, and the entries need to be all lowercase.

Joe</description>
			<author>Joe</author>
			<pubDate>Mon, 23 Feb 2009 08:03:33 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc295</link>
			<description>it seems to be working with |default user|default| at the end !
I already tried but with first letter in uppercase and didn\'t work.

thanks again  :lol:</description>
			<author>Alex</author>
			<pubDate>Tue, 24 Feb 2009 01:38:05 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc343</link>
			<description>I\'ve been trying to get this working in Vista as well.

It appears to run, and the registry appears to get deleted but not the local files.  Am I missing anything simple?

I\'ve added the tweaks above and am running this as a domain administrator (tried both running directly on the machine and via a startup script).

Thanks,
John</description>
			<author>John</author>
			<pubDate>Mon, 13 Apr 2009 21:52:13 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc363</link>
			<description>Excellent !  :woohoo: 

Saved me lots of time reinventing the wheel !  ;) 
BTW, I found a Typo in the code:  :evil: 

Line 59: flgLogFile = Flase should be flgLogFile = False

Some Advise  :idea: : 
 Turn on the Option Explicit
 Comment the \&quot;On Error Resume Next\&quot; line and debug the the code through all the lines.
 You will then catch many Errors that one will miss.</description>
			<pubDate>Thu, 30 Apr 2009 01:15:09 +0100</pubDate>
		</item>
		<item>
			<title>Thanks</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc364</link>
			<description>Good eye!  I went ahead and update the block of code.

Joe</description>
			<author>Joe Shonk</author>
			<pubDate>Thu, 30 Apr 2009 07:57:32 +0100</pubDate>
		</item>
		<item>
			<title>network administrator</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc367</link>
			<description>Is anyone else having troubles getting this to remove the folders in C:\\Users?  I was able to get them removed by a combination of this script and some .net code (using system.io.directoryinfo):

Dim di As New System.IO.DirectoryInfo(args(0))
di.Delete(True)

...but don\'t like the idea of needing multiple scripts/applications for this simple task.  If I\'m not missing something and there is no easier way I may reverse engineer this script into a .net application that can be called from a startup script.

Any information is greatly appreciated.  Thanks.</description>
			<author>Anonymous</author>
			<pubDate>Wed, 13 May 2009 12:01:44 +0100</pubDate>
		</item>
		<item>
			<title>Fails to run</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc408</link>
			<description>The script fails to run on two out of four of my Citrix Servers, with no errors. Any ideas.</description>
			<author>Kurt</author>
			<pubDate>Wed, 24 Jun 2009 10:58:47 +0100</pubDate>
		</item>
		<item>
			<title>Error when running script</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc430</link>
			<description>Did I miss a step?

I\'m typing the following:

C:\\&gt;cscript deleteprofiles.vbs /E kkg

I get the following error:

deleteprofiles.vbs(1, 1) Microsoft VBScript compilation error: Invalid character</description>
			<author>KGodoy</author>
			<pubDate>Thu, 09 Jul 2009 11:11:14 +0100</pubDate>
		</item>
		<item>
			<title>I found it</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc431</link>
			<description>Apperantly if I copy and paste the code into notepad, it inserts text that doesn\'t show up on notepad. Even if I use Notepad++ and tell it to save it as ANSI, it still adds the extra characters. I was able to open it in EDIT from the command prompt and the culprit characters showed up, I saved it and now I\'m running it on a test computer filled with old profiles. No errors after 5 mintues, so I\'m assuming it\'s good. Thanks for the script!!!</description>
			<author>KGodoy</author>
			<pubDate>Thu, 09 Jul 2009 11:31:55 +0100</pubDate>
		</item>
		<item>
			<title>Network Manager</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc440</link>
			<description>Great script!  Thanks for sharing.

It seems that some profiles are not deleted by the script.  When I go back and manually delete the folders, The warming pops up saying the folder \'contains items whose name is too long for the recycle bin\&quot;.

Anyone else get that?</description>
			<author>Mike</author>
			<pubDate>Fri, 24 Jul 2009 05:57:56 +0100</pubDate>
		</item>
		<item>
			<title>Can\'t get folders removed from users either</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc455</link>
			<description>Thanks for this great script.

As others have mentioned, I\'m also not getting the folders inside the users folder to delete with vista. Is there any update to this issue? What am I missing? Any suggestions?

Thanks.</description>
			<author>Roy</author>
			<pubDate>Tue, 11 Aug 2009 05:37:00 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc467</link>
			<description>Is anyone running this on server 2008 yet?</description>
			<author>MBlinde</author>
			<pubDate>Tue, 25 Aug 2009 07:49:07 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc487</link>
			<description>here is the cmd file I am trying to run, it reports every profile on exlcusion list.

cscript.exe E:\\Temp\\DeleteProfiles.vbs /R /C /L C:\\WINDOWS\\system32\\LogFiles\\deleteprofiles.log /D 30 /E 

\&quot;|administrator|all users|all users.bak|ctx_cpsvcuser|ctx_smauser|ctx_streamingsvc|default 

user|packager|localservice|networkservice|svc_ctxpbm|citrixadmin|raadmin|mastercyl|reboot|nettime|uh3hkai|

is78301|ds064|\&quot;</description>
			<author>John</author>
			<pubDate>Fri, 11 Sep 2009 10:45:10 +0100</pubDate>
		</item>
		<item>
			<title>When there is no such profile</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc578</link>
			<description>Hi Joe,

First, compliments for an effective script. Now a question... How can I get a notification that the script has failed when using the /I option and typing a profile name which is not actually on the machine (for instance when I\'ve made a typo). The current output log is a bit to much for when you are using the script on multiple machines with quite a big number of profiles to remove.

Thanks!

DiLupo</description>
			<author>DiLupo</author>
			<pubDate>Mon, 30 Nov 2009 05:29:49 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc582</link>
			<description>I\'ve been trying to get this working in Windows 7 as well.

It appears to run, and
the registry appears to get deleted, but not the local profile folders. Am I missing
anything simple?


Thanks,
Richard</description>
			<author>Richard Meza</author>
			<pubDate>Thu, 03 Dec 2009 16:04:16 +0100</pubDate>
		</item>
		<item>
			<title>System Analyst</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc584</link>
			<description>Has anyone responded to your solution regarding deleteprofile NOT deleting c:\\User\\ folders for Windows 7?

Regards.

-R</description>
			<author>Richard Meza</author>
			<pubDate>Fri, 04 Dec 2009 11:24:10 +0100</pubDate>
		</item>
		<item>
			<title></title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc624</link>
			<description>[b]THANK YOU![/b]

Great script. Thank you so much for your work. This is very helpful to keep our computers clean. With the exclusion list (with wildcard supports) this script runs perfectly in our environment. Why can\'t Microsoft implement such things originally? Keep it up! Best regards.</description>
			<author>Bobby McCracken</author>
			<pubDate>Thu, 28 Jan 2010 06:55:00 +0100</pubDate>
		</item>
		<item>
			<title>Script not found</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc638</link>
			<description>The script looks amazing, and definitely has some major ability to fix some of our problems over here.  However I\'m unable to get altiris 6.9 to see the script.  The script is placed both in a network drive and on Altiris\' desktop for my account and the admin\'s account.  I have domain admin rights, so it\'s not a rights/permissions issue.  The error Altiris throws an error saying that the script at both locations, below, are not found.  It doesn\'t matter if I run it with switches or not.

cscript.exe C:\\Users\\\\Desktop\\DeleteProfiles.vbs /E  /I *.* /L C:\\ProfileLog.log /R /V
cscript.exe \\\\\\tech-share\\New Software\\Scripts\\Delete Profiles\\DeleteProfiles.vbs</description>
			<author>Ben</author>
			<pubDate>Mon, 01 Mar 2010 06:52:33 +0100</pubDate>
		</item>
		<item>
			<title>Script</title>
			<link>http://www.theshonkproject.com/index.php?option=com_content&amp;task=view&amp;id=50#josc639</link>
			<description>Hello,
It\'s not about the rights that you have to run the script but more of which right the Altiris service account has to run the script.  Make sure that account has access to the network share and to the local machine.

Joe</description>
			<author>Joe</author>
			<pubDate>Mon, 01 Mar 2010 07:58:51 +0100</pubDate>
		</item>
	</channel>
</rss>
