-
Notifications
You must be signed in to change notification settings - Fork 3
/
Config_Greenshot_example.ps1
23 lines (21 loc) · 1.19 KB
/
Config_Greenshot_example.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$Config = @{
appVendor = ""
appName = "GreenShot"
appVersion = "1.2.10.6"
appDetectionVersion = "1.2.10.6"
appDetectionName = "GreenShot"
appScriptDate = get-date -Format "yyyy/MM/dd"
appScriptAuthor = "RProkhorov"
close_app = "GreenShot"
InstallScriptBlock = {
[string]$installPhase = 'Installation'
Show-InstallationProgress -StatusMessage "Óñòàíîâêà ïðèëîæåíèÿ $appName `nØàã [1/1] óñòàíîâêà íîâîé âåðñèè ÏÎ..."
$mainExitCode = Start-Process -FilePath "$dirFiles\Greenshot-1.2.10.6.exe" -ArgumentList "/SP- /VERYSILENT /NORESTART /CLOSEAPPLICATIONS /NORUN"
Get-Process * -IncludeUserName|where {(($_.ProcessName -like '*firefox*') -or ($_.ProcessName -like '*chrome*')-or ($_.ProcessName -like '*iexplore*')-or ($_.ProcessName -eq 'OpenWith')) -and($_.UserName -like '*SYSTEM*')} |Stop-Process -Force -ErrorAction SilentlyContinue
}
UninstallScriptBlock = {
[string]$installPhase = 'Uninstall'
Get-Process Greenshot* | Stop-Process -Force -ErrorAction SilentlyContinue
$mainExitCode = Start-Process -FilePath "C:\Program Files\Greenshot\unins000.exe" -ArgumentList "/verysilent /NORESTART"
}
}