I'm trying to create a certificate signing request from C# using the CertEnroll com API, and everything works except when trying to use a password for the private key. I can't seem to find a way to have a password on the RSA key without setting the X509PrivateKeyProtection.XCN_NCRYPT_UI_FORCE_HIGH_PROTECTION_FLAG. As the UI suggests, this creates a dialog and has the user type this password. This is a no go, as the process will be part of an automated procedure.
Is it possible to set this password without having to go through the dialog?