免互動安裝Python Launcher、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id VinaySajip.PythonLauncher -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id VinaySajip.PythonLauncher -e --silentwinget uninstall --id VinaySajip.PythonLauncher -e --silent依安裝檔
64位元 · MSI
靜默安裝
msiexec /i launcher-1.0.1.6.amd64.msi /qn /norestart寫入記錄檔
msiexec /i launcher-1.0.1.6.amd64.msi /qn /norestart /l*v "%TEMP%\python-launcher-vinay-sajip-install.log"解除安裝
msiexec /x {1CB6C42B-5887-47CF-AF21-988256F0455B} /qn /norestart- MSI產品代碼
- {1CB6C42B-5887-47CF-AF21-988256F0455B}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1CB6C42B-5887-47CF-AF21-988256F0455B}
32位元 · MSI
靜默安裝
msiexec /i launcher-1.0.1.6.msi /qn /norestart寫入記錄檔
msiexec /i launcher-1.0.1.6.msi /qn /norestart /l*v "%TEMP%\python-launcher-vinay-sajip-install.log"解除安裝
msiexec /x {298B5D62-1287-427F-B8D9-B44D605F8F6B} /qn /norestart- MSI產品代碼
- {298B5D62-1287-427F-B8D9-B44D605F8F6B}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{298B5D62-1287-427F-B8D9-B44D605F8F6B}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-python-launcher-vinay-sajip.ps1
$url = 'https://bitbucket.org/vinay.sajip/pylauncher/downloads/launcher-1.0.1.6.amd64.msi'
$sha256 = '3CA4B4021FF2D35CE176A099E9F1DD73A920170FB0D3E9165D934700EA689DCE'
$file = Join-Path $env:TEMP 'launcher-1.0.1.6.amd64.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-python-launcher-vinay-sajip.ps1
$url = 'https://bitbucket.org/vinay.sajip/pylauncher/downloads/launcher-1.0.1.6.msi'
$sha256 = '08004667A92980DFAF154FB4C95113428B0E925B18C0B2C95741B18ED65EBC0C'
$file = Join-Path $env:TEMP 'launcher-1.0.1.6.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