fix_permissions.bat•1.86 kB
@echo off
echo ===================================
echo After Effects MCP Fix Permissions
echo ===================================
echo.
:: Check if running as administrator
net session >nul 2>&1
if %errorLevel% neq 0 (
echo ERROR: This script requires administrator privileges.
echo Please right-click and select "Run as administrator"
echo.
pause
exit /b 1
)
echo Running with administrator privileges...
echo.
:: Create directory if it doesn't exist
echo Checking for C:\ae_temp directory...
if not exist "C:\ae_temp" (
echo Creating C:\ae_temp directory...
mkdir "C:\ae_temp"
if %errorLevel% neq 0 (
echo ERROR: Failed to create directory.
pause
exit /b 1
)
echo Directory created successfully.
) else (
echo Directory already exists.
)
echo.
:: Set permissions
echo Setting permissions on C:\ae_temp...
icacls "C:\ae_temp" /grant Everyone:(OI)(CI)F
if %errorLevel% neq 0 (
echo ERROR: Failed to set permissions.
pause
exit /b 1
)
echo Permissions set successfully.
echo.
:: Create a test file
echo Creating test file...
echo {"test": true, "timestamp": "%TIME%"} > "C:\ae_temp\test_permissions.json"
if %errorLevel% neq 0 (
echo ERROR: Failed to create test file.
pause
exit /b 1
)
echo Test file created successfully at C:\ae_temp\test_permissions.json
echo.
:: Test if file can be read
echo Testing file access...
type "C:\ae_temp\test_permissions.json"
if %errorLevel% neq 0 (
echo ERROR: Failed to read test file.
pause
exit /b 1
)
echo.
echo File access test successful.
echo.
echo ===================================
echo All operations completed successfully!
echo The C:\ae_temp directory is now properly configured.
echo.
echo Please restart your After Effects and the MCP server.
echo ===================================
echo.
pause