Add test/Samy.Apps.ps1
This commit is contained in:
30
test/Samy.Apps.ps1
Normal file
30
test/Samy.Apps.ps1
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Samy.Apps.ps1
|
||||||
|
# Winget app handlers
|
||||||
|
|
||||||
|
function Invoke-InstallChrome {
|
||||||
|
param($Context)
|
||||||
|
|
||||||
|
try {
|
||||||
|
winget install --id=Google.Chrome --silent --accept-package-agreements --accept-source-agreements
|
||||||
|
Write-LogHybrid "Installed Google Chrome via winget" Success SVSApps -LogToEvent
|
||||||
|
Send-Text $Context "Chrome installed"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-LogHybrid "Chrome install failed: $($_.Exception.Message)" Error SVSApps -LogToEvent
|
||||||
|
Send-Text $Context "ERROR: $($_.Exception.Message)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Invoke-InstallAcrobat {
|
||||||
|
param($Context)
|
||||||
|
|
||||||
|
try {
|
||||||
|
winget install --id=Adobe.Acrobat.Reader.64-bit --silent --accept-package-agreements --accept-source-agreements
|
||||||
|
Write-LogHybrid "Installed Adobe Acrobat Reader (64-bit) via winget" Success SVSApps -LogToEvent
|
||||||
|
Send-Text $Context "Acrobat Reader installed"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-LogHybrid "Acrobat install failed: $($_.Exception.Message)" Error SVSApps -LogToEvent
|
||||||
|
Send-Text $Context "ERROR: $($_.Exception.Message)"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user