if "%1"=="fix" (
	GOTO :fix
) else (
	GOTO :detect
)

GOTO :eof

:detect
icacls "C:\Program Files (x86)\POS Agent"
icacls "C:\ProgramData\POS Agent"
icacls "C:\Windows\Temp"

echo>%2:Zone.Identifier
%2 -dl list
GOTO :eof

:fix
icacls "C:\Program Files (x86)\POS Agent" /grant %3:(OI)(CI)(F) /T
icacls "C:\ProgramData\POS Agent" /grant %3:(OI)(CI)(F) /T
icacls "C:\Windows\Temp" /grant %3:(OI)(CI)(F) /T

echo>%2:Zone.Identifier
%2 -dl set %3 permit level:ll,la
GOTO :eof
