permissions bugfix

This commit is contained in:
Michael H.G. Schmidt 2023-02-17 11:55:36 +01:00
parent 7c33429d45
commit 059201e9cf

View File

@ -8,16 +8,25 @@ set SCRIPTS=%TOOLS%\scripts
echo ####### %0 #######
echo killing ssh agent ...
taskkill /F /IM ssh-agent.exe
taskkill /F /IM ssh.exe
taskkill /F /IM ssh-agent.exe 2>nul
taskkill /F /IM ssh.exe 2>nul
echo.
echo killing WinAuth ...
taskkill /F /IM WinAuth.exe
taskkill /F /IM WinAuth.exe 2>nul
echo.
echo installing permissions script ...
copy /Y tools\scripts\set-permissions.cmd %SystemDrive%
takeown /F %SystemDrive%\set-permissions.cmd /A
icacls %SystemDrive%\set-permissions.cmd /inheritance:r
icacls %SystemDrive%\set-permissions.cmd /grant Administrators:F
icacls %SystemDrive%\set-permissions.cmd /grant Users:RX
echo.
echo deleting %TOOLS% ...
rd /S /Q %TOOLS%
takeown /F %TOOLS% /R /D Y 1>nul
rd /S /Q %TOOLS% 2>nul
echo.
echo copying folder %TOOLS% ...
@ -51,21 +60,18 @@ echo.
call install-git.cmd
echo.
move /Y %SCRIPTS%\set-permissions.cmd C:\
takeown /F %SystemDrive%\set-permissions.cmd /A
icacls %SystemDrive%\set-permissions.cmd /inheritance:r
icacls %SystemDrive%\set-permissions.cmd /grant Administrators:F
icacls %SystemDrive%\set-permissions.cmd /grant Users:RX
rem remove duplicate permissions script ...
del /F /Q set-permissions.cmd
rem set ALL permissions ...
call %SystemDrive%\set-permissions.cmd
echo.
echo ####### %0 #######
echo READY.
cd /D %SystemDrive%\
call set-permissions.cmd
echo.
echo cd to %T% ...
cd /D %T%
echo.
echo ####### %0 #######
echo READY.
echo.