39 lines
1.5 KiB
PowerShell
39 lines
1.5 KiB
PowerShell
$ErrorActionPreference = 'SilentlyContinue'
|
|||
|
|
$Output = New-Object System.Collections.Generic.List[string]
|
||
|
|
|
||
|
|
$Output.Add('--- IDEA processes ---')
|
||
|
|
Get-Process -Name 'idea64','idea','jetbrains*' | Select-Object -ExpandProperty Path | ForEach-Object { $Output.Add($_) }
|
||
|
|
|
||
|
|
$Output.Add('--- Uninstall registry (IntelliJ) ---')
|
||
|
|
$keys = @(
|
||
|
|
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*',
|
||
|
|
'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*',
|
||
|
|
'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*'
|
||
|
|
)
|
||
|
|
foreach ($k in $keys) {
|
||
|
|
Get-ItemProperty $k | Where-Object { $_.DisplayName -like '*IntelliJ*' -or $_.DisplayName -like '*JetBrains*' } | ForEach-Object {
|
||
|
|
$Output.Add(($_.DisplayName + ' ver=' + $_.DisplayVersion + ' loc=' + $_.InstallLocation))
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
$Output.Add('--- candidate install dirs ---')
|
||
|
|
$dirs = @(
|
||
|
|
'C:\Program Files\JetBrains',
|
||
|
|
"$env:LOCALAPPDATA\Programs",
|
||
|
|
"$env:LOCALAPPDATA\JetBrains",
|
||
|
|
'D:\Program Files\JetBrains',
|
||
|
|
'D:\JetBrains',
|
||
|
|
'D:\Program Files (x86)\JetBrains'
|
||
|
|
)
|
||
|
|
foreach ($d in $dirs) {
|
||
|
|
if (Test-Path $d) {
|
||
|
|
Get-ChildItem $d -Directory | Select-Object -ExpandProperty FullName | ForEach-Object { $Output.Add($_) }
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
$Output.Add('--- any idea*.vmoptions found (search C: and D: roots shallow) ---')
|
||
|
|
foreach ($base in @('C:\','D:\')) {
|
||
|
|
Get-ChildItem -Path $base -Filter 'idea*.vmoptions' -File -Recurse -Depth 4 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName | Select-Object -First 10 | ForEach-Object { $Output.Add($_) }
|
||
|
|
}
|
||
|
|
|
||
|
|
$Output -join "`r`n"
|