Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Balsamiq Wireframes - Trial extend
- # https://github.com/BooTheDev
- # https://gist.github.com/BooTheDev
- $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()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement