Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Remote Execution of Winbatch - Like rsh

Keywords:     Remote Execution	  autorun.inf

Question:

I need to run have Winbatch executed by the server. Something like what rsh does. I can not run the exe's from the clients. They must stay on the server and the server must start the clients execution of the exe's.

Answer:

You are talking server initiated. However, this is usually in response to something happening between server and client workstation, such as logging onto the server, (server script running), or accessing a drive, or running a program or every hour on the hour.
  1. Have a small script in a loop with a small TimeDelay continuously running on the web server. This program looks at some directory on a regular basis, and when it see some kind of "flag" file appear, then the script delays a little bit, then deletes the flag file then runs the desired code.

  2. Using the AT command (or the SOON command from the NT Resource kit) you can run a script sort of as a service, but not really, on the remote machine whenever you want. As long as you do not have to do SendKeys or some other interactive operation, then this may be a choice.

  3. Write a native Winbatch service running continuously on the remote machine. You can control this service from your own machine via the NT Network extender service control functions. (wntSvcControl and assorted friends)

  4. If it is something that happens on login, then you can add the winbatch to the server script, which the workstation will run from the server when the script is processed.

  5. If it is an hourly thing, then you can start a winbatch script during the login process, and it remains idle until it detects the top of the hour, etc.

  6. If it is accessing a drive, there are some neat ways of having an "autorun.inf" on the root of that drive that can start a winbatch script, etc.

  7. The workstation runs the script, but it runs from the server, and the choice of the initializing condition is yours in writing the winbatch script.

Article ID:   W13493
Filename:   Remote Launch of Winbatch.txt