-
Notifications
You must be signed in to change notification settings - Fork 5
winget_install_package.ps1
Corey Watson edited this page Dec 19, 2025
·
1 revision
Installs a software package using winget with SuperOps runtime variable replacement.
| Property | Value |
|---|---|
| Platform | Windows |
| Version | 1.0.0 |
| Category | Installation & Updates |
Installs a software package using winget (Windows Package Manager). Uses SuperOps runtime text replacement for the package name. Handles silent installation with automatic acceptance of agreements.
- Winget must be installed
- Administrator privileges recommended
- Internet connectivity
| Variable | Description | Required |
|---|---|---|
$PackageName |
SuperOps runtime replacement variable for winget package ID (e.g., "Google.Chrome", "Mozilla.Firefox") | Yes |
- Validates software name input
- Checks winget availability
- Installs package silently with
--accept-package-agreementsand--accept-source-agreements - Reports installation result
| Code | Description |
|---|---|
| 0 | Success - package installed |
| 1 | Failure - installation failed or winget unavailable |
- Silent installation mode
- Accepts package and source agreements automatically
- Handles SYSTEM context winget detection
- Recognizes "already installed" status as success
[ INPUT VALIDATION ]
--------------------------------------------------------------
Package ID : Google.Chrome
[ WINGET CHECK ]
--------------------------------------------------------------
Winget : Available
Version : v1.7.10861
[ INSTALLATION ]
--------------------------------------------------------------
Installing Google.Chrome...
Installation complete
[ FINAL STATUS ]
--------------------------------------------------------------
Status : Success
Package : Google.Chrome installed
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
- 2025-12-03 v1.0.0 Initial release - winget package installer for SuperOps