REM 管理者として実行されているかを判定 for /f "tokens=3 delims=\ " %%A in ('whoami /groups^|find "Mandatory"') do set LEVEL=%%A if not "%LEVEL%"=="High" ( REM Powershellを起動し、以降のコマンドを管理者権限で実行 powershell -NoProfile -ExecutionPolicy Unrestricted -Command "Start-Process \"%~f0\" -Verb runas" exit )
fsutil behavior set disableLastAccess 3 ----
最終アクセス日時更新有効.bat ---- @echo off
REM 管理者として実行されているかを判定 for /f "tokens=3 delims=\ " %%A in ('whoami /groups^|find "Mandatory"') do set LEVEL=%%A if not "%LEVEL%"=="High" ( REM Powershellを起動し、以降のコマンドを管理者権限で実行 powershell -NoProfile -ExecutionPolicy Unrestricted -Command "Start-Process \"%~f0\" -Verb runas" exit )