I have self-signed pfx certificate, and machine with 2 users (A and B). I need to install the certificate using some command line tool and it should be available for all users.
In case user A installs the certificate manually in LocalMachine\My or LocalMachine\Root it is available only for user A because user B doesn't have private key permissions.
I tried
winhttpcertcfg.exe -i cert.pfx -p pass -a Everyone -c LOCAL_MACHINE\Root
but it doesn't help, certificate is available only for user that runs winhttpcertcfg.
I tried
winhttpcertcfg.exe -i cert.pfx -p pass -a Everyone -c LOCAL_MACHINE\My
but it installs the certificate in Root instead of My regardless -c parameter.
I tried
certutil -f -p pass -importpfx "cert.pfx"
but it doesn't help, certificate is available only for user that runs certutil.
In case My store the issue can be fixed manually:
- Right click on the certificate in Local Machine Cert Manager -> All Tasks -> Manage Private Keys
- Add users A and B and set necessary permissions.
But I need some automatic way that I will use while installing my applications.