Vbscript WShell.Run返回143

Vbscript WShell.Run返回143,vbscript,Vbscript,我使用WShell.Run从VB脚本调用java代码。它返回代码143。这是什么意思?在哪里可以获得运行方法可以返回的错误代码列表?此代码由java应用程序返回。从 下面的VBScript代码执行相同的操作,只是它指定窗口类型,等待用户关闭记事本,并在关闭记事本时保存从记事本返回的错误代码 以下是对的参考 错误\u相同\u驱动器143(0x8F)系统无法加入或替换 驱动器到或用于同一驱动器上的目录 p.S.我认为接下来的注释是不可能的,但以防万一 需要注意的是,对于大多数代码,Err对象都有“d

我使用WShell.Run从VB脚本调用java代码。它返回代码143。这是什么意思?在哪里可以获得运行方法可以返回的错误代码列表?

此代码由java应用程序返回。从

下面的VBScript代码执行相同的操作,只是它指定窗口类型,等待用户关闭记事本,并在关闭记事本时保存从记事本返回的错误代码


以下是对的参考

错误\u相同\u驱动器143(0x8F)系统无法加入或替换 驱动器到或用于同一驱动器上的目录

p.S.我认为接下来的注释是不可能的,但以防万一

需要注意的是,对于大多数代码,
Err
对象都有“dummy”
Description
(未知运行时错误)。如果您希望获得包含所有合理描述的筛选列表,可以执行以下操作:

With CreateObject("InternetExplorer.Application")
    Const DUMMY = "Unknown runtime error"
    ReDim aryLines(15999)
    Dim cnt, i, w, h
    cnt = -1

    .Navigate "about:blank"
    .Document.Title = "Error Codes " & String(100, Chr(1))
    .ToolBar        = False
    .Resizable      = True
    .StatusBar      = False
    .Width          = 420
    .Height         = 380

    With .Document.ParentWindow.Screen
        w = .AvailWidth
        h = .AvailHeight
    End With
    .Left = (w - .Width ) \ 2
    .Top  = (h - .Height) \ 2

    Do While .Busy : WScript.Sleep 200 : Loop

    On Error Resume Next
    With Err
        For i = 1 To 15999
            .Raise i
            If .Description <> DUMMY Then
                cnt = cnt + 1
                aryLines(cnt) = AddZero(i) & .Description
            End If
            .Clear
        Next
    End With
    On Error GoTo 0

    ReDim Preserve aryLines(cnt)
    .Document.Body.InnerHTML = "<pre id=x>" & Join(aryLines, vbNewLine)
    .Document.Body.Style.overflow = "auto"
    .Document.All.X.Style.fontFamily = "Verdana, sans-serif"
    .Visible = True
End With

Function AddZero(nVar)
    AddZero = "<b>" & Right("00000" & nVar, 5) & "</b> "
End Function
使用CreateObject(“InternetExplorer.Application”)的

Const DUMMY=“未知运行时错误”
雷迪姆芳基线(15999)
Dim-cnt,i,w,h
cnt=-1
.导航“关于:空白”
.Document.Title=“错误代码”和字符串(100,Chr(1))
.ToolBar=False
.resizeable=True
.StatusBar=错误
.宽度=420
.高度=380
With.Document.ParentWindow.Screen
w=.AvailWidth
h=.AvailHeight
以
.Left=(宽-.Width)\2
.Top=(h-.Height)\2
Do While.Busy:WScript.Sleep 200:Loop
出错时继续下一步
出错
对于i=1至15999
1.加薪1
如果。那么
cnt=cnt+1
芳基线(cnt)=添加零(i)和说明
如果结束
清楚的
下一个
以
错误转到0
雷迪姆保留芳基(cnt)
.Document.Body.InnerHTML=”“&Join(aryLines,vbNewLine)
.Document.Body.Style.overflow=“自动”
.Document.All.X.Style.fontframy=“Verdana,无衬线”
.Visible=True
以
函数AddZero(nVar)
AddZero=“”&右(“00000”和nVar,5)和“
端函数

With CreateObject("InternetExplorer.Application")
    Const DUMMY = "Unknown runtime error"
    ReDim aryLines(15999)
    Dim cnt, i, w, h
    cnt = -1

    .Navigate "about:blank"
    .Document.Title = "Error Codes " & String(100, Chr(1))
    .ToolBar        = False
    .Resizable      = True
    .StatusBar      = False
    .Width          = 420
    .Height         = 380

    With .Document.ParentWindow.Screen
        w = .AvailWidth
        h = .AvailHeight
    End With
    .Left = (w - .Width ) \ 2
    .Top  = (h - .Height) \ 2

    Do While .Busy : WScript.Sleep 200 : Loop

    On Error Resume Next
    With Err
        For i = 1 To 15999
            .Raise i
            If .Description <> DUMMY Then
                cnt = cnt + 1
                aryLines(cnt) = AddZero(i) & .Description
            End If
            .Clear
        Next
    End With
    On Error GoTo 0

    ReDim Preserve aryLines(cnt)
    .Document.Body.InnerHTML = "<pre id=x>" & Join(aryLines, vbNewLine)
    .Document.Body.Style.overflow = "auto"
    .Document.All.X.Style.fontFamily = "Verdana, sans-serif"
    .Visible = True
End With

Function AddZero(nVar)
    AddZero = "<b>" & Right("00000" & nVar, 5) & "</b> "
End Function