View Single Post
Old 06-22-2009   #2 (permalink)
Pegasus [MVP]


 
 

Re: Calling a VBScript from Access


"DetRich" <DetRich@xxxxxx> wrote in message
news:9B513BBF-7B27-4C9A-98CC-DCE228526A31@xxxxxx
Quote:

> Hello,
>
> I have an Access application from which I need to call a vbscript which
> will
> ping a server and display results to the user.
>
> In Access, a form displays a record. This record has the hostname of a
> server. When clicking the "Ping Server" command button, the vbscript
> should
> be called.
>
> I need to know how to pass the hostname of the server to the ping command.
> Can anyone help me understand how to pass this hostname to the script so
> that
> the correct server is returned? The script can either interpret the
> results
> and display a success or fail message or the results of the ping can be
> written to a file and the script can read the file, then display the
> results.
>
> TIA,
> DetRich
Why not call ping.exe directly from Access, then pick up the ErrorLevel:
cmd /c ping RichServer | find /i "bytes=" >nul


My System SpecsSystem Spec