@ECHO OFF SET username= SET path= ::: Disables ACL inheritence on the folder the exe file resides but copies all ACLs as inherited before removing icacls %path%\UwAmp\ /inheritancelevel:d /t ::: Changes the permissions for the user to Modify on the Root folder icacls %path%\UwAmp /grant:r %username%:(oi)(ci)M ::: Changes the permissions for the user to Modify on all Sub-Folders icacls %path%\UwAmp\* /grant:r %username%:(oi)(ci)M /t ::: Changes the permissions for the user to Modify on all Files icacls %path%\UwAmp\* /grant:r %username%:M /t ::: Clears any existing permission for the user on all the .exe's and adds the permissions to be able to execute but not delete or rename the exe icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysql_upgrade.exe /remove %username% icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysql_upgrade.exe /grant %username%:(M) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysql_upgrade.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqladmin.exe /remove %username% icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqladmin.exe /grant %username%:(M) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqladmin.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysql.exe /remove %username% icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysql.exe /grant %username%:(M) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysql.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\echo.exe /remove %username% icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\echo.exe /grant %username%:(M) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\echo.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\ApacheMonitor.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\ApacheMonitor.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\ApacheMonitor.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\rotatelogs.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\rotatelogs.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\rotatelogs.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\wintty.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\wintty.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\wintty.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\htpasswd.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\htpasswd.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\htpasswd.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\httxt2dbm.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\httxt2dbm.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\httxt2dbm.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\logresolve.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\logresolve.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\logresolve.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\htcacheclean.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\htcacheclean.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\htcacheclean.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\htdbm.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\htdbm.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\htdbm.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\htdigest.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\htdigest.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\htdigest.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\ab.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\ab.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\ab.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\abs.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\abs.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\abs.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\httpd.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\httpd.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\httpd.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\openssl.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\openssl.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\openssl.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\apache\bin\sqlite3.exe /remove %username% icacls %path%\UwAmp\bin\apache\bin\sqlite3.exe /grant %username%:(M) icacls %path%\UwAmp\bin\apache\bin\sqlite3.exe /deny %username%:(DE) icacls %path%\UwAmp\utils\Tcpview.exe /remove %username% icacls %path%\UwAmp\utils\Tcpview.exe /grant %username%:(M) icacls %path%\UwAmp\utils\Tcpview.exe /deny %username%:(DE) icacls %path%\UwAmp\utils\XDebugClient\xdc.exe /remove %username% icacls %path%\UwAmp\utils\XDebugClient\xdc.exe /grant %username%:(M) icacls %path%\UwAmp\utils\XDebugClient\xdc.exe /deny %username%:(DE) icacls %path%\UwAmp\utils\SQLiteBrowser\SQLiteBrowser.exe /remove %username% icacls %path%\UwAmp\utils\SQLiteBrowser\SQLiteBrowser.exe /grant %username%:(M) icacls %path%\UwAmp\utils\SQLiteBrowser\SQLiteBrowser.exe /deny %username%:(DE) icacls %path%\UwAmp\UwAmp.exe /remove %username% icacls %path%\UwAmp\UwAmp.exe /grant %username%:(M) icacls %path%\UwAmp\UwAmp.exe /deny %username%:(DE) icacls %path%\UwAmp\UwAmpUAC.exe /remove %username% icacls %path%\UwAmp\UwAmpUAC.exe /grant %username%:M icacls %path%\UwAmp\UwAmpUAC.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\php\php-7.0.3\phpdbg.exe /remove %username% icacls %path%\UwAmp\bin\php\php-7.0.3\phpdbg.exe /grant %username%:(M) icacls %path%\UwAmp\bin\php\php-7.0.3\phpdbg.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\php\php-7.0.3\php.exe /remove %username% icacls %path%\UwAmp\bin\php\php-7.0.3\php.exe /grant %username%:(M) icacls %path%\UwAmp\bin\php\php-7.0.3\php.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\php\php-7.0.3\php-win.exe /remove %username% icacls %path%\UwAmp\bin\php\php-7.0.3\php-win.exe /grant %username%:(M) icacls %path%\UwAmp\bin\php\php-7.0.3\php-win.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\php\php-7.0.3\php-cgi.exe /remove %username% icacls %path%\UwAmp\bin\php\php-7.0.3\php-cgi.exe /grant %username%:(M) icacls %path%\UwAmp\bin\php\php-7.0.3\php-cgi.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\php\php-7.0.3\deplister.exe /remove %username% icacls %path%\UwAmp\bin\php\php-7.0.3\deplister.exe /grant %username%:(M) icacls %path%\UwAmp\bin\php\php-7.0.3\deplister.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\php\php-5.6.18\phpdbg.exe /remove %username% icacls %path%\UwAmp\bin\php\php-5.6.18\phpdbg.exe /grant %username%:(M) icacls %path%\UwAmp\bin\php\php-5.6.18\phpdbg.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\php\php-5.6.18\php.exe /remove %username% icacls %path%\UwAmp\bin\php\php-5.6.18\php.exe /grant %username%:(M) icacls %path%\UwAmp\bin\php\php-5.6.18\php.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\php\php-5.6.18\php-win.exe /remove %username% icacls %path%\UwAmp\bin\php\php-5.6.18\php-win.exe /grant %username%:(M) icacls %path%\UwAmp\bin\php\php-5.6.18\php-win.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\php\php-5.6.18\php-cgi.exe /remove %username% icacls %path%\UwAmp\bin\php\php-5.6.18\php-cgi.exe /grant %username%:(M) icacls %path%\UwAmp\bin\php\php-5.6.18\php-cgi.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\php\php-5.6.18\deplister.exe /remove %username% icacls %path%\UwAmp\bin\php\php-5.6.18\deplister.exe /grant %username%:(M) icacls %path%\UwAmp\bin\php\php-5.6.18\deplister.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqld.exe /remove %username% icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqld.exe /grant %username%:(M) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqld.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqlimport.exe /remove %username% icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqlimport.exe /grant %username%:(M) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqlimport.exe /deny %username%:(DE) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqldump.exe /remove %username% icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqldump.exe /grant %username%:(M) icacls %path%\UwAmp\bin\database\mysql-5.7.11\bin\mysqldump.exe /deny %username%:(DE)