Option Explicit ' vbs_inc.vbs of vbs_inc.vbs ' vbslib ver3.00 Sep.22, 2009 ' Copyright (c) 2008-2009, T's-Neko at Sage Plaisir 21 (Japan) ' All rights reserved. Based on 3-clause BSD license. '// Set g_vbslib_path=(this script full path) before including this script. Dim g_vbslib_path, g_vbslib_folder Dim g_sh :If IsEmpty(g_sh) Then Set g_sh=WScript.CreateObject("WScript.Shell") Dim g_fs :If IsEmpty(g_fs) Then Set g_fs=CreateObject( "Scripting.FileSystemObject" ) If IsEmpty(g_vbslib_path) Then _ Err.Raise 1,,"vbs_inc needs other script using vbslib header" g_vbslib_folder = g_fs.GetParentFolderName( g_vbslib_path ) + "\" Dim g_Vers Const g_vbslib_default_ver = 2.0 If IsEmpty( g_Vers ) Then _ Set g_Vers = CreateObject("Scripting.Dictionary") : g_Vers.Add "vbslib", g_vbslib_default_ver If not g_Vers.Exists("vbslib") Then g_Vers.Add "vbslib", g_vbslib_default_ver If g_Vers.Item("vbslib") = 3.0 Then g_vbslib_path = g_vbslib_folder + "vbslib300\vbs_inc_300.vbs" If g_Vers.Item("vbslib") = 2.0 Then g_vbslib_path = g_vbslib_folder + "vbs_inc_200.vbs" If g_Vers.Item("vbslib") = 0.0 Then g_vbslib_path = g_vbslib_folder + "vbslib000\vbs_inc_000.vbs" If not g_fs.FileExists( g_vbslib_path ) Then Err.Raise 1,,"[ERROR] Not found " + g_vbslib_path Dim g_f : Set g_f = g_fs.OpenTextFile( g_vbslib_path ) Execute g_f.ReadAll() g_f = Empty