Mythwyn
08-29-2004, 01:42 PM
I'm trying to add the function to identify all users on a Windows XP system and then add those variables to a file.delete actions.
[Example Actions]
File.Delete("C:\Documents and Settings\USER1\Local Settings\Temp", true, false, true, nil);
File.Delete("C:\Documents and Settings\USER1\Local Settings\Temporary Internet Files", true, false, true, nil);
File.Delete("C:\Documents and Settings\USER2\Local Settings\Temp", true, false, true, nil);
File.Delete("C:\Documents and Settings\USER2\Local Settings\Temporary Internet Files", true, false, true, nil);
This is a cleanup tool, the problem is the "USER1" and "USER2" are unknown variables on each system. I know how to get the users into a table with this.
USERS = Registry.GetValueNames(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Expl orer\\DocFolderPaths");
How do I insert the user name into each File.Delete action? I've made attempts with various text outputs and String.Concat but keep running into walls no matter which way I work it.
Anyone have an ideal for a way to have [on clink] clean out Temp & Temporary Internet Files for all users on an XP system when the names are an unknown variable?
Much appreciate an insight or script.
Thanks
[Example Actions]
File.Delete("C:\Documents and Settings\USER1\Local Settings\Temp", true, false, true, nil);
File.Delete("C:\Documents and Settings\USER1\Local Settings\Temporary Internet Files", true, false, true, nil);
File.Delete("C:\Documents and Settings\USER2\Local Settings\Temp", true, false, true, nil);
File.Delete("C:\Documents and Settings\USER2\Local Settings\Temporary Internet Files", true, false, true, nil);
This is a cleanup tool, the problem is the "USER1" and "USER2" are unknown variables on each system. I know how to get the users into a table with this.
USERS = Registry.GetValueNames(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Expl orer\\DocFolderPaths");
How do I insert the user name into each File.Delete action? I've made attempts with various text outputs and String.Concat but keep running into walls no matter which way I work it.
Anyone have an ideal for a way to have [on clink] clean out Temp & Temporary Internet Files for all users on an XP system when the names are an unknown variable?
Much appreciate an insight or script.
Thanks