Ok, since you have the script ready to do this, and all you need is something that can run through a file list of machine names, try this BAT file:
@echo off
net view >systems.txt
for /f "tokens=1 skip=4 delims=\ " %%a in (systems.txt) do call scriptfile.exe %%a
All that does is it runs a NET VIEW to get the names of all machine names in your Windows domain. It pipes this info to the text file SYSTEMS.TXT
Then, the FOR statement parses the text file, extracts the machine name (removing the "\\" in front of each name), and saves that in the variable %a.
You have to use %% for variables in FOR statements in BAT files.
Once the %a variable contains the machine name, a CALL is done to the name of your script file, and it passes the machine name as a variable.
IF your script file were to run as a BAT file, in your script file you would then be working with %1 as the variable that equals each individual machine name.
hope this helps