Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # script to overcome pgadmins obsession with installing in a new folder with each major version
- # pgpath should be working out to the full path to the exectuable in the newest subfolder in the pgadmin 4 subdirectory.
- $pgpath = Join-Path 'C:\Users\'$Env:UserName'\AppData\Local\Programs\pgAdmin 4\' $(Get-ChildItem 'C:\Users\'$Env:UserName'\AppData\Local\Programs\pgAdmin 4\' -Directory -Name | sort CreationTime -desc | select -f 1) '\runtime\pgAdmin4.exe'
- # echo out the resulting path to the exe so if the script is launched from powershell you can see the result
- $pgpath
- #launch the exe, note the format is due to the spaces in the path, dont change it!
- # & "$pgpath" # copy incase of oops....
- & "$pgpath"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement