Re: Time Log
- From: "AuGuR" <SeanFromIT@xxxxxxxxx>
- Date: 20 Jun 2006 07:38:27 -0700
Thank you, but all of these potential solutions have been checked. Are
there alternative methods for remote execution of scripts?
santhosh wrote:
Hey .
for ur problem i cane to know the following points..Pls go through the
points and do needfull changes
This error code, 800A01AD usually occurs when you execute a VBScript.
My first suggestion is that there is a typo of an object or method in
your script. A wild guess, you could be creating an ADODB.Connection.
A message box like this. The script does execute as you hoped. One
possibility is that you are trying to open an ADO connection.
Your VBScript contains an illegal method, probably a typing mistake, an
extra letter. Check the logic of your METHOD statement. Note Source:
Microsoft VBScript runtime error.
For trickier problems, particularly with the COM part of .ASP, check
that you are not missing .DLL files, or that they need to be registered
with RegSvr32
Check the spelling of your objects and methods. Look for clues
particularly the Line: number and check the Char: references. In the
example it is Line 1. Char : 1. In this case it is not Char 1 to
blame, more that there is something wrong and none of the line can
execute. In the case of runtime errors you can use this work around.
Add this line: On Error Resume Next.
AuGuR wrote:
Hi guys,
I'm trying to write a simple "get server time" script. The script would
in effect "ping" all of the servers on my network and compile a report
of what each server's local system time is. I have the script working
locally, but I can't get remote execution of the script working. Any
ideas would be appreciated! I've tried the typical way as well as a few
other ways but none work:
The time log script:
'********************************************************************
' TimeLog:
' Records the system name and time and writes them to a text file.
'********************************************************************
Dim objFileSystem, objOutputFile
Dim strOutputFile
Set objWshNet = CreateObject("Wscript.Network")
objWshNet.MapNetworkDrive "T:", "\\logmachine\time"
On Error Goto 0
strOutputFile = "T:\logs\timelog.txt"
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objOutputFile = objFileSystem.OpenTextFile(strOutputFile, 8, true)
Set objNetwork = Wscript.CreateObject("Wscript.Network")
objOutputFile.WriteLine(objNetwork.ComputerName & " " & Date & " " &
Time)
objOutputFile.Close
Set objFileSystem = Nothing
objWshNet.RemoveNetworkDrive "T:", True, True
On Error Goto 0
WScript.Quit(0)
The remote execution script:
Dim Controller, RemoteScript
Set Controller = WScript.CreateObject("WSHController")
Set RemoteScript =
Controller.CreateScript("O:\tools\time\test.vbs","remotemachinename")
WScript.ConnectObject RemoteScript, "remote_"
RemoteScript.Execute
Do While RemoteScript.Status <> 2
WScript.Sleep 100
Loop
WScript.DisconnectObject RemoteScript
Sub remote_Error
Dim theError
Set theError = RemoteScript.Error
WScript.Echo "Error " & theError.Number & " - Line: " & theError.Line
& ", Char: " & theError.Character & vbCrLf & "Description: " &
theError.Description
WScript.Quit -1
End Sub
Sub remote_End
WScript.Echo "Ended Successfully"
End Sub
I've already tried all of the fixes like the Remote registry entry etc.
The servers are Windows Server 2003 Standard Edition. The exact error
is: 800A01AD ActiveX component can't create object.
Thanks,
Sean Feeney
.
- References:
- Time Log
- From: AuGuR
- Re: Time Log
- From: santhosh
- Time Log
- Prev by Date: Re: descript.ion to description
- Next by Date: Re: Where did cwashington.netreach.net go?
- Previous by thread: Re: Time Log
- Next by thread: Re: html vb script checkbox
- Index(es):
Relevant Pages
|