Page 1 of 1

*.bat file

PostPosted: January 2nd, 2004, 12:50 pm
by newbie
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!

More

PostPosted: January 3rd, 2004, 4:53 am
by newbie
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 !

Answer

PostPosted: January 3rd, 2004, 11:32 am
by newbie
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;

PostPosted: January 5th, 2004, 11:12 am
by Johnny_Bit
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.