Last active
April 5, 2024 18:37
-
-
Save BooTheDev/24eb471814a937784ec3884c836e49d1 to your computer and use it in GitHub Desktop.
Extend the Balsamiq Wireframes trial license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Balsamiq Wireframes - Trial extend | |
$host.UI.RawUI.WindowTitle = "Balsamiq Wireframes - Trial extend" | |
Write-Host " | |
┌───────────────┐ | |
│ Learn to code │ | |
│ Code to learn │ | |
└───────────────┘" | |
Write-Host -ForegroundColor Yellow " | |
*NOTE* | |
This script does not help to free upgrade | |
your Balsamiq Wireframes current license | |
but extending the trial license expire date. | |
You are now have much more time to try the | |
software before you decide to buy." | |
Write-Host | |
$bwCfgPath = $env:APPDATA + "\Balsamiq\Balsamiq Wireframes\LocalSettings.json" | |
$bwCfgPathBak = $bwCfgPath + ".bak" | |
$trialEndYears = Read-Host -Prompt " | |
Please enter the future expiration year you | |
want (ex $([int](Get-Date -UFormat "%Y") + 10))" | |
$bwExpiredDate = [float](Get-Date -Year $trialEndYears -UFormat "%s") | |
Write-Host | |
if (Test-Path $bwCfgPath) { | |
if (-not(Test-Path $bwCfgPathBak)) { | |
Copy-Item -Path $bwCfgPath -Destination $bwCfgPathBak | |
} | |
$bwCfgJson = Get-Content -Path $bwCfgPath | ConvertFrom-Json | |
$bwCfgJson.DefaultSelectionColorRGBA = $bwExpiredDate | |
$bwCfgJson | ConvertTo-Json -depth 100 -Compress | Out-File -FilePath $bwCfgPath -Force | |
Write-Host -ForegroundColor Green " | |
Done! If you really love Balsamiq Wireframes, | |
please buy it to support the dev." | |
} | |
else { | |
Write-Host -ForegroundColor Red " | |
Please run the program first then close it | |
before running this script." | |
} | |
$null=$host.UI.RawUI.ReadKey() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment