Why the SYSTEM account is not able to access the user's certificate store?
At the same time the SYSTEM account is able to read the certificate (through the CSP dll) from the smart card and put it in the certificate store (CSP is being used by winlogon.exe in this case, so I guess the winlogon.exe has some magic inside).
For example, calling CertOpenSystemStore( NULL, L"MY" )
under system account will succeed, but CertFindCertificateInStore()
will not find anything, because it looks like the store is empty. When I log on, the CertFindCertificateInStore()
will find the requested certificate.
Every user has a different MY Store, So If you are able to find something in USER A login My Store, you might not be able to get that from User 2. Try using MMC for accessing Certificate Stores of other users and service accounts.