Author: Daniele Cerfeda
1. Program description:
This script written in vbs can be used to remotely control a server usinf a text file to be copied in shared folders (e.g. Dropbox).
The paramethers used in the executables you wish to launch are to be inserted in the text files. Obviously, said programs have to be already installed in the server and support the launching via a command line.
2. Configuration file description:
The configuration file RemoteOp.xml has to be copied in the same folder of the script RemoteOp.vbs.
To insert a new program that the RemoteOperator has to execute, you just have to insert a XML node with the following paramethers:
- Program: Insert program name and description in the "Name" and "Desc" field;
- SourceFolder: This folder will keep the file containing the paramethers to be executed; this folder has to be remotely accessible (otherwise you'll lose the meaning of this program). The use of Dropbox or similar services is suggested, in order to make it usable via web;
- DoneFolder: In this folder you could move the elaborated files; they will be renamed: the date in which the script wa executed will appear before the file name using the YYYYMMDDHHMMSS format;
- FileName: Name of the whole extension file, in which the user has to insert the paramethers to be used with the command. You must then insert it in the SourceFolder folder;
- PgmPath: Complete file path, where the to-be-launched program can be found
- Param: paramether list to be passed to the executable; the program will replace the PARAMTOSUBS placeholder with the paramethers read in the FileName file;
- BreakPoint: interpunction used to "split" the text file when the chosen symbol is found; this way, the program can be repeted more than once by passing some paramethers groups (see the examples);
- Delete: if set to N, the file will be moved to the DoneFolder folder, as previously said. Otherwise it will simply be deleted;
Best performances can be obtained scheduling the program through windows planned options.
<Program Name = "JDownloader" Desc = "Impostazioni per JDownloader">
<SourceFolder>C:\Documents and Settings\Administrator\My Documents\My Dropbox\RemoteCtl\JDSource\</SourceFolder>
<Param>-add PARAMTOSUBS -H -d</Param>
In this example, the launched program will be JDownloader and the script needs to find has to be called JDown.txt and has to be in the C:\Documents and Settings\Administrator\My Documents\My Dropbox\RemoteCtl\JDSource\ folder.
Let's assume the JDown.txt file is as following:
the script will launch the following commands:
JDownloader www.link1megaupload.com www.link2megaupload.com www.link3megaupload.com -H -d
JDownloader www.link4megaupload.com -H -d