Files
claudetools/clients/cascades-tucson/scripts/fix-shortcut-target.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

17 lines
839 B
PowerShell

# Fix GPP shortcuts to use %DesktopDir% (per-user, deployed at logon by GPO)
$kioskGuid = (Get-GPO -Name 'CSC - Nurse Station Kiosk').Id
$xmlPath = "\\cascades.local\SYSVOL\cascades.local\Policies\{$kioskGuid}\User\Preferences\Shortcuts\Shortcuts.xml"
$xml = Get-Content $xmlPath -Raw
$xml = $xml -replace '%CommonDesktopDir%', '%DesktopDir%'
Set-Content $xmlPath $xml -Encoding UTF8 -Force
Write-Output "Changed shortcuts to %DesktopDir%"
# Bump version
$gptPath = "\\cascades.local\SYSVOL\cascades.local\Policies\{$kioskGuid}\GPT.INI"
$ini = Get-Content $gptPath -Raw
if ($ini -match 'Version=(\d+)') {
$ver = [int]$matches[1]; $newVer = ((($ver -shr 16)+1) -shl 16) -bor ($ver -band 0xFFFF)
$ini = $ini -replace "Version=\d+", "Version=$newVer"
Set-Content $gptPath $ini -Force
Write-Output "Version: $ver -> $newVer"
}