I am trying to write a script that will delete a specific user's profile directory from a Windows 2K machine. I found this thread (thread329-579946) but I can't figure out what I'm missing in my code to make it work.
I get an error that says I don't have permission. I'm logged in as an administrator.
Thanks!!!
I get an error that says I don't have permission. I'm logged in as an administrator.
Code:
option explicit
Dim fso, path, demofolder
Set fso = CreateObject("Scripting.FileSystemObject")
Path = "c:\Documents and Settings\UserName"
set demofolder = fso.GetFolder(Path)
demofolder.Delete, true
Thanks!!!