Questions tagged [cacls]

Windows command that Displays or modifies discretionary access control lists (DACL) on specified files.

Useful links:

  1. CACLS on technet.
  2. CACLS on SS64 help pages.
41 questions
0
votes
1 answer

Script for locating "Service" locations in Windows

I am trying to write a script in windows command prompt (windows 8), to find out the directory location of services running. For example net start // gives all the running services. I want to know the location of those services Help required!
Muhammad Suleman
  • 727
  • 4
  • 13
  • 24
0
votes
0 answers

cacls only works intermittently

I am using cacls to set permissions on files and folders in a batch file. Cacls c:\program1 /e /g joebloggs:f >>c:\users\desktop\script-log.txt 2>&1 Crazy thing is it works sometimes and not others. The output of the command is redirected to a text…
Confuseis
  • 131
  • 3
  • 13
0
votes
1 answer

How to change permissoin of $Extend directory? Python? C++?

I want to hide a text file by moving it to $Extend directory (What is this directory?). So I run cmd as Administrator and run the below code : C:\Windows\system32>copy I:\ToHide.txt I:\$Extend Access is denied. 0 file(s)…
TheGoodUser
  • 1,188
  • 4
  • 26
  • 52
0
votes
2 answers

icacls Deny Delete for Everyone Not Working

I am trying to deny all users from being able to delete a file. I'd like any user to be able to read or exeucute the file, but not modify or delete it. However, after I use the following code via the command prompt, no one can even access the file…
TechDude
  • 111
  • 1
  • 3
  • 12
0
votes
2 answers

How to exclude sub-directory from cacls processing in batch file

Suppose I have a directory myDir tree with many nested sub-directories. I grant full access to this directory with all its files and nested sub-directories to myUser with command: cacls myDir /T /E /G myUser:F So far, so good. Now I have a…
Michael
  • 41,026
  • 70
  • 193
  • 341
0
votes
1 answer

Setting User Permissions using VBScript English and non-English

There have been many posts where someone needed to know how to change the permissions of a folder or file upon installation using VBScript. The one problem that I have is that none of them have solved it for non-English situations. This is…
CaptainBli
  • 4,121
  • 4
  • 39
  • 58
0
votes
1 answer

Cacls error when assigning user rights

Can anyone tell me why this command fails with: "The filename, directory name, or volume label syntax is incorrect." cacls c:\TestHome\brytest\JBryan42 /t /c /g JBryan42:F While this command succeeds: cacls c:\TestHome\brytest\JBryan42 /t /c /g…
user2021539
  • 949
  • 3
  • 14
  • 31
0
votes
1 answer

looping the CACLS function in batch

I would like to lock a series of file from my staff so they can not delete them i have thus compiled a script wich puts the CACLS function into a loop. however this is not taking effect. could somebody please explain why? FOR /F %%i IN (c:\file.txt)…
LabRat
  • 1,996
  • 11
  • 56
  • 91
0
votes
1 answer

how to hange the user in cacls using java appliacation without type on the syntax

i want to asking to u. i've tried these syntax in my project file, and it works. but, i wan to change these program to be more powerfull. here my syntax: public class Main { public static void main(String[] args) throws InterruptedException,…
-1
votes
3 answers

Use ShellExecute to run icacls with multiple parameters

I am trying to execute icacls from c++. Code below does nothing. I still don't know why it does nothing. I cannot see what icacls return to me because cmd windows automactly closes. HINSTANCE also doesnt provides me much. How i can use icacls with…
user1042321
  • 45
  • 1
  • 9
-1
votes
3 answers

Why doesn't echo yes| work in my script?

Can anyone explain to me why I can write 'ECHO Y|' in the Powershell command line but not if I implement it in a script? These variables are taken from a .csv file. When I used the command line I did not use the variables. ECHO Y|cacls…
Rezic
  • 99
  • 1
  • 6
  • 12
1 2
3