File association - running a batch file minimized
I've got a custom application (written by an external contractor) which edits configuration files. The application accepts no command line arguments and has no open or save dialogs. To edit a file, it expects the file to exist with a particular file name in its own directory.
This is a pain in the neck because it means every time I want to alter one of these config files, I need to copy it over, rename it, use the editor then copy it back afterwards.
I've written a very simple (Dos) batch file to do this and set up a file association in Windows so that when ever I double click one of the config files it launches the batch file. That works a treat with the caveat that I can only open one config file at a time.
The only thing that annoys me is that the batch file runs in a big ugly command prompt window that hangs around for the time I have the config file open. I've done gotten around this sort of thing in the past by creating a .pif shortcut to the batch file that tells it to run minimized and setting the Windows file association to call the .pif file rather than the batch file. In Windows XP, the .pif has become a standard .lnk shortcut (ok, whatever) but I can't point my file association to the .lnk file, and if I point it to the .bat file it ignores the .lnk. :(
So I'm wondering if there is a command line switch I can send to the .bat file (or to cmd.exe) that tells it to run minimized, or if I can have the file association send a DDE message to the command window telling it to minimize or if there's anything else I can do to make it play ball...?
Failing that I guess I'm gonna have to figure out the FileSystemObject and do it in a .vbs script. (Which I can't really be bothered with right now! :) )