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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now