'********************************************************************
'*
'* Function fsoInitialize
'*
'* Author: NetworkAdminKB.com
'* Created: 2007-01-02
'* Modified: 2007-01-02
'*
'* Purpose: Create the File System Object (FSO) and check for errors.
'*
'* Input: objFSO: The File System Object name to return.
'* intError: The errorlevel code to return when exiting. (Optional)
'* blnQuit: A boolean value that incates to quit the script or not.
'* True = Quit Script
'* False = Continue
'*
'* Output: Return a Boolean indicating if the FSO was created successfull.
'* True = Success creating FSO
'* False = Error creating FSO
'*
'* Calls:
'* CommonErrorHandler
'*
'* Changes:
'* 2007-01-02: Replaced fsoErrorHandler with CommonErrorHandler
'********************************************************************
Function fsoInitialize(ByRef objFSO, ByVal intError, ByVal blnQuit)
'Version: 1.1 2007-01-02
On Error Resume Next
Set objFSO = CreateObject("Scripting.FileSystemObject")
If CommonErrorHandler("while creating FileSystemObject.", "fsoInitialize", _
intError, blnQuit) Then
fsoInitialize = False
Else
fsoInitialize = True
End If 'CommonErrorHandler
On Error Goto 0
End Function 'fsoInitialize
Article ID: 393, Created On: 9/25/2011, Modified: 9/25/2011