Hi there, I wonder if someone could give me a pointer or two on getting rid of Windows 98 profiles using kix32. I basically want to remove all user profiles except for our admin profile so that I can add some new .DEFAULT USER registry settings to lock down some thing that users shouldnt be messing with. I have tried using the move and delete functions but because the user profile is being accessed it wont allow me to rename the profiles or delete it. I also tried what I think may work, which was a script to create a list of the folders and run through them and it was supposed to delete only the ones not listed... Here it is (PROFLIST is a plain text file containing the directories under c:\windows\profiles) OPEN (1,"C:\PROFLIST.TXT",2) $c = ReadLine(1) $x = UCASE($c) WHILE @ERROR = 0 SELECT CASE $x = "ADMINISTRATOR" ? "Admin account found ... not deleting" CASE $x = "ALL USERS" ? "All Users account found ... not deleting" CASE $x = "IESETUP" ? "IE6 account found ... not deleting" CASE $x = "GHOST" ? "Ghost User account found ... not deleting" CASE 1 Open(2,"C:\PROFDEL.TXT",5) WriteLine(2,"Removed the following profiles: " + @CRLF) WriteLine(2,$x + @CRLF) DEL "C:\OPROFILE\" + $x + "\*.*" /h /d DEL "C:\WINDOWS\PROFILES\" + $x + "\*.*" /h /d ENDSELECT $c = ReadLine(1) $x = UCASE($c) LOOP Close (1) Close (2)
This is causing me some brainache due to each machine is going to have different user accounts on so I dont want to add specific deletions for any one of the 500 plus accounts. Any help would be appreciated.
|