|
Dim Ie,WshShell
Dim strPath
Set Ie = CreateObject("InternetExplorer.Application")
Ie.Navigate( "about:blank" )
Ie.document.getElementsByTagName("BODY")(0).innerHTML = "<INPUT id=FilePath type=file>"
Ie.document.getElementById("FilePath").click
if ie.document.getElementById("FilePath").value = "" then
WScript.Echo "ファイルは選択されませんでした"
WScript.Quit
end if
strPath = ie.document.getElementById("FilePath").value
Ie.Quit
Set Ie = Nothing
Set WshShell = WScript.CreateObject("WScript.Shell")
' ****************************************************
' View Source Editor キーが無ければ作成します
' ****************************************************
WshShell.RegWrite _
"HKLM\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\", _
Empty
WshShell.RegWrite _
"HKLM\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name\", _
"""" & _
strPath & _
""""
MsgBox( "書き換えが終了しました" )
| |