View Single Post
Old 10-30-2003, 01:36 AM   #1 (permalink)
Dilbert1234567
Devils Cabana Boy
 
Dilbert1234567's Avatar
 
Location: Central Coast CA
win 2k scripting

ok i need a command to change the file permissions on a folder

background: i need to lock down my computer so i wrote a script to first remove all shares (even c$, admin$ ipc$...) then it remaps them to random folders on my drive i then want to deny access to these folders to everyone so that they can not be acessed.

here is what i have so far.

md c:\goaway\A$
md c:\goaway\B$
...
md c:\goaway\Z$

REM this makes all the directories to be mapped they go to

net share A$ /delete
net share B$ /delete
...
net share Z$ /delete
net share ADMIN$ /delete
net share IPC$ /delete

REM this removes all the hidden shares

net share A$=c:\goaway\a$
net share B$=c:\goaway\b$
...
net share A$=c:\goaway\a$

REM this remaps all the shares to the folders.




Cacls c:\goaway\a$ /d everyone
Cacls c:\goaway\b$ /d everyone
...
Cacls c:\goaway\c$ /d everyone

REM this changes the permission to deny for the usergroup everyone the only problem is that i have to accept by pressing y and enter to confirm it, i cant have this confirm i need it to run with out confirmation. and help?
__________________
Donate Blood!

"Love is not finding the perfect person, but learning to see an imperfect person perfectly." -Sam Keen
Dilbert1234567 is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46