PDA

Click to See Complete Forum and Search --> : Launching Apps from a remote machine


sandeep_id
May 3rd, 2002, 06:45 AM
I've a LAN environment in which I've a server called MACHINE_MAIN. My requirement is to run applications in the other machines in the network(MACHINE_A,MACHINE_B etc..) from MACHINE_MAIN and pass some info to those apps. i.e. When I invoke a module in MACHINE_MAIN, it should start applications in the other machines.
Some people suggested me using Winsock ctrl but here I need to have an application running in the other machines all the time listening to a request from MACHINE_MAIN. I dont want that to happen. I want the application (VB app) installed in the other machines to be automatically invoked by the centralised machine, MACHINE_MAIN, but all these applications should run in the respective machines.
What is the best method available to achive the same in VB? All these apps installed in other machines are doing the same job of processing some files. So I need to pass some info to these apps from MACHINE_MAIN. Can I use DCOM? But dont I need to have different DCOM servers for different nodes though all the nodes are doing the same operation? Can I install the same copy of servers in different nodes and call them from MACHINE_MAIN?

eg.

Dim objTestA as Test.TestClass
Dim objTestB as Test.TestClass

Set objTest=CreateObject"Test.TestClass","Machine_A")

Set objTest=CreateObject"Test.TestClass","Machine_B")

Can I do like this? What are the steps I should take care of while installing "Test.TestClass" in MACHINE_MAIN.
It's very urgent. Hope someone would lend his helping hand soon. Thanx in advance.
Sandeep

Edneeis
May 3rd, 2002, 10:20 AM
DCOM could get you to use a dll or what not that isn't stored locally on that computer but it wont start an application on that other computer (at least the application wont be running there). If I call a shell or use a dll that is located on another computer it still executes on the computer that called it. You'd have to find a way to get the computer you want to run it to start it up, that is probably why people suggested Winsock. Good luck.

sandeep_id
May 3rd, 2002, 10:31 AM
Can I use winsock to start an application that's running in a remote machine? I mean if I send a request from Machine_MAIN can it anyway start the app running in Machine_A? Can you suggest me any API call and its usage to invoke an app remotely?

Edneeis
May 3rd, 2002, 10:47 AM
The winsock method works like this you have a small server app running on MACHINE_MAN and all the other 'client' machines run a small client app (all the time). When MACHINE_MAN wants to run an application on another computer it just sends a message from the server app to the client app telling it any info it needs and what to start. Then the client app fires a shell or shellexecute statement to execute the application ON the remote computer. Since the client app is running on the remote computer and it is the one starting the app then the app will run on the remote computer. If there is anyother way then I don't know what it is.

ChiefRB
May 4th, 2002, 06:11 AM
Just FYI - check out my sig for all things winsock. :D