Disable notepad replacement for now

This commit is contained in:
Alan Mason 2017-11-28 01:56:27 -08:00
parent 7ad26a6182
commit bc33a7fcb3

View file

@ -568,10 +568,11 @@ if ($MyInvocation.InvocationName -ne ".") {
Set-ItemProperty -Path $RegPath -Name "Path" -Value $NewValue -Force | Out-Null Set-ItemProperty -Path $RegPath -Name "Path" -Value $NewValue -Force | Out-Null
# Replace Notepad # Replace Notepad
$RegPath = "HKLM:\WinPE-SW\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" ## Currently broken ##
$NewValue = 'wscript "X:\WK\NotepadPlusPlus\npp.vbs"' # $RegPath = "HKLM:\WinPE-SW\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe"
New-Item -Path $RegPath -Force | Out-Null # $NewValue = 'wscript "X:\WK\NotepadPlusPlus\npp.vbs"'
New-ItemProperty -Path $RegPath -Name "Debugger" -Value $NewValue -Force | Out-Null # New-Item -Path $RegPath -Force | Out-Null
# New-ItemProperty -Path $RegPath -Name "Debugger" -Value $NewValue -Force | Out-Null
# Run garbage collection to release potential stale handles # Run garbage collection to release potential stale handles
## Credit: https://jrich523.wordpress.com/2012/03/06/powershell-loading-and-unloading-registry-hives/ ## Credit: https://jrich523.wordpress.com/2012/03/06/powershell-loading-and-unloading-registry-hives/