*.bat file

Please discuss general Delphi programming topics here.

*.bat file

Postby newbie » January 2nd, 2004, 12:50 pm

Hello, I'm new in delphi.... Help me please :?:

- How to execute a *.bat file or a *.exe
- change the some options in program tab in properties window of a *.bat file. (right-click on a *.bat file -> select Properties -> Go to Program tab: how to change some options in that tab by delphi code, or if you can, please show an example)

Thank you so much!
newbie
Active Member
Active Member
 
Posts: 6
Joined: January 2nd, 2004, 12:13 pm

More

Postby newbie » January 3rd, 2004, 4:53 am

After some actions, I found out that a *.bat file does not store its settings (in properties page), its settings are stored in a *.pif file created after I executed the bat file. Using Nc5, I found that all settings which i changed bat file is stored in that *.pif file. But now, I have no information about the *.pif file or its structure.... In the other hand, to change settings of a bat file, we must know the format or the structure of *.pif file. That's all. I'm expecting your help.

Thank you !
newbie
Active Member
Active Member
 
Posts: 6
Joined: January 2nd, 2004, 12:13 pm

Answer

Postby newbie » January 3rd, 2004, 11:32 am

I found the answer for executing a exe file or a bat file.

procedure TForm1.Button1Click(Sender: TObject);
begin
WinExec('file1.bat',SW_SHOWNORMAL);
end;
newbie
Active Member
Active Member
 
Posts: 6
Joined: January 2nd, 2004, 12:13 pm

Postby Johnny_Bit » January 5th, 2004, 11:12 am

pif files are almost "normal" shortcut files. i can bet, that there's some interface to operate pif files just like normal shortcuts. just it has to be found.
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 1 guest