docs
docs copied to clipboard
Update uninstall script for fix PATH clean failure
Faced an error when execute uninstall script which documented. See below (note to I use windows 10 in Japanese locale):
PS C:\Users\kimiaki\Desktop> .\uninstall.ps1
詳細: Chocolatey Install location found in Machine Path. Removing...
警告: This could cause issues after reboot where nothing is found if something goes wrong.
In that case, look at the backup file for the original PATH values in 'C:\PATH_backups_ChocolateyUninstall.txt'.
"3" 個の引数を指定して "SetValue" を呼び出し中に例外が発生しました: "レジストリ キーに書き込めません。"
発生場所 C:\Users\kimiaki\Desktop\uninstall.ps1:71 文字:5
+ $machineKey.SetValue('PATH', $newMachinePATH, 'ExpandString')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : UnauthorizedAccessException
This caused by SetValue needs write permission but $machineKey haven't the permission. To solve, add writable option when use OpenSubKey. See: https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.registrykey.opensubkey?view=windowsdesktop-5.0#Microsoft_Win32_RegistryKey_OpenSubKey_System_String_System_Boolean_
@JPRuskin Could you confirm these steps?
@JPRuskin did you see the above request?
Thanks for the contribution here! We had a follow up PR to fix this along with the other OpenSubKey() call in this script as well, so this change has already been made. This was done in #600.
Closing this out for now, but thank you for the PR nonetheless!
I apologize for neglecting this PR, and thank you for your kindly response.