mirror of
https://github.com/cmderdev/cmder.git
synced 2025-01-11 00:39:08 +08:00
Remove the Registry hive after making the changes
This commit is contained in:
parent
2d812f1d02
commit
a07062d10d
@ -93,6 +93,10 @@ function Register-Cmder(){
|
|||||||
New-ItemProperty -Path "HKCR:\Directory\Background\Shell\Cmder" -Force -Name "NoWorkingDirectory"
|
New-ItemProperty -Path "HKCR:\Directory\Background\Shell\Cmder" -Force -Name "NoWorkingDirectory"
|
||||||
New-Item -Path "HKCR:\Directory\Background\Shell\Cmder\Command" -Force -Value "`"$PathToExe`" `"$Command`" "
|
New-Item -Path "HKCR:\Directory\Background\Shell\Cmder\Command" -Force -Value "`"$PathToExe`" `"$Command`" "
|
||||||
}
|
}
|
||||||
|
End
|
||||||
|
{
|
||||||
|
Remove-PSDrive -Name HKCR
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Unregister-Cmder{
|
function Unregister-Cmder{
|
||||||
@ -105,6 +109,10 @@ function Unregister-Cmder{
|
|||||||
Remove-Item -Path "HKCR:\Directory\Shell\Cmder" -Recurse
|
Remove-Item -Path "HKCR:\Directory\Shell\Cmder" -Recurse
|
||||||
Remove-Item -Path "HKCR:\Directory\Background\Shell\Cmder" -Recurse
|
Remove-Item -Path "HKCR:\Directory\Background\Shell\Cmder" -Recurse
|
||||||
}
|
}
|
||||||
|
End
|
||||||
|
{
|
||||||
|
Remove-PSDrive -Name HKCR
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Download-File {
|
function Download-File {
|
||||||
|
Loading…
Reference in New Issue
Block a user