⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fsolib.vbs

📁 Apress - Managing Enterprise Systems With The Windows Script Host Source Code
💻 VBS
字号:
'fsolib.vbs
'Description: Contains routines used by FSO scripts

'check if script is being run interactively
'Returns:True if run from command line, otherwise false
Function IsCscript()

 If strcomp(Right(Wscript.Fullname,11),"cscript.exe",1)=0 Then 
   IsCscript = True
 Else
   IsCscript = False
 End If
End Function

'display an error message and exist script
'Parameters:
'strMsg        Message to display
'strUseWscript Use Wscript.Echo to display message. 
'   By default StdErr is used, but this cannot be used in 
'   interactive (wscript) mode.
Sub ExitScript(strMsg, strUseWscript)
 Dim objErr
 If strUseWscript Then
  Wscript.Echo strMsg 
 Else
  'get the standard error stream
  Set objErr = Wscript.StdErr
  objErr.Write strMsg
  objErr.Close
  Set objErr = Nothing
 End If 
 Wscript.Quit -1
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -