# Code Snippet from aperturescience.su $emetpath = "C:\Program Files\EMET" #test if 64bit if (Test-Path "C:\Program Files (x86)\EMET") { $emetpath = "C:\Program Files (x86)\EMET" } cd $emetpath .\EMET_Conf.exe --delete_all # system security .\emet_conf.exe --system --force DEP=ApplicationOptOut SEHOP=ApplicationOptOut ASLR=ApplicationOptIN # media centre .\emet_conf.exe --set C:\Windows\ehome\ehshell.exe configure-apps "c:\windows\system32" "C:\Program Files" #run for extra 64bit install locations if (Test-Path "C:\Program Files (x86)\EMET") { configure-apps "c:\windows\syswow64" "C:\Program Files (x86)" } # Code Snippet from aperturescience.su