Here is my script:
Code: Select all
# Block for declaring the script parameters.
Param()
$mariaDBInstalled = AI_GetMsiProperty MARIADB_DIR
Write-Output $mariaDBInstalled
$programFiles = AI_GetMsiProperty AI_ProgramFiles
$path= $programFiles +"MariaDB " + (AI_GetMsiProperty MARIADBVERSION)
Write-Output $path
$newname="Old MariaDB " + (AI_GetMsiProperty MARIADBVERSION) + "Backup"
# Your code goes here.
if((Test-Path2 $path) -AND ($mariaDBInstalled -EQ "NULL")){
Write-Output "IF SUCCESS"
Rename-Item -Path $path -NewName newname
}
FOLLOW US
Get the latest news in Application Packaging