How does one associate a program with a file extension in Windows 7 Pro?

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
1) Right-click->open->select from installed programs->browse->select the executable, click open.
...it's not there to be selected. Interestingly, there is no, "open with..."

2) Control panel->Default programs->Set associations
...same behavior as 1.

3) Control panel->Default programs->Set default programs
...there is no way to add one, that I can find.

How do I go about this rather basic and necessary task in the release version? Everything was fine in the RC.
 

RebateMonger

Elite Member
Dec 24, 2005
11,586
0
0
Click on the "Start" menu and type "File extension" into the search bar. It has instructions and links.

It's the "Set Associations" panel that you found. You click on the file type and then click on "Change Program...." on the top left. You can add a program association from there with the "Browse". Pick ANY program and click "Open" and another menu will pop up showing all the programs installed on the PC.

That behavior seems like it's not really intended, but it works, after a fashion.
 
Last edited:

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
That gets me to the same places, where I experience the same bug.

If I browse and select a program, it should show up in the, "Other Programs," list in the, "Open with," dialog. Instead, it's just the same as it was before I clicked the, "Browse," button.

Trying some others, it seems that programs which I have not yet executed can be associated just fine.

None of these programs are in Program Files or anything like that (all of those generally take care of associations during installation).

For example, I opened Scite to edit some scripts (it's standalone, and lives in a folder on my desktop). I then decided to go ahead and associate it with .lua, .py, .sh, etc., but when I select the executable, it doesn't show up in the list after I get back to the, "Open with," dialog.
 
Last edited:

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
240
106
Try this. Control Panel. Then Default Programs. Then Set File Associations (about 2nd down the list.) That should give you a screen with gazillions of files extensions and the programs that are set to go with them. They can be changed.

To do that, highlight the file extension, then click on the CHANGE PROGRAM radio button at the top. It does not do the "open with" bit.
 
Last edited:

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
To do that, highlight the file extension, then click on the CHANGE PROGRAM radio button at the top. It does not do the "open with" bit.
Actually, yes, it does. That's #2 in my first post.

Anyway, now that I've been Googling with the assumption that it is a bug, which it is, I have found a way to fix it.

In HKCR\Applications\(exe name)\shell\open\command, there will exist an incorrect path for the application in question (such as the thumbdrive that it came from, which is no longer there).

The extension will have another key associated with it. It is named in the HKCR\(extension)\(Default) value, and is also under HKCR.

If all three of them, right under HKCR, are deleted, then everything will work fine after that.
 
Last edited:

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
240
106
Thanks, Jack. That's a great utility for the ol' tool box. Fortunately, my Win 7 works like it is supposed to, but it's great to have such an easy alternative.
 

RebateMonger

Elite Member
Dec 24, 2005
11,586
0
0
Hmmmm...
I'm running a near-new installation of Win7 Ultimate with very few programs installed.

I just tried associating *.LOG files to an application that is NOT "installed" on my computer. It's an .EXE file that runs as a standalone.

In my case, after I did the "Browse" option, clicked on that .EXE file, and clicked on "Open", I can now see the standalone .EXE program under the "Other Programs" option. Before I did the "Browse" option, Windows didn't show that .EXE program in the "Other programs" list.

One other thing that I originally missed is that there's a tiny "down-arrow" button on the first file associations menu that expandes the options, showing all the "installed" programs in Windows. But it didn't show that standalone .EXE program until I went through the "Browse" routine once and added it to the list.

So that's how "my" Windows 7 works. That may not be how yours works if there's a bug. In MY case, the biggest "bug" was I didn't see that tiny "down-arrow" that reveals programs that are registered with Windows. Previous versions of Windows didn't "hide" that list of programs.
 
Last edited:

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
...until I went through the "Browse" routine once and added it to the list.
The problem was that it would not add it to the list, yet also gave no error. I initially assumed it was acting as intended, and there was a settings issue, since there was no error.
 
Last edited: