Ming (@UwU) 在 Codex更新桌面快捷方式失效修复-pwsh命令 中发帖
由于codex的Windows桌面版是从微软商店下载的,然而Codex在每次每次更新之后,他的目录文件夹📁名字都会更改,如图:
[image]
所以我通过codex写了 PowerShell 脚本来直接实现,可以直接复制到PowerShell,或者另存为后缀为.ps1的脚本文件使用
$shell = New-Object -ComObject Shell.Application
$wsh = New-Object -ComObject WScript.Shell
$desktop = [Environment]::GetFolderPath('Desktop')
$folder = $shell.Namespace('shell:AppsFolder')
$app = $folder.Items() | Where-Object { $_.Name -eq 'Codex' } ...