normal Users can WRITE/modify c:\tools
This commit is contained in:
parent
5c82738e1e
commit
ed95c810bb
@ -10,6 +10,9 @@ echo ####### %0 #######
|
||||
echo killing ssh agent ...
|
||||
taskkill /F /IM ssh-agent.exe
|
||||
taskkill /F /IM ssh.exe
|
||||
echo.
|
||||
|
||||
echo killing WinAuth ...
|
||||
taskkill /F /IM WinAuth.exe
|
||||
echo.
|
||||
|
||||
@ -29,6 +32,10 @@ echo cd to %SCRIPTS% ...
|
||||
cd /D %SCRIPTS%
|
||||
echo.
|
||||
|
||||
rem set ALL permissions ...
|
||||
call set-permisssions.cmd
|
||||
echo.
|
||||
|
||||
rem 7-zip is essential for other scripts ...
|
||||
call unpack-7zip.cmd
|
||||
echo.
|
||||
|
@ -253,6 +253,10 @@ echo ### FINALIZING ###
|
||||
echo #####################
|
||||
echo.
|
||||
|
||||
rem set ALL permissions ...
|
||||
call set-permisssions.cmd
|
||||
echo.
|
||||
|
||||
rem enable updates again (doing it as late as possible) ...
|
||||
if %windows_updates% == 1 (
|
||||
call enable-updates.cmd
|
||||
|
@ -1,4 +1,5 @@
|
||||
@echo off
|
||||
|
||||
set %TOOLS%=c:\tools
|
||||
set ARG1=null
|
||||
|
||||
|
24
scripts/set-permissions.cmd
Normal file
24
scripts/set-permissions.cmd
Normal file
@ -0,0 +1,24 @@
|
||||
@echo off
|
||||
|
||||
set T=c:\TEMP
|
||||
set TOOLS=c:\tools
|
||||
|
||||
echo ####### %0 #######
|
||||
|
||||
takeown /F %T% /R /A /D Y 1>nul
|
||||
icacls %T% /inheritance:r
|
||||
icacls %T% /grant Administrators:F /t /c /l 1>nul
|
||||
icacls %T% /grant Users:RX /t /c /l 1>nul
|
||||
|
||||
takeown /F %TOOLS% /R /A /D Y 1>nul
|
||||
icacls %TOOLS% /inheritance:r
|
||||
icacls %TOOLS% /grant Administrators:F /t /c /l 1>nul
|
||||
icacls %TOOLS% /grant Users:RX /t /c /l 1>nul
|
||||
|
||||
takeown /F c:\*.txt /A 1>nul
|
||||
icacls c:\*.txt /inheritance:r
|
||||
icacls c:\*.txt /grant Administrators:F 1>nul
|
||||
icacls c:\*.txt /grant Users:RX 1>nul
|
||||
|
||||
echo ####### %0 #######
|
||||
|
Loading…
Reference in New Issue
Block a user