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
This commit is contained in:
16
clients/cascades-tucson/scripts/fix-shortcut-target.ps1
Normal file
16
clients/cascades-tucson/scripts/fix-shortcut-target.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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"
|
||||
}
|
||||
Reference in New Issue
Block a user