I have an interesting puzzle with the SYSTEM command. I'm not sure I can actually do what I need to do.
I'm writing a file manager for the content providers for a particular game program. All content must be run through a separate "validation" program that generates a key number for that content in order for it to work in the game. (part of the protection scheme)
The task:
To launch the "validation" EXE from the file manager using the SYSTEM command
The problem:
The exe is normally launched using a short-cut PIF with 3 parameters in the target field of the shortcut
The format of this information in the shortcut:
"c:\directory\subdirectory\validation filename.exe" "model.x" "c:\directory\subdirectory\folder to save the resulting file"
I have tried putting the first string in run$; the second in a$; third in b$
then
SYSTEM run$, a$ + b$
This runs the exe but apparently the second and third parameters are not passed the same way as the short-cut passes them because the resulting file never showes up. Normally, when run using the short-cut, a file named the second parameter (model.x_result) is saved in the folder indicated in the third parameter.
I also tried: q$=chr$(34): a$= " "+q$+"model.x"+q$+" " to simulate the necessary spaces and quotations required in the short-cut.
Is there a way to pass the 2nd and 3rd parameters properly with the SYSTEM command?
Is there a way to run the validation by calling the short-cut?
Should I turn off the computer and go out for drinks instead? ;D
openconsole
run$="c:\directory\subdirectory\validation filename.exe"
a$="model.x"
b$="c:\directory\subdirectory\folder to save the resulting file"
print run$,a$+b$
print
print run$+", "+a$+" "+b$
do:until inkey$<>""
closeconsole
end
That's too simple of an answer!!!!
I can't for the life of me figure out why I didn't think to open a console window and run the thing from there.
Thank you Redebolt. This solved my problem and now we have a way to do "batch" validations as apposed to doing it one model at a time. (sometimes several hundred x files.
Thanks again.
You're Welcome. 8)