# https://nsis.sourceforge.io/Import_Root_Certificate # 사용 예 # ${AddCertificateToStore} $0 "$VAR_INSTDIR\rootcert.cer" !define CERT_QUERY_OBJECT_FILE 1 !define CERT_QUERY_CONTENT_FLAG_ALL 16382 !define CERT_QUERY_FORMAT_FLAG_ALL 14 !define CERT_STORE_PROV_SYSTEM 10 !define CERT_STORE_OPEN_EXISTING_FLAG 0x4000 !define CERT_SYSTEM_STORE_LOCAL_MACHINE 0x20000 !define CERT_STORE_ADD_ALWAYS 4 !macro _AddCertificateToStore un Function ${un}_AddCertificateToStore Exch $0 Push $1 Push $R0 System::Call "crypt32::CryptQueryObject(i ${CERT_QUERY_OBJECT_FILE}, w r0, \ i ${CERT_QUERY_CONTENT_FLAG_ALL}, i ${CERT_QUERY_FORMAT_FLAG_ALL}, \ i 0, i 0, i 0, i 0, i 0, i 0, *i .r0) i .R0" ${If} $R0 0 System::Call "crypt32::CertOpenStore(i ${CERT_STORE_PROV_SYSTEM}, i 0, i 0, \ i ${CERT_STORE_OPEN_EXISTING_FLAG}|${CERT_SYSTEM_STORE_LOCAL_MACHINE}, \ w 'ROOT') i .r1" ${If} $1 0 System::Call "crypt32::CertAddCe...