Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / April 2005

Tip: Looking for answers? Try searching our database.

Remote Shell Call

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lee Newson - 12 Apr 2005 15:02 GMT
Hi

I have a form that is required to gather some information programmatically
from one of our inhouse systems.  The only hook-ins to this system are via
Remote Shell calls.

I am using JScript to do any custom coding for the form and i have
successfully managed to create the shell object and run the command, however
i do not know how i can get the data that is returned...

When i run the command in a command window the data is returned on the next
line, but i cannot seem to find a way to get this data when running it via
JScript.

Has anyone tried this or does anyone know how this can be done??

Cheers for any and all help, it is greatly appreciated.

Regards

Lee
Lee Newson - 12 Apr 2005 15:41 GMT
Done it!!

In case anyone needs to know i used the following

var Shell = new ActiveXObject("WScript.shell");
var strCMD = "your cmd";
var oExec = Shell.Exec(strCMD);
var oExecOut = oExec.StdOut;

var input = "";
input = oExecOut.ReadAll();

> Hi
>
[quoted text clipped - 17 lines]
>
> Lee
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.