Using the SHELL Command, I am having serious trouble in getting this "Command Line" to work from within my script,
A simple MENU type script asking for particular information then sends the info to the command line.

It creates a LOOP process at the command prompt, and the Token is added to from the information in the '(workstations.txt)' file until it reaches the end of the file. It calls the particular program to RUN each time it finished the previous item in the file. This works PERFECTLY on the command line, but I NEED to get to run from an option on a menu style script I am writing. I either get:

"Not recognized internal/file error" or It does nothing.

*** ACTUAL COMMAND LINE USAGE ***

for /F "tokens=1" %i in (workstations.txt) do call vnc7 %i /user username password /log /ultra

**********************************

ANY Help would be greatly appreciated, This Site and Kixtart is the BEST application I use in my Organization for LOCKING down my Computers!


I have looked and searched, but have had NO luck in getting that line to work with either using the CHR(34), Triple Quotes, anything I can think of.. The Shell Command Line is in the above post.

This is the results I get from this code:
Code giving the error below:

*************************************
Shell $CMD + "c:\fastpush\for /F " + "tokens=1" + " %i in ($WSListing) do call vnc7 %i /user $AdminUser $AdminPW /log /ultra"
*************************************
ERROR MESSAGE:
'c:\fastpush\for' is no
t recognized as an internal or external command,
operable program or batch file.

This is an Advanced CMD Command "for" in the CMD Compspec. It runs a Batch file as well. The "TOKENS=1" Must be in Quotes inside the command line as well, while the other instructions are VARs from Kixtart and command line switches.

I have gone and read the FAQs, but I am sure I am not doing something right.

Also, from what I have found was that the ' %1' part needed to be '%%1' to be used in a called batched file, not as an actual command at the prompt. I still get the same error as above. I am trying to figure out How to put the QUOTES around the '"tokens=1"' area with the rest of the command, is that possible?