Files
claudetools/clients/cascades-tucson/scripts/restore-gpp-shortcuts-public.ps1
Howard Enos 8d2ca14cac sync: auto-sync from HOWARD-HOME at 2026-07-17 14:14:41
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-07-17 14:14:41
2026-07-17 14:15:20 -07:00

16 lines
2.1 KiB
PowerShell

$dir = "\\cascades.local\SYSVOL\cascades.local\Policies\{3B5CD9A6-A278-4676-A9FD-9396D21A8261}\User\Preferences\Shortcuts"
New-Item -ItemType Directory -Path $dir -Force | Out-Null
$a = '<Shortcut clsid="{4F2F7C55-2790-433e-8127-0739D1CFA327}" name="ALIS" status="ALIS" image="0" changed="2026-07-17 19:00:00" uid="{0889D408-08BF-4321-BA2A-486053F0533B}" bypassErrors="1"><Properties shortcutPath="%CommonDesktopDir%\ALIS" pidl="" targetType="URL" action="R" comment="" startIn="" arguments="" iconIndex="0" targetPath="https://cascadestucson.alisonline.com/" iconPath="" window="" shortcutKey="0"/></Shortcut>'
$b = '<Shortcut clsid="{4F2F7C55-2790-433e-8127-0739D1CFA327}" name="PharmCare" status="PharmCare" image="0" changed="2026-07-17 19:00:00" uid="{7B9E504F-AA3A-4E44-B3D5-E7E952FA556F}" bypassErrors="1"><Properties shortcutPath="%CommonDesktopDir%\PharmCare" pidl="" targetType="URL" action="R" comment="" startIn="" arguments="" iconIndex="0" targetPath="https://pharmcare.linkrxnow.com/" iconPath="" window="" shortcutKey="0"/></Shortcut>'
$c = '<Shortcut clsid="{4F2F7C55-2790-433e-8127-0739D1CFA327}" name="Helpany" status="Helpany" image="0" changed="2026-07-17 19:00:00" uid="{38EE1CA4-25AE-4E02-8CA5-DECF837BDDBD}" bypassErrors="1"><Properties shortcutPath="%CommonDesktopDir%\Helpany" pidl="" targetType="URL" action="R" comment="" startIn="" arguments="" iconIndex="0" targetPath="https://app.helpany.com/start" iconPath="" window="" shortcutKey="0"/></Shortcut>'
$xml = '<?xml version="1.0" encoding="utf-8"?><Shortcuts clsid="{872C5C8A-6BBD-4d24-B962-D7A6F92B6F1A}">' + $a + $b + $c + '</Shortcuts>'
Set-Content "$dir\Shortcuts.xml" $xml -Encoding UTF8 -Force
Write-Output "Restored GPP shortcuts -> CommonDesktopDir"
$gpoPath = "\\cascades.local\SYSVOL\cascades.local\Policies\{3B5CD9A6-A278-4676-A9FD-9396D21A8261}\GPT.INI"
$ini = Get-Content $gpoPath -Raw
if ($ini -match 'Version=(\d+)') {
$ver = [int]$matches[1]; $newVer = ((($ver -shr 16)+1) -shl 16) -bor ($ver -band 0xFFFF)
Set-Content $gpoPath ($ini -replace "Version=\d+","Version=$newVer") -Force
Write-Output "GPO version: $ver -> $newVer"
}