Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Wanted: VBScript to delete folders from C:


Recommended Posts

Posted (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 by timbo343
Guest kerrymoralee9280
Posted
Can this not be done with Active Directory? Failing that, a startup/shutdown script sounds like it will do the biz.
Posted
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!

Posted
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)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...