我正在尝试使用命令行在本地计算机和服务器上运行此vbscript(.vbs)代码。 它在我的本地计算机上正常工作,但在服务器上没有。 我收到了Object Required Error:
Option Explicit
Private objFSO, objShell
Private strHome, strHomeFolder, strUser, objNetUser
Private objConnection, objCommand, objRecordSet
Call Main
Sub Main()
Set objConnection = CreateObject("ADODB.Connection") ' open connection to access and manipulate DB
objConnection.Open "Provider=ADsDSOObject;" 'provider name OLE DB provider in ADSI
If Err.Number<>0 Then
WScript.Echo FormatDateTime(Now()) & " - Error : " & Err.Description
Err.Clear
Exit Sub
End If
....