Share via

Import Certificate

OSVBNET 1,401 Reputation points
2022-05-17T18:19:15.197+00:00

Hi,
I found this code to import a certificate from disk:
https://stackoverflow.com/questions/33899509/x509-certificate-installation-using-vb-net

Anyway, can't figure out how to set store location: "MY", "AddressBook", "CA" or "Root"

2nd: StoreLocation.CurrentUser vs LocalMachine, when we import via IE or Firefox, it'll be imported to which one, CurrentUser or LocalMachine?

Developer technologies | VB
0 comments No comments

Answer accepted by question author

Jiachen Li-MSFT 34,241 Reputation points Microsoft External Staff
2022-05-18T05:47:19.197+00:00

Hi @OSVBNET ,
According to Local Machine and Current User Certificate Stores.

  • Local machine certificate store
    This type of certificate store is local to the computer and is global to all users on the computer. This certificate store is located in the registry under the HKEY_LOCAL_MACHINE root.
  • Current user certificate store
    This type of certificate store is local to a user account on the computer. This certificate store is located in the registry under the HKEY_CURRENT_USER root.

Refer to the documentation below to set the storage location.
StoreLocation Enum

Best Regards.
Jiachen Li

----------

If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.