(no subject)
Sep. 24th, 2011 07:32 amВо, учитесь, дети, как MVP надо зарабатывать: http://portal.sivarajan.com/2011/07/add-employee-idpowershell-script.html
Function ErrorHandler (strName, OK, Fail, Way, Force) strErrNum = Err.Number strErrDesc = Err.Description Err.Clear If strErrNum Then Select Case Way Case "Display" WScript.Echo strName & strSplitter & Fail WScript.Quit Case "Log" WriteLog strName & strSplitter & Fail & strSplitter & strErrNum & strSplitter & strErrDesc ErrorHandler = "Quit" End Select Else If Force Then strErrNum = "OK" Select Case Way Case "Display" WScript.Echo strName & strSplitter & OK ErrorHandler = "Quit" Case "Log" WriteLog strName & strSplitter & OK & strSplitter & strErrNum ErrorHandler = "Quit" End Select End If End If End Function