コメント |
http://winofsql.jp/wsf/setupBatchHelper.wsf
@DIV
<JOB>
<COMMENT>
************************************************************
WEB WSH 実行スケルトン
************************************************************
</COMMENT>
<COMMENT>
************************************************************
外部スクリプト定義
************************************************************
</COMMENT>
<SCRIPT
language="VBScript"
src="http://lightbox.in.coocan.jp/laylaClass.vbs">
</SCRIPT>
<SCRIPT language=VBScript>
' ***********************************************************
' 処理開始
' ***********************************************************
Call laylaFunctionTarget( "http://lightbox.in.coocan.jp/" )
Call laylaLoadFunction( "baseFunction.vbs" )
Call laylaLoadFunction( "toolFunction.vbs" )
Crun2 110
' ***********************************************************
' ダウンロードする URL
' ***********************************************************
strDownloadPlace = "http://winofsql.jp/wsf/lbox.dll"
' ***********************************************************
' ダウンロード
' ***********************************************************
ret = HTTPDownload( strDownloadPlace, SysDir & "\lbox.dll" )
if not ret then
Wscript.Echo ErrorMessage
Wscript.Quit
end if
Wscript.Echo strDownloadPlace & " をダウンロードしました"
' ***********************************************************
' ダウンロードする URL
' ***********************************************************
strDownloadPlace = "http://winofsql.jp/wsf/BatchWsc.wsc"
' ***********************************************************
' ダウンロード
' ***********************************************************
ret = HTTPDownload( strDownloadPlace, SysDir & "\BatchWsc.wsc" )
if not ret then
Wscript.Echo ErrorMessage
Wscript.Quit
end if
Wscript.Echo strDownloadPlace & " をダウンロードしました"
GetWshShell
on error resume next
' インストールされているかどうか
strValue = WshShell.RegRead("HKCR\Lbox.BatchHelper\CLSID\")
if Err.Number = 0 then
' 現在の情報でアンインストール
strValue = "HKCR\CLSID\" & strValue
strValue = strValue & "\InprocServer32\"
strValue = WshShell.RegRead(strValue)
strValue = "regsvr32.exe /u /s """ & strValue & """"
Call RunSync( strValue )
end if
on error goto 0
strValue = "regsvr32.exe """ & SysDir & "\lbox.dll"""
Call RunSync( strValue )
on error resume next
strValue = WshShell.RegRead("HKCR\Lbox.BatchWsc\CLSID\")
if Err.Number = 0 then
' 現在の情報でアンインストール
strValue = "HKCR\CLSID\" & strValue
strValue = strValue & "\ScriptletURL\"
strValue = WshShell.RegRead(strValue)
strValue = "regsvr32.exe scrobj.dll /s /u /n /i:""" & strValue & """"
Call RunSync( strValue )
end if
on error goto 0
' BatchWsc.wsc のインストール
strValue = "regsvr32.exe scrobj.dll /n /i:file://""" & SysDir & "\BatchWsc.wsc" & """"
Call RunSync( strValue )
MsgOk( "処理が終了しました " )
</SCRIPT>
</JOB>
@END
|