01.
<JOB>
02.
<COMMENT>
03.
************************************************************
04.
WEB WSH 実行スケルトン
05.
************************************************************
06.
</COMMENT>
07.
08.
<COMMENT>
09.
************************************************************
10.
外部スクリプト定義
11.
************************************************************
12.
</COMMENT>
13.
<SCRIPT
14.
language=
"VBScript"
15.
src=
"http://lightbox.in.coocan.jp/laylaClass.vbs"
>
16.
</SCRIPT>
17.
18.
<SCRIPT language=VBScript>
19.
20.
Set
obj = Wscript.CreateObject(
"Shell.Application"
)
21.
if Wscript.Arguments.Count = 0 then
22.
obj.ShellExecute
"wscript.exe"
, WScript.ScriptFullName &
" runas"
,
""
,
"runas"
, 1
23.
Wscript.Quit
24.
end if
25.
26.
27.
28.
29.
Call
laylaFunctionTarget(
"http://lightbox.in.coocan.jp/"
)
30.
Call
laylaLoadFunction(
"baseFunction.vbs"
)
31.
Call
laylaLoadFunction(
"wmiReg.vbs"
)
32.
Call
laylaLoadFunction(
"toolFunction.vbs"
)
33.
34.
35.
36.
37.
strValue = OpenLocalFileName
38.
if strValue =
""
then
39.
Wscript.Quit
40.
end if
41.
42.
43.
44.
45.
strPath =
"SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name"
46.
Call
WMIRegCreateKey( HKEY_CURRENT_USER, strPath )
47.
strValue = Dd( strValue )
48.
Call
WMIRegSetStringValue( HKEY_CURRENT_USER, strPath, Empty, strValue )
49.
50.
MsgOk( strValue &
" を IE のソースエディタとして登録しました"
)
51.
52.
Function
OpenLocalFileName( )
53.
54.
Call
GetObj(
"IEDocument"
,
"InternetExplorer.Application"
)
55.
IEDocument.Navigate( ScriptDir( ) &
"\local.htm"
)
56.
IEDocument.document.getElementsByTagName(
"BODY"
)(0).innerHTML =
"<input id=FilePath type=file>"
57.
IEDocument.document.getElementById(
"FilePath"
).click
58.
if IEDocument.document.getElementById(
"FilePath"
).value =
""
then
59.
OpenLocalFileName =
""
60.
IEDocument.Quit
61.
Set
IEDocument =
Nothing
62.
Exit
Function
63.
end if
64.
65.
OpenLocalFileName = IEDocument.document.getElementById(
"FilePath"
).value
66.
67.
IEDocument.Quit
68.
Set
IEDocument =
Nothing
69.
70.
End
Function
71.
</SCRIPT>
72.
</JOB>