반응형
# 사용 예
# Call Registering_Certificate_In_Trusted_Root_Certification_Authorities
Function Registering_Certificate_In_Trusted_Root_Certification_Authorities
# 사설 인증서 등록 (IE, 크롬, 사파리, 오페라)
${AddCertificateToStore} $0 "$VAR_INSTDIR\cert\${CERT_NAME_COMPANY_ROOT_AUTHORITY}"
${If} $0 != success
MessageBox MB_OK "certificate import failed: $0"
${EndIf}
${AddCertificateToStore} $0 "$VAR_INSTDIR\cert\${CERT_NAME_DIGICERT_HIGH_ASSURANCE_EV_ROOT_CA}"
${If} $0 != success
MessageBox MB_OK "certificate import failed: $0"
${EndIf}
${AddCertificateToStore} $0 "$VAR_INSTDIR\cert\${CERT_NAME_DIGICERT_TRUSTED_ROOT_G4}"
${If} $0 != success
MessageBox MB_OK "certificate import failed: $0"
${EndIf}
# 사설 인증서 등록 (파이어폭스)
System::Call 'shell32::SHGetSpecialFolderPath(i $HWNDPARENT, t .r2, i ${CSIDL_APPDATA}, i0)i.r0'
IfFileExists "$2\Mozilla\Firefox\profiles.ini" EXIST_FIREFOX NON_EXIST_FIREFOX
EXIST_FIREFOX:
${nsProcess::KillProcess} "firefox.exe" $R0
SetShellVarContext current
ReadINIStr $7 "$2\Mozilla\Firefox\profiles.ini" "Profile0" "Path"
StrCpy $8 "$2\Mozilla\Firefox\$7"
ExecCmd::exec /TIMEOUT=2000 '""$VAR_INSTDIR\certutil.exe" -A -n "COMPANY Root Authority - SSO" -t "TCu,Cuw,Tuw" -i "$VAR_INSTDIR\${CERT_NAME_COMPANY_ROOT_AUTHORITY}" -d "$8""'
ExecCmd::exec /TIMEOUT=2000 '""$VAR_INSTDIR\certutil.exe" -A -n "COMPANY Root Authority - SSO" -t "TCu,Cu,Tu" -i "$VAR_INSTDIR\${CERT_NAME_COMPANY_ROOT_AUTHORITY}" -d "sql:$8""'
ExecCmd::exec /TIMEOUT=2000 '""$VAR_INSTDIR\certutil.exe" -A -n "COMPANY Root Authority - SSO" -t "TCu,Cuw,Tuw" -i "$VAR_INSTDIR\${CERT_NAME_DIGICERT_HIGH_ASSURANCE_EV_ROOT_CA}" -d "$8""'
ExecCmd::exec /TIMEOUT=2000 '""$VAR_INSTDIR\certutil.exe" -A -n "COMPANY Root Authority - SSO" -t "TCu,Cu,Tu" -i "$VAR_INSTDIR\${CERT_NAME_DIGICERT_HIGH_ASSURANCE_EV_ROOT_CA}" -d "sql:$8""'
ExecCmd::exec /TIMEOUT=2000 '""$VAR_INSTDIR\certutil.exe" -A -n "COMPANY Root Authority - SSO" -t "TCu,Cuw,Tuw" -i "$VAR_INSTDIR\${CERT_NAME_DIGICERT_TRUSTED_ROOT_G4}" -d "$8""'
ExecCmd::exec /TIMEOUT=2000 '""$VAR_INSTDIR\certutil.exe" -A -n "COMPANY Root Authority - SSO" -t "TCu,Cu,Tu" -i "$VAR_INSTDIR\${CERT_NAME_DIGICERT_TRUSTED_ROOT_G4}" -d "sql:$8""'
NON_EXIST_FIREFOX:
FunctionEnd
Function Certificate_Install_Registeration_Delete
Call Install_Certificate
Call Registering_Certificate_In_Trusted_Root_Certification_Authorities
Call Delete_Certificate
FunctionEnd
반응형
'NSIS > Reference' 카테고리의 다른 글
[NSIS] 인증서 설치 (0) | 2024.12.25 |
---|---|
[NSIS] 권한 상승 (0) | 2024.12.25 |
[NSIS] 특수 경로 얻어오기 (0) | 2024.12.25 |
[NSIS] 재배포 패키지 설치 여부 체크 후 설치하는 방법 (0) | 2024.12.11 |
[NSIS] 32비트와 64비트 모듈 등록하는 법. (regsvr32) (0) | 2024.12.11 |