timbo343 Posted February 6, 2008 Posted February 6, 2008 (edited) Im in need of a script that will delete folders from C: Now i can do it if the user has got permissions to access the C: but i need a way to run the script as an administrator so the folder will be deleted as users here cannot alter C: It is to delete local profiles of users when they log off. So i know that somewhere in the script needs to be c:\documents and settings\%username% Can someone help? Tim Edited February 6, 2008 by timbo343
GlennT Posted February 6, 2008 Posted February 6, 2008 Can you not run it as a startup script? That would be the easiest way I think.
Guest kerrymoralee9280 Posted February 6, 2008 Posted February 6, 2008 Can this not be done with Active Directory? Failing that, a startup/shutdown script sounds like it will do the biz.
GlennT Posted February 6, 2008 Posted February 6, 2008 Edit: Damn your hide GlennT - one minute too late... Whoops! Sorry!
mac_shinobi Posted February 6, 2008 Posted February 6, 2008 something to either this extent : http://www.edugeek.net/forums/showthread.php?t=395 Or this extent : http://www.wisesoft.co.uk/Scripts/display_script.aspx?id=14
timbo343 Posted February 6, 2008 Author Posted February 6, 2008 With a startup/shutdown script, dont all the computers have to be in that particular group?
GlennT Posted February 6, 2008 Posted February 6, 2008 With a startup/shutdown script, dont all the computers have to be in that particular group? Are they not in the same OU? You could create a Policy linked to that OU and bob's your uncle!
srochford Posted February 7, 2008 Posted February 7, 2008 Are they not in the same OU? You could create a Policy linked to that OU and bob's your uncle! I'd certainly make sure that all "standard" workstations are under a top level OU - eg we have one called "allPCs"; that has sub-ous for each site then further OUs for each room. It means a policy can be attached to allpcs which applies to ... All PCs :-) Alternatively, link it at the domain level and make it check for servers (say) and exclude them (easy if your servers have a standard naming convention otherwise you can use WMI to find the software type and use that to exclude servers)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now