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.
- 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.
- 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.
- 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)
- 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.
- 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.
- 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.
- 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
File Created: 2002:04:26:12:26:00
Last Updated: 2002:04:26:12:26:00