rem certimportone.btm import one %1 root cert in E:\env\rootcerts dir in various JVMs
rem leave the .cer on the cert filename.  Do not prepend E:\env\rootcerts
E:
CD E:\env\rootcerts
set file=E:\env\rootcerts\%1
echo installing certificate %file  into Java

rem pw changeit.
rem alias is just file name with .crt chopped

echo 32 bit JRE
keytool.exe -importcert -trustcacerts -keystore  "%JRE32\lib\security\cacerts"  -storepass %cacertspassword -file "%file" -alias %@NAME[%file]

echo 64 bit JRE
keytool.exe -importcert -trustcacerts -keystore  "%JRE64\lib\security\cacerts"  -storepass %cacertspassword -file "%file" -alias %@NAME[%file]

echo 64-bit JDK
keytool.exe -importcert -trustcacerts -keystore  "%JDK64\jre\lib\security\cacerts"  -storepass %cacertspassword -file "%file" -alias %@NAME[%file]

echo 32-bit IntelliJ
keytool.exe -importcert -trustcacerts -keystore  "F:\Program Files (x86)\JetBrains\%INTELLIJ_DIR%\jre\jre\lib\security\cacerts"  -storepass %cacertspassword -file "%file" -alias %@NAME[%file]

echo 32-bit Jet
keytool.exe -importcert -trustcacerts -keystore  "F:\Program Files (x86)\%jetVersion\bin\lib\security\cacerts"  -storepass %cacertspassword -file "%file" -alias %@NAME[%file]

keytool.exe -importcert -trustcacerts -keystore  "F:\Program Files (x86)\%jetVersion\profile%jetProfile\jre\lib\security\cacerts"  -storepass %cacertspassword -file "%file" -alias %@NAME[%file]

rem This cert still has to be manually imported into IE, Chrome, Firefox and Opera.
Rem -30-