create PIF on the fly - ie no GUI

Bryan Butler
Bryan Butler used Ask the Experts™
on
I need to modify and/or create a PIF file without using a GUI.  The field I need to change is "Cmd line:" (on XP) and can be seen in the "Program" tab of the PIF properties.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
Thanks.  I did see that and was creating them that way, but need to do it without bringing up a GUI.  I may not be able to and I'll have to do some 'send keys' tricks, but I'm still hoping for an easier way.

Author

Commented:
Or if I can pass a parameter to a PIF invocation, and use that in the command, that would do it.

Commented:
I'm not locating anything too much.

Some discussion [url="http://www.pcreview.co.uk/forums/thread-1468758.php"]here[/url] but I think you are probably on track.
Hi developedtester

I'm wondering why you are using *.PIF files on a Windows XP system.  Shortcuts to MS-DOS program executables and *.BAT files on Windows 9x and earlier systems are created as *.PIF files.  On more recent systems (including XP) the command interpreter is CMD.EXE, which is not MS-DOS, and shortcuts to what would seem to be "DOS" exe files, to proper old 16-bit MS-DOS files, and to batch files, are created as standard Windows Shortcuts , ie. *.LNK files.

Just curious, that's all.

Bill
Hmmm.  I need to correct myself on one part of my comment.  Creating a shortcut to a true 16-bit DOS *.exe on a Windows XP system does create a PIF file.

Author

Commented:
Thanks for the help.  I ended up using dosbox to fake out the full screen requirement.  The pif was another option to run it automatically.  

Author

Commented:
Got close enough.  Thanks.
I had actually just successfully managed to replace the paths in a test PIF file on an XP system using a couple of old forensic acquisition tools (evidence acquisition boot disk) that were designed to run from a boot floppy but run file from any drive and folder.  The idea is that a batch file creates a copy of the binary PIF file, replaces the strings you specify in it, then overwrites the original in place with the copy.

The programs are XCHANGE and OCOPY by a person named Clay Ruth and were last updated way back in 1996, but sadly the last download link I had is no longer found.

The base URL was http://www.disclosedigital.com but it looks like that domain may have been bought by someone else or has just moved on.  This looks like Clay Ruth's utility program page.

Bill

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial