SandboxStartup - Fix wrong variable used in registry value

It was using a previous removed variable and therefore wasn't properly setting notepad++ to be associated with .txt files if applicable
pull/13/head
ThioJoe 2025-10-13 15:33:08 -07:00
parent 317ab2c66c
commit 487c0afa55
No known key found for this signature in database
GPG Key ID: 2E328FE64CC3898C
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ If (($null -ne $notepadPath) -or ($null -ne $notepadPlusPlusPath)) {
If (!(Test-Path 'HKLM:\SOFTWARE\Classes\txtfile\shell\open\command')) { New-Item -Path 'HKLM:\SOFTWARE\Classes\txtfile\shell\open\command' -Force }
# Prefer Notepad++ if available, otherwise use Notepad
If ($null -ne $notepadPlusPlusPath) {
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Classes\txtfile\shell\open\command' -Name '(Default)' -Value ('"{0}" -settingsDir=%appdata% "%1"' -f $editorPath) -Type ExpandString -Force
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Classes\txtfile\shell\open\command' -Name '(Default)' -Value ('"{0}" -settingsDir=%appdata% "%1"' -f $notepadPlusPlusPath) -Type ExpandString -Force
} Else { # If Npp isn't available, condition above means we know notepadPath is still available
cmd /c ftype txtfile=`"$notepadPath`" "%1"
}