我只想将 Python 添加到 Windows 终端应用程序的选项卡选项中。我在powershell中使用以下代码提取了GUID
>> [OutputType([System.Management.Automation.PSObject])]
>> [CmdletBinding()]
>> param (
>> [Parameter()]
>> [ValidateNotNullOrEmpty()]
>> [string]$Name
>> )
>>
>> $UninstallKeys = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall", "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
>> $null = New-PSDrive -Name HKU -PSProvider Registry -Root Registry::HKEY_USERS
>> $UninstallKeys += Get-ChildItem HKU: -ErrorAction SilentlyContinue | Where-Object { $_.Name -match 'S-\d-\d+-(\d+-){1,14}\d+$' } | ForEach-Object { "HKU:\$($_.PSChildName)\Software\Microsoft\Windows\CurrentVersion\Uninstall" }
>> if (-not $UninstallKeys) {
>> Write-Verbose -Message 'No software registry keys found'
>> } else {
>> foreach ($UninstallKey in $UninstallKeys) {
>> if …Run Code Online (Sandbox Code Playgroud)