Computing.Net > Forums > Programming > Passing parameter to exe file

Passing parameter to exe file

Reply to Message Icon

Original Message
Name: hamid reza
Date: December 5, 2002 at 23:57:40 Pacific
Subject: Passing parameter to exe file
OS: win98
CPU/Ram: 500 celeron/256 spectec
Comment:

I want to pass a parameter(this parameter determine pdf file location)to exe file(that convert pdf to text file)in my application in delphi. Please help me how can do this work?

Thanks.
Hamid reza


Report Offensive Message For Removal

Response Number 1
Name: lupo
Date: December 6, 2002 at 01:09:57 Pacific
Subject: Passing parameter to exe file
Reply: (edit)

to pass parameters to an exe you use ParamStr(n) and ParamCount (use delphi help).
If you don't want to use DOS command prompt to pass the parameters use a shortcut, and then right click, and add your parameters in the target (target: C:\xx\xxx.exe -x xx.pdf)


another way to do what you want is to read the file name from an ini file, or (for what i think you should do) use OpenDialog class (windows standard window for opening files)

Hope this helps.

lupo


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Passing parameter to exe file

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software