
@echo off 
@echo off

set FILE_SITES="%USERPROFILE%\AppData\LocalLow\Sun\Java\Deployment\security\exception.sites"
set FILE_SER="%USERPROFILE%\AppData\LocalLow\Sun\Java\Deployment\deployment.properties"
set FILE_CERT="%USERPROFILE%\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs" 
@echo http://muasamcong.mpi.gov.vn>> %FILE_SITES%
@echo http://muasamcong.mpi.gov.vn:8082>> %FILE_SITES%
@echo http://muasamcong.mpi.gov.vn:8082/*>> %FILE_SITES%
@echo http://muasamcong.mpi.gov.vn:8082/js/uploadfile/FileCatalystApplets.jar >> %FILE_SITES%
@echo http://muasamcong.mpi.gov.vn:8081>> %FILE_SITES%
@echo http://muasamcong.mpi.gov.vn:8081/*>> %FILE_SITES%
@echo http://muasamcong.mpi.gov.vn:8081/js/uploadfile/FileCatalystApplets.jar >> %FILE_SITES%
@echo deployment.security.level=HIGH>> %FILE_SER% 
@echo deployment.security.mixcode=DISABLE>> %FILE_SER% 
@echo deployment.security.validation.ocsp=true>> %FILE_SER% 
@echo deployment.expiration.check.enabled=false>> %FILE_SER% 

@echo f | xcopy /f /y trusted.certs %FILE_CERT%

reg add "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" /V EnableJavaUpdate /T REG_DWORD /D 0 /F

echo Done! 
 