Here we go. What I've done is create two Visual Basic Scripts, both of which will run on every computer that's running Maxwell Server.
The first script - MW Server Monitor - will detect whenever Maxwell Server (MWS) closes, and opens up a new instance of it automatically.
The second Script - MW Network Monitor - will determine when all instances of MWS and Maxwell Render (MWR) need to be closed out. A total network purge of MWR & MWS can be done from any computer running this script.
There are several steps that need to be taken in order for this to work on your network.
STEP 1: On each computer you want to run MWS,
you need to copy the mxcl.exe file and rename it mxcls.exe (keeping it in the same folder). You should also modify the shortcut used to open MWS to ensure this is the file always being used to run MWS (all you have to do is add the additional 's' to the mxcl.exe in the [Target] section of the shortcut).
The reason for this is because the same executable (mxcl.exe) is used to run the Renderer, Server, and Manager, so all three show up in the Task Manager as mxcl.exe. By having a copy named differently, the script will be able to differentiate between MWR & MWS.
STEP 2: You need to create a new folder somewhere on a shared, network drive. In my case, I created a [MaxwellServers] folder on my drive that holds all of my textures - all computers should be able to see this drive. Your path should look something like this:
\\Dualdual\Dualie Files\MaxwellServers\
This is the folder where you will place both scripts, so they can be run from all computers without having to copy them onto every single one manually. This folder is also used to hold some text files. I'll explain later what these text files do.
STEP 3: Now you need to extract the two scripts into the folder you created above. This would be a good time to go ahead and create shortcuts for both scripts, and a copy of the main MWS shortcut into your Startup folder on all of your render farm computers. this way, all three will start automatically when the system boots up. (The files can be downloaded from the link at the end)
STEP 4: Now, you will need to do a little editing of the scripts so they know where your new folder is located. You will need to do this step for both scripts.
First, right-click on one of the scripts and select Edit. This will open up the script in Notepad. Near the top you will see this line:
MyPath = "\\Dualdual\Dualie Files\MaxwellServers\"
You will need to put your full UNC path of the directory you created in step 2 in between the quotation marks (make sure you don't forget the end slash).
Save, Close, and repeat for the other script.
STEP 5: Now you are ready to test everything. On a couple of your computers, go ahead and run MWS (using your new shortcut) and the two scripts (double-clicking on them will get them going). On each computer, a couple of MSIE windows will pop up (see image below).
Now, if you open up the shared folder you created, you will see a couple of text files there. Their file names should match the names of each computer that has these scripts running. If they are not there, or you get an error, you probably typed your UNC path incorrectly, or the folder/drive is not mapped on all of your computers.
If every thing is working correctly, whenever you close out MWS, another instance should open up.
Let me now explain what these text file are for. Whenever you run either of the scripts, it will look in this folder to see if there is a file named after the computer it's running on. If it's not there, it will create one. There's nothing in the file itself - It's the presence and the file name that is important. While the MW Network Monitor (MNM) is running, it is periodically checking to see if this file is still present. If it is not there, that is it's signal to close out every instance of MWR and MWS.
When you click on the [Kill All Network Processes] button, all of these text files are deleted from the shared folder. When each computer on your renderfarm detects that it's identifying file is no longer there, it will go through it's refresh subroutine. Even if you have a hundred instances of MWR or MWS, all will be shut down. From here, the MW Server Monitor will take over, and open up a new instance of MWS.
Overall, you will have around a 40 MB commit charge (between the scripts and the two instances of IE) against your memory. It will have practically no processor footprint, so all of that can be dedicated to the rendering process.
When version 1.5 is released, and if it's 64 bits, I'll have to re-test this to see if it still works. But I have tested this on XP and XP64 without any problems.
NOTE: When closing the two IE windows, you should always use the Close Monitor buttons. If you click on the X, the VB scripts will not be killed, and will still be listed in your Task Manager.
If you are using a single computer to do all of your work, and are not using it as a server, you only need to run the MW Network Monitor whenever you want to refresh you network. It does not need to be running all of the time.
Hopefully this will work for everyone. If anybody has any suggestions for improving these, please feel free to let me know.
The scripts can be downloaded from the link below.
http://www.divshare.com/download/686665-120
Enjoy!
.