Web Design, Graphic Design, and open source software! I love GIMP, Blender and InkScape (as well as a few others). I hope to make tutorials and show you the ropes so you can make beautiful web pages.
Friday, March 19, 2010
CACLS in a Batch File
I was working with permissions in a directory and remembered the command CACLS to change permissions. I needed this in a script but it ran and prompted the user for a "Y or N". This would not be good since I inteded to run the script on a scheduled task and there would be no one to press Y or N when the script ran. There is not a "/Y" option for CACLS, which would normally automatically answer "Y". Instead you have to run the command like so: " echo y| cacls folder /g everyone:F ". The spacing is important because with a space after the Y it would cause CACLS to fail (CACLS is apperently looking for just "Y" and not "Y+(space)".
Subscribe to:
Post Comments (Atom)
Popular Posts
-
So, you are a hard working nerd and have a windows computer to manage routers with. You also have a lot to do and would rather automate som...
-
WOW, reason 9,746 to move to Linux. My parents have a laptop with Vista on it. Not a big deal, should do normal stuff and not require much...
-
This applies, in my case, to a Virtualbox VM running Backtrack 5r2. I have a network I inherited. It has been a source of pain that few ...
No comments:
Post a Comment