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!
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…
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)…
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…
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…
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…
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…
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)…
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,…
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…
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…