I am trying to delete the local profiles on my computer. However, whenever I
try to delete a users profiles under C:\Users\* on my Vista machine, my
script fails. It seems to be that it can't some of the special folders in
C:\Users\*\AppData. For example, my script always fails on
C:\Users\*\AppData\Local\Application Data. This appears to be a redirector
but my script sees it as a folder and tries to delete it. I have spent many
hours trying to get around this but every time my script fails with an Access
Denied error. I have used WMI and the FileSystemObject. Any help with this
problem would be greatly appreciated.

Thanks

RE: Delete Local Profiles for WinPe by CompGuy

CompGuy
Mon Mar 17 18:01:12 CDT 2008

I just used RMDIR instead. Can't believe I didn't think of that in the first
place.

"CompGuy" wrote:

> I am trying to delete the local profiles on my computer. However, whenever I
> try to delete a users profiles under C:\Users\* on my Vista machine, my
> script fails. It seems to be that it can't some of the special folders in
> C:\Users\*\AppData. For example, my script always fails on
> C:\Users\*\AppData\Local\Application Data. This appears to be a redirector
> but my script sees it as a folder and tries to delete it. I have spent many
> hours trying to get around this but every time my script fails with an Access
> Denied error. I have used WMI and the FileSystemObject. Any help with this
> problem would be greatly appreciated.
>
> Thanks

RE: Delete Local Profiles for WinPe by CompGuy

CompGuy
Mon Mar 17 18:03:00 CDT 2008

I used RMDIR instead.

"CompGuy" wrote:

> I am trying to delete the local profiles on my computer. However, whenever I
> try to delete a users profiles under C:\Users\* on my Vista machine, my
> script fails. It seems to be that it can't some of the special folders in
> C:\Users\*\AppData. For example, my script always fails on
> C:\Users\*\AppData\Local\Application Data. This appears to be a redirector
> but my script sees it as a folder and tries to delete it. I have spent many
> hours trying to get around this but every time my script fails with an Access
> Denied error. I have used WMI and the FileSystemObject. Any help with this
> problem would be greatly appreciated.
>
> Thanks