-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.vbs
30 lines (22 loc) · 1.03 KB
/
sample.vbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'******************************************************************************
'* File: <scriptname>.vbs
'* Author: <my initials>
'* Date: <created>
'* Purpose: <major task perform by this script>
'*
'* Rev-Info: <date>/<author>, <bugfix>
'******************************************************************************
OPTION EXPLICIT
Execute library( "lib-utility-1.0.4.vbs")
'---BEGIN--------------------------------------
logger left(getScriptName(),len(getScriptName())-4)&".log" : msgLog "" '-- blank line
msgLog "Running... ("&getScriptName()&")"
'<YOUR SCRIPT GOES HERE>
'-- fini
ExitProcess Null, 0
'---END----------------------------------------
'-- Import library into memory (2006.07.21/1.0.0/RRR)
Function library( ByVal libname)
dim libf:set libf=CreateObject("Scripting.FileSystemObject"):if not libf.fileExists(libname) then wscript.stdOut.write " Error: Could not locate library: "&libname:WScript.Quit( 1)
library=libf.OpenTextFile(libname,1).ReadAll()
End Function