Solved

How do I set folder permissions with VBScript

Posted on 2009-05-15
1
280 Views
Last Modified: 2012-05-07
I have a vb script that removes a desktop shortcut and a Start Menu folder from each colProfile on a workstation
The Good: The script works perfectly on newer builds of XP

The Bad: On older builds the script runs and removes the desktop shortcut but does not remove the Start Menu folder.
I am thinking that with older builds the permissions allowing the current logged on user to modify the Start Menu.
Is there a solution to reset the permissions to allow the script to run. Maybe a VBScript so i can roll it out to about 150 users. All help will be greatly appreciated
0
Comment
Question by:JK-PBS
1 Comment
 
LVL 7

Accepted Solution

by:
LANm0nk3y earned 500 total points
ID: 24400735
If you have the script already, why not have the script run through GPO?  Just make sure you put the new script on in the same folder as your GPO.

Easiest way to do this is, launching Group Policy Managment:
Go under "Group Policy Object", find the policy you are wanting to apply or create a new one.
Edit the policy

Under the policy editor:
Browse down to "Computer Configuration\Policies\Windows\Settings"
You'll see "Startup", doublclick
click "Add", then "Browse"

Open explorer window, browse to your script file, highlight it.  alt-click and copy.  Go back to your "Browse" window, alt-click, paste.

select the file, then click ok, ok.

This will now launch when the computer starts up.  This runs at the computer level, not at user level.  Therefore it will have admin rights to system resources.

Remember if you created another policy, you need to make sure you link the object to the OU (organization units) container that have the computers.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike scripting languages such as C# where a semi-colon is used to indicate the end of a command, Microsoft's VBScript language relies on line breaks to determine when a command begins and ends. As you can imagine, this quickly results in messy cod…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question