Scripts Thread, Wanted: VBScript to delete folders from C: in Coding and Web Development; Im in need of a script that will delete folders from C:
Now i can do it if the user ...
-
6th February 2008, 12:53 PM #1 Wanted: VBScript to delete folders from C:
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
Last edited by timbo343; 6th February 2008 at 01:11 PM.
-
-
IDG Tech News
-
6th February 2008, 01:12 PM #2 Can you not run it as a startup script?
That would be the easiest way I think.
-
-
6th February 2008, 01:13 PM #3 Can this not be done with Active Directory? Failing that, a startup/shutdown script sounds like it will do the biz.
-
-
6th February 2008, 01:15 PM #4 
Originally Posted by
jinnantonnix
Edit: Damn your hide GlennT - one minute too late...
Whoops! Sorry!
-
-
6th February 2008, 01:20 PM #5
-
-
6th February 2008, 01:22 PM #6 With a startup/shutdown script, dont all the computers have to be in that particular group?
-
-
6th February 2008, 01:28 PM #7 
Originally Posted by
timbo343
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!
-
-
7th February 2008, 12:50 PM #8 
Originally Posted by
GlennT
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)
-
SHARE:
Similar Threads
-
Replies: 7
Last Post: 23rd September 2011, 03:21 PM
-
Replies: 5
Last Post: 14th January 2008, 12:39 AM
-
By timbo343 in forum Scripts
Replies: 15
Last Post: 19th September 2007, 10:46 PM
-
By StewartKnight in forum Coding
Replies: 5
Last Post: 1st May 2007, 11:04 AM
-
By mac_shinobi in forum Scripts
Replies: 1
Last Post: 14th September 2005, 08:21 AM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules