免互動安裝OpenSSL、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id ShiningLight.OpenSSL.Dev -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id ShiningLight.OpenSSL.Dev -e --silentwinget uninstall --id ShiningLight.OpenSSL.Dev -e --silent依安裝檔
64位元 · EXE(Inno Setup) · 所有使用者
靜默安裝
Win64OpenSSL-4_1_0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
Win64OpenSSL-4_1_0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\openssl"- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenSSL (64-bit)_is1
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i Win64OpenSSL-4_1_0.msi /qn /norestart寫入記錄檔
msiexec /i Win64OpenSSL-4_1_0.msi /qn /norestart /l*v "%TEMP%\openssl-install.log"解除安裝
msiexec /x {3A7C9215-13B0-43B1-BF3F-3859FA49D643} /qn /norestart- MSI產品代碼
- {3A7C9215-13B0-43B1-BF3F-3859FA49D643}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3A7C9215-13B0-43B1-BF3F-3859FA49D643}
- UpgradeCode
- {8BA62D91-E3D5-4E94-AEDB-7BB3BA1B578E}
- 安裝資料夾
- %ProgramFiles%\OpenSSL
ARM64 · EXE(Inno Setup) · 所有使用者
靜默安裝
Win64ARMOpenSSL-4_1_0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
Win64ARMOpenSSL-4_1_0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\openssl"- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenSSL for ARM (64-bit)_is1
ARM64 · MSI · 所有使用者
靜默安裝
msiexec /i Win64ARMOpenSSL-4_1_0.msi /qn /norestart寫入記錄檔
msiexec /i Win64ARMOpenSSL-4_1_0.msi /qn /norestart /l*v "%TEMP%\openssl-install.log"解除安裝
msiexec /x {4B252C43-6215-4EC4-95D3-B68E591E3DC7} /qn /norestart- MSI產品代碼
- {4B252C43-6215-4EC4-95D3-B68E591E3DC7}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4B252C43-6215-4EC4-95D3-B68E591E3DC7}
- UpgradeCode
- {48963397-0F00-40E0-A37F-740EBBA6E4D5}
- 安裝資料夾
- %ProgramFiles%\OpenSSL
32位元 · EXE(Inno Setup) · 所有使用者
靜默安裝
Win32OpenSSL-4_1_0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
Win32OpenSSL-4_1_0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\openssl"- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\OpenSSL (32-bit)_is1
32位元 · MSI · 所有使用者
靜默安裝
msiexec /i Win32OpenSSL-4_1_0.msi /qn /norestart寫入記錄檔
msiexec /i Win32OpenSSL-4_1_0.msi /qn /norestart /l*v "%TEMP%\openssl-install.log"解除安裝
msiexec /x {9C5E60CD-A5F2-43F6-B540-04CDBFAA58F5} /qn /norestart- MSI產品代碼
- {9C5E60CD-A5F2-43F6-B540-04CDBFAA58F5}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{9C5E60CD-A5F2-43F6-B540-04CDBFAA58F5}
- UpgradeCode
- {7B69213B-526B-4E63-B03A-E5701A74CCD5}
- 安裝資料夾
- %ProgramFiles(x86)%\OpenSSL
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-openssl.ps1
$url = 'https://slproweb.com/download/Win64OpenSSL-4_1_0.exe'
$sha256 = 'C670E809BB7DAE85C54BCF734D4981D1523F1CB1B6B77947AC3E5DF46FF1CA48'
$file = Join-Path $env:TEMP 'Win64OpenSSL-4_1_0.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-openssl.ps1
$url = 'https://slproweb.com/download/Win64OpenSSL-4_1_0.msi'
$sha256 = '42E47B1292787040EB56B54FC62B16D3C5E3EB85FDCB88F213A8D02F2148BC52'
$file = Join-Path $env:TEMP 'Win64OpenSSL-4_1_0.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait install-openssl.ps1
$url = 'https://slproweb.com/download/Win64ARMOpenSSL-4_1_0.exe'
$sha256 = 'B47929ACFE205F9F82FD261FC80CE792741DAE875F0F8D8CA36B9112867D2604'
$file = Join-Path $env:TEMP 'Win64ARMOpenSSL-4_1_0.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-openssl.ps1
$url = 'https://slproweb.com/download/Win64ARMOpenSSL-4_1_0.msi'
$sha256 = '86623D6C0AF87BDDACB88C615A5631A76AA99633CEF764A6A3A384FE40BFC558'
$file = Join-Path $env:TEMP 'Win64ARMOpenSSL-4_1_0.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait install-openssl.ps1
$url = 'https://slproweb.com/download/Win32OpenSSL-4_1_0.exe'
$sha256 = '42917E337D859DF9BF3A3A1273786914A8CC67D53883D931E8B3466E6EB071B1'
$file = Join-Path $env:TEMP 'Win32OpenSSL-4_1_0.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-openssl.ps1
$url = 'https://slproweb.com/download/Win32OpenSSL-4_1_0.msi'
$sha256 = '7F24276FA56D10A0B619C6FDA3A4CF8FFC28E6F687468E84E425413F09CAF0F4'
$file = Join-Path $env:TEMP 'Win32OpenSSL-4_1_0.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait