leprince2007
New member
- Local time
- 2:48 PM
- Messages
- 12
I want to create a batch file to grant current user"Leprince2007" full access for all partitions "d-e-f-g-h"
I put this code in ".bat" file.Is this right?
I want to create another patch file to block guest from opening partition "D" and grant him read-only access for other partitions "e-f-g-h"
I put this code in ".bat" file.Is this right?
Questions:
1-Please tell me if there is any mistakes in my codes
2-Will the batch files apply all codes ?
3-How can I run all the codes in the batch file at the same time?because every code takes a lot of time to accomplish the task
I put this code in ".bat" file.Is this right?
Code:
takeown /[COLOR="Red"]f[/COLOR] [COLOR="darkgreen"]D:[/COLOR] /r /d y
takeown /[COLOR="Red"]f[/COLOR] [COLOR="DarkGreen"]E:[/COLOR] /r /d y
takeown /[COLOR="red"]f[/COLOR] [COLOR="darkgreen"]F:[/COLOR] /r /d y
takeown /[COLOR="red"]f[/COLOR] [COLOR="darkgreen"]G:[/COLOR] /r /d y
takeown /[COLOR="red"]f[/COLOR] [COLOR="darkgreen"]H:[/COLOR] /r /d y
I put this code in ".bat" file.Is this right?
Code:
icacls [COLOR="darkgreen"]D:[/COLOR] /grant Guest:[COLOR="Red"]N[/COLOR] /T
icacls [COLOR="darkgreen"]E:[/COLOR] /grant Guest:[COLOR="red"]R[/COLOR] /T
icacls [COLOR="darkgreen"]F:[/COLOR] /grant Guest:[COLOR="red"]R[/COLOR] /T
icacls [COLOR="darkgreen"]G:[/COLOR] /grant Guest:[COLOR="red"]R[/COLOR] /T
icacls [COLOR="darkgreen"]H:[/COLOR] /grant Guest:[COLOR="red"]R[/COLOR] /T
1-Please tell me if there is any mistakes in my codes
2-Will the batch files apply all codes ?
3-How can I run all the codes in the batch file at the same time?because every code takes a lot of time to accomplish the task
Last edited:
My Computer
At a glance
Windows 7 pro x64Intel Core i5-24004 GBIntel HD 2000
- Computer type
- PC/Desktop
- Computer Manufacturer/Model Number
- HP 8200
- OS
- Windows 7 pro x64
- CPU
- Intel Core i5-2400
- Memory
- 4 GB
- Graphics Card(s)
- Intel HD 2000
- Hard Drives
- 1 TB
- Antivirus
- Avira free
- Browser
- Google Chrome
