Advertisement
BooTheDev

Balsamiq Wireframes - Trial extend.ps1

Nov 30th, 2023
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 1.78 KB | Software | 0 0
  1. # Balsamiq Wireframes - Trial extend
  2. # https://github.com/BooTheDev
  3. # https://gist.github.com/BooTheDev
  4.  
  5. $host.UI.RawUI.WindowTitle = "Balsamiq Wireframes - Trial extend"
  6. Write-Host "
  7.         _  ___            ___      
  8.        (_)| _ ) ___  ___ / _ \__ __
  9.        | || _ \/ _ \/ _ \\_. /\ \ /
  10.        |_||___/\___/\___/ /_/ /_\_\
  11.  
  12.              ┌───────────────┐
  13.              │ Learn to code │
  14.              │ Code to learn │
  15.              └───────────────┘"
  16.  
  17. Write-Host -ForegroundColor Yellow "
  18. *NOTE*
  19.  
  20. This script does not help to free upgrade
  21. your Balsamiq Wireframes current license
  22. but extending the trial license expire date.
  23.  
  24. You are now have much more time to try the
  25. software before you decide to buy."
  26. Write-Host
  27.  
  28. $bwCfgPath = $env:APPDATA + "\Balsamiq\Balsamiq Wireframes\LocalSettings.json"
  29. $bwCfgPathBak = $bwCfgPath + ".bak"
  30. $trialEndYears = Read-Host -Prompt "
  31. Please enter the future expiration year you
  32. want (ex $([int](Get-Date -UFormat "%Y") + 10))"
  33. $bwExpiredDate = [float](Get-Date -Year $trialEndYears -UFormat "%s")
  34. Write-Host
  35.  
  36. if (Test-Path $bwCfgPath) {
  37.     if (-not(Test-Path $bwCfgPathBak)) {
  38.         Copy-Item -Path $bwCfgPath -Destination $bwCfgPathBak
  39.     }
  40.     $bwCfgJson = Get-Content -Path $bwCfgPath | ConvertFrom-Json
  41.     $bwCfgJson.DefaultSelectionColorRGBA = $bwExpiredDate
  42.     $bwCfgJson | ConvertTo-Json -depth 100 -Compress | Out-File -FilePath $bwCfgPath -Force
  43.     Write-Host -ForegroundColor Green "
  44. Done! If you really love Balsamiq Wireframes,
  45. please buy it to support the dev."
  46. }
  47. else {
  48.     Write-Host -ForegroundColor Red "
  49. Please run the program first then close it
  50. before running this script."
  51. }
  52.  
  53. $null=$host.UI.RawUI.ReadKey()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement