Windows 7 Open a file with an application in a non-conventional way

Neal Carron

Senior Member
Joined
Jan 1, 2010
I'm trying to get a good Win XP routine to work in my new Win7 Pro 32-bit OS.

I need to open a document with an application in a non-conventional way.
I'm encountering two problems.

In Win XP you could specify one or more applications to open a file type (i.e., a file of certain extension).
It was this way: In Windows Explorer,
Main Menu: Tools, Folder Options..., File Types,
Select file extension of the file you wish to open
Edit it.
Make a New Action.
Specify the path to the application to use to open the file.
You can choose a default application, and set up optional applications.
Then, after selecting the file and right-clicking, the default application and all options display in the drop down menu.

But in Win7 it appears you can only specify the default application. I don't see how to add an alternate application to the drop-down menu (without going through the "open with..." selection every time).
That's the first problem.

The second problem is more detailed. In my case, to open the file I need to specify the application on a command line with an argument, which is an application script that is to execute automatically when the application starts. It is that script that actually opens the original file, not the application itself. In my case, the application is perl.

Specifically:
I have a data file DATA1.dat, an ordinary ascii file containing parallel columns of numerical data.
I want to import it into my graphics package Axum, Version 5, an old excellent program.

In Win XP I automated that task by writing an Axum script Ax1.axs (in Axum's language), and a perl script NJC.pl (in perl's language).

Then, to import DATA1.dat into Axum, upon selecting the data file in Windows Explorer, I need to execute perl to run NJC.pl. It captures file parameters and then runs the Axum script. The Axum script then imports the data file into Axum.

So the command that "opens" the original file is

C:\path_to_perl\perl.exe C:\path_NJC\NJC.pl "%1".

The command starts perl. The first argument is the perl script that is to run automatically when perl starts. The second argument, "%1", is the selected data file. NJC.pl incorporates it into the Axum script Ax1.axs, and then runs that script (which opens Axum and imports the data file).

This works wonderfully in WinXP.
But I don't see how to get it to work in Win7. There's no way to enter a command with an argument.

Any ideas?
Thanks.
 
Back
Top Bottom