免互動安裝LightCraft、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id ArtCraft.LightCraft -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id ArtCraft.LightCraft -e --silentwinget uninstall --id ArtCraft.LightCraft -e --silent依安裝檔
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i lightcraft-0.21.1-windows-x64.msi /qn /norestart寫入記錄檔
msiexec /i lightcraft-0.21.1-windows-x64.msi /qn /norestart /l*v "%TEMP%\lightcraft-install.log"解除安裝
msiexec /x {C9504483-D622-4974-9895-C685BA97ECBF} /qn /norestart- MSI產品代碼
- {C9504483-D622-4974-9895-C685BA97ECBF}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C9504483-D622-4974-9895-C685BA97ECBF}
- UpgradeCode
- {229BB552-5EFD-479A-BA86-8CB6D926390C}
ARM64 · MSI · 所有使用者
靜默安裝
msiexec /i lightcraft-0.21.1-windows-arm64.msi /qn /norestart寫入記錄檔
msiexec /i lightcraft-0.21.1-windows-arm64.msi /qn /norestart /l*v "%TEMP%\lightcraft-install.log"解除安裝
msiexec /x {327037C5-1799-4EC7-9F9B-4C9193A702CE} /qn /norestart- MSI產品代碼
- {327037C5-1799-4EC7-9F9B-4C9193A702CE}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{327037C5-1799-4EC7-9F9B-4C9193A702CE}
- UpgradeCode
- {229BB552-5EFD-479A-BA86-8CB6D926390C}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-lightcraft.ps1
$url = 'https://github.com/storytold/lightcraft/releases/download/v0.21.1/lightcraft-0.21.1-windows-x64.msi'
$sha256 = '16B8F4E12C93120B2DB5A5F567798D1D1F33E2F55DDEE901F1C8C0F072558A25'
$file = Join-Path $env:TEMP 'lightcraft-0.21.1-windows-x64.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-lightcraft.ps1
$url = 'https://github.com/storytold/lightcraft/releases/download/v0.21.1/lightcraft-0.21.1-windows-arm64.msi'
$sha256 = '0B5FFA35171B8433AF7D9112B2E1BE7E87996B8E4222EB10859541F336061459'
$file = Join-Path $env:TEMP 'lightcraft-0.21.1-windows-arm64.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