April 18, 2024, 04:15:05 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


SYSTEM command problem

Started by 3Dpdk, February 18, 2008, 07:32:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

3Dpdk

February 18, 2008, 07:32:35 AM Last Edit: February 18, 2008, 07:36:48 AM by 3Dpdk
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





REDEBOLT

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
Regards,
Bob

3Dpdk

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.

REDEBOLT

Regards,
Bob