免互動安裝NoteGen、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id codexu.NoteGen -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id codexu.NoteGen -e --silentwinget uninstall --id codexu.NoteGen -e --silent依安裝檔
64位元 · EXE(NSIS) · 僅目前使用者
靜默安裝
NoteGen_0.38.2_x64-setup.exe /S自訂安裝資料夾
NoteGen_0.38.2_x64-setup.exe /S /D=C:\Apps\notegen- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NoteGen
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i NoteGen_0.38.2_x64_en-US.msi /qn /norestart寫入記錄檔
msiexec /i NoteGen_0.38.2_x64_en-US.msi /qn /norestart /l*v "%TEMP%\notegen-install.log"解除安裝
msiexec /x {7D41FBC5-68EE-4819-9A3F-EA628C3BD81D} /qn /norestart- MSI產品代碼
- {7D41FBC5-68EE-4819-9A3F-EA628C3BD81D}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7D41FBC5-68EE-4819-9A3F-EA628C3BD81D}
- UpgradeCode
- {E353DB5D-25D7-5FA9-B7DC-C4BC524A075E}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-notegen.ps1
$url = 'https://github.com/codexu/note-gen/releases/download/note-gen-v0.38.2/NoteGen_0.38.2_x64-setup.exe'
$sha256 = '885428EC15657A1A17D6F16203D543401A949DEDFE5181E4866E7C81EA98AF9C'
$file = Join-Path $env:TEMP 'NoteGen_0.38.2_x64-setup.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 '/S' -Wait install-notegen.ps1
$url = 'https://github.com/codexu/note-gen/releases/download/note-gen-v0.38.2/NoteGen_0.38.2_x64_en-US.msi'
$sha256 = '116B7FFE379BCCC7FE5E0B3DC22ED7FC0D1A06578BD8BE177A91577EDDFBB1BD'
$file = Join-Path $env:TEMP 'NoteGen_0.38.2_x64_en-US.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