-
Notifications
You must be signed in to change notification settings - Fork 3
/
Config_AxureRP_exapmle.ps1
26 lines (26 loc) · 1.32 KB
/
Config_AxureRP_exapmle.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$Config = @{
appVendor = "Axure Software Solutions, Inc."
appName = "Axure RP"
appVersion = "8.1.0.3388"
appDetectionVersion = "8.0.0.3388"
appDetectionName = "Axure RP"
appScriptDate = get-date -Format "yyyy/MM/dd"
appScriptAuthor = "RProkhorov"
close_app = "AxureRP8"
InstallScriptBlock = {
[string]$installPhase = 'Installation'
Show-InstallationProgress -StatusMessage "Óñòàíîâêà ïðèëîæåíèÿ $appName `nØàã [1/1] óäàëåíèå ñòàðîé âåðñèè ïðèëîæåíèÿ..."
$mainExitCode = Execute-Process -Path "$dirFiles\AxureRP-8.1.0.3388.exe" -Parameters "/S /l=""C:\Windows\Logs\Software\AxureRP_8.1.0.3388_install.log"""
}
UninstallScriptBlock = {
[string]$installPhase = 'Uninstall'
$appName = "Axure RP"
$appVersion = "8.1.0.3388"
$appDetectionVersion = "8.0.0.3388"
$appDetectionName = "Axure RP"
#$LogName = "Detection Method $appName - $appVersion.log" -replace '\*', ' '
$Version = "$appDetectionVersion"
[array]$Products = Get-InstalledApplication -Name "*$appDetectionName*" -WildCard #-LogName $LogName
$mainExitCode = Execute-Process -Path ($Products |? {$_.InstallDate -ne $null}).UninstallString -Parameters "REMOVE=TRUE MODIFY=FALSE /S /l=""C:\Windows\Logs\Software\AxureRP_8.1.0.3388_uninstall.log"""
}
}