Mike

Splendid
Apr 1, 2004
3,865
0
22,780
Archived from groups: microsoft.public.windowsxp.general (More info?)

Is there a command line for installing pfx certificates with no user
interaction? Websites or examples would help. Thanks
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

Mike wrote:

> Is there a command line for installing pfx certificates with no user
> interaction? Websites or examples would help. Thanks
Hi,

You can use the command line utility certmgr.exe for this, a
cryptoAPI/Authenticode tool from MS.

To add a certificate to the "Trusted Root Certification Authorities"
in localMachine:

certmgr.exe -add -c "<cert-file>" -s -r localMachine root

where <cert-file> is the path to the certificate file.


Current users personal certificate store command line:
http://groups.google.com/group/microsoft.public.windows.server.scripting/msg/4ac94c56ac6c7b67?dmode=source

Note this one about certmgr.exe and third-party certificates
in pfx format:
http://groups.google.com/group/microsoft.public.windows.server.scripting/msg/4ddf0f6b0890f889


The download location for certmgr.exe at Microsoft have been removed,
but you can use the one that is inside this zip file:
http://myitforum.techtarget.com/inc/upload/6285cert.zip


More information can be found here:

Certificate Manager Tool (Certmgr.exe)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfcertificatemanagertoolcertmgrexe.asp

Using CertMgr
http://msdn.microsoft.com/library/en-us/security/security/using_certmgr.asp



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
 

Mike

Splendid
Apr 1, 2004
3,865
0
22,780
Archived from groups: microsoft.public.windowsxp.general (More info?)

I downloaded that file and extracted it. I run the command line as follows
and receive a error also following:

certmgr.exe -add -c C:\test.pfx -s -r currentUser my
Error: Failed to open the source store
CertMgr Failed

Is there something that I'm doing wrong?


"Torgeir Bakken (MVP)" wrote:

> Mike wrote:
>
> > Is there a command line for installing pfx certificates with no user
> > interaction? Websites or examples would help. Thanks
> Hi,
>
> You can use the command line utility certmgr.exe for this, a
> cryptoAPI/Authenticode tool from MS.
>
> To add a certificate to the "Trusted Root Certification Authorities"
> in localMachine:
>
> certmgr.exe -add -c "<cert-file>" -s -r localMachine root
>
> where <cert-file> is the path to the certificate file.
>
>
> Current users personal certificate store command line:
> http://groups.google.com/group/microsoft.public.windows.server.scripting/msg/4ac94c56ac6c7b67?dmode=source
>
> Note this one about certmgr.exe and third-party certificates
> in pfx format:
> http://groups.google.com/group/microsoft.public.windows.server.scripting/msg/4ddf0f6b0890f889
>
>
> The download location for certmgr.exe at Microsoft have been removed,
> but you can use the one that is inside this zip file:
> http://myitforum.techtarget.com/inc/upload/6285cert.zip
>
>
> More information can be found here:
>
> Certificate Manager Tool (Certmgr.exe)
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfcertificatemanagertoolcertmgrexe.asp
>
> Using CertMgr
> http://msdn.microsoft.com/library/en-us/security/security/using_certmgr.asp
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx
>
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

Mike wrote:

> I downloaded that file and extracted it. I run the command line as follows
> and receive a error also following:
>
> certmgr.exe -add -c C:\test.pfx -s -r currentUser my
> Error: Failed to open the source store
> CertMgr Failed
>
> Is there something that I'm doing wrong?
>
Hi,

That is the same message I get if I point to a certificate file that
does not exist in the path specified at the -c parameter (no test.pfx
at C:\)

You can also have the issue discussed here:
http://groups.google.com/group/microsoft.public.windows.server.scripting/msg/4ddf0f6b0890f889




--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx