There’s a command-line tool called certutil one can use to add (among other things) certificates to the certificate store in windows.
Some examples:
REM Add pfx-file to Personal
certutil -ent -p pfxpassword -importpfx my some.pfx
REM Add pfx-file to Trusted Root Certification Authorities
certutil -ent -p pfxpassword -importpfx root some.pfx
REM Add cer-file to Trusted Root Certification Authorities
certutil -ent -addstore root some.cer
certutil -ent -p pfxpassword -importpfx my some.pfx
REM Add pfx-file to Trusted Root Certification Authorities
certutil -ent -p pfxpassword -importpfx root some.pfx
REM Add cer-file to Trusted Root Certification Authorities
certutil -ent -addstore root some.cer