Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wingetScripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
icommonsCRC
wingetScripts
Commits
90d57a10
Commit
90d57a10
authored
3 months ago
by
icommonsCRC
Browse files
Options
Downloads
Patches
Plain Diff
Update wingetInstaller.ps1
parent
984e2b8e
Branches
main
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wingetInstaller.ps1
+2
-2
2 additions, 2 deletions
wingetInstaller.ps1
with
2 additions
and
2 deletions
wingetInstaller.ps1
+
2
−
2
View file @
90d57a10
# Self-elevate the script if required
# Self-elevate the script if required
if
(
-Not
([
Security.Principal.WindowsPrincipal
]
[
Security.Principal.WindowsIdentity
]::
GetCurrent
())
.
IsInRole
([
Security.Principal.WindowsBuiltInRole
]
'Administrator'
))
{
if
([
int
](
Get-CimInstance
-Class
Win32_OperatingSystem
|
Select-Object
-ExpandProperty
BuildNumber
)
-ge
6000
)
{
# PowerShell 5 and later
...
...
@@ -98,7 +98,7 @@ foreach ($app in $applications) {
}
}
else
{
Write-Host
"
$app
is not installed. Installing..."
-ForegroundColor
Green
winget
install
--id
$app
--silent
--accept-package-agreements
--accept-source-agreements
winget
install
--scope
machine
--id
$app
--silent
--accept-package-agreements
--accept-source-agreements
# Verify installation
if
(
Test-ApplicationInstalled
-AppId
$app
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment