dencorso Posted March 17, 2017 Posted March 17, 2017 Ditto! I'd like to import .cer or .crt files from a for loop command line. Please advise.
heinoganda Posted March 17, 2017 Posted March 17, 2017 Here is an example (updroots.exe file of unpacked MS rootsupd.exe) @echo off :LOOP1 SET CERTNAME=NA (FOR /F "tokens=*" %%g in (' Dir /A:-D /B /O:N ^|^ find /I ".cer"') DO Set "CERTNAME=%%g") >NUL 2>&1 IF "%CERTNAME%" == "NA" GOTO END updroots.exe "%CERTNAME%" DEL /F "%CERTNAME%" GOTO LOOP1 :END A copy of the certificates should be used as these are deleted after installation. The whole thing should be tested in a VM. 1
dencorso Posted March 18, 2017 Author Posted March 18, 2017 Wow! Thanks! I'll test it as soon as I get home! You rock!
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now