?
Solved

Scripting with icacls

Posted on 2012-08-23
7
Medium Priority
?
1,655 Views
Last Modified: 2012-08-23
Hello!

Hopefully an easy question. I need to create a script that creates a folder in the root of C:\ (lets call it C:\test for right now), but I am having an issue assigning full control to the "Everyone" group. I am not very experienced with icacls, and was hoping for some advice on how to get this to work. The system is Windows 7 x64, and I am running this as administrator.

The command I have been trying to use is:

icacls C:\test /grant Everyone : F

At this point it returns an error saying "Invalid Parameter "Everyone". Any idea on what I am doing wrong?
0
Comment
Question by:berrypetroleum
  • 4
  • 3
7 Comments
 
LVL 59

Expert Comment

by:Bill Prew
ID: 38326424
Do you actually have a space before and after the second colon (as it shows above)? If so, try removing those.

~bp
0
 
LVL 59

Expert Comment

by:Bill Prew
ID: 38326440
Make sure you are running it with Admin privs as well.

~bp
0
 

Author Comment

by:berrypetroleum
ID: 38326445
*facepalm*

That seemed to work, but instead of Full Control, Everyone has Special Permissions.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 59

Accepted Solution

by:
Bill Prew earned 2000 total points
ID: 38326470
Try this:

icacls C:\test /grant Everyone:(OI)(CI)F

Open in new window

~bp
0
 

Author Closing Comment

by:berrypetroleum
ID: 38326490
You are the man!
0
 

Author Comment

by:berrypetroleum
ID: 38326493
Thanks bp! That did it!
0
 
LVL 59

Expert Comment

by:Bill Prew
ID: 38326573
Great, glad that helped, thanks for the feedback.

~bp
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

839 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