Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maybe I Don't Need DCOM

Status
Not open for further replies.

jasonp45

Programmer
Aug 23, 2001
212
US
Or maybe I don't need DCOM at all?

Here is *exactly* what I want to do:

In my code, I am moving a file around, writing its properties to a database, etc. After I've moved the file to a remote machine on my intranet, I want to have DataJunction (a data-transformation product) execute on the remote machine. I can execute DataJunction via the command line (I typically use the WScript.Shell Run method) and pass it a filename, etc - works fine. But it runs on the local machine. I want the DataJunction located on the remote machine to execute, in as simple a fashion as possible.
 
Basically, you can use any technology that talks to a process running on the remote machine, telling it what you want to do.

This can be DCOM. Or, you can also do something like have an NT Service that listens on a communications port (TCP or named-pipes). Or even calling a stored-procedure in a database server that executes an external process.

Of these approaches, DCOM is probably the easiest, but the most sensistive to security.

Chip H.
 
Seems to me there are a couple options if you want easy and straightforward.

If these are NT systems (NT 4.0, Win2K, WinXP) you can use the "AT" command to invoke remote command scheduling:

C:\>
at \\doxie 18:00 "c:\Program Files\Wojis\Wojis.exe"

This schedules the "wojis" program at computer "doxie" to run once at 6 PM. If 18:00 has already passed, it will be run tomorrow at 6 PM, so don't rush things using "AT" - give yourself enough leeway that you don't miss your target.

As far as I can tell you have to give the time to start, there is no "run now" per se - this is really a scheduling facility.

If you have WinXP, there is also the much more flexible "SCHTASKS" command. This is basically a superset of "AT" and lets you predefine jobs and then run them immediately or schedule them for future or periodic execution.

With all "NTs" there is the RCMD/RCMDSVC utility pair ("remote command"). This must be acquired from the Windows NT Resource Kit and installed on the local machine (RCMD) and the remote machine (RCMDSVC). This offers a facility somewhat like the Unix rexec/rexecd utility pair. NT has rexec for use against a Unix server, but there is no rexecd included with NT.

Or finally, as Chip H. suggests, there are a hundred ways to roll your own, but make sure you build in the necessary security if you do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top