レジストリの変更とログ出力

IEのホームボタンを押した時にジャンプするURLを変更するPowerShellスクリプト

$path = "HKCU:\Software\Microsoft\Internet Explorer\Main"
$keyname = "Start Page"
$log = "registry.log"
$in = Read-Host "レジストリーのキーを入力して下さい。"
if(-not [System.String]::IsNullOrEmpty($in)){
Set-ItemProperty $path -name $keyname -value $in
echo "ホームを変更しました。" |
    Out-File $log
}
    • -