
- #Windows 7 change default program for extension code
- #Windows 7 change default program for extension windows 7
(It appears that installing Reader 9.3.4 may have cleared this up, I'm still researching.) PDF, which weren't corrected by installing Adobe Reader 9.3.3, leaving things in an unusable state. I've been working with several users who messed up associations for. So teemo10, I'm with you on this.Īnd please don't give us the line about "never override the user's preference." If the system makes it easy for the user to mess up the system, and no way for them to clean it up, we HAVE to have a programmatic way to do it. In addition, the behaviors of a) Windows Explorer, b) ASSOC at the command line, c) ShellExecute, and d) the return value of AssocQueryString can get out of sync. machine level associations, losing the fine-grained control that we used to have in the control panel, and possible lack of write permission to the registry, users canĮnd up in a catch-22. Between UAC, user-specific associations vs. This is a mess in Windows 7, I have decided. Unfortunately with the above situation, my application displays a message confirming that the extension isĪlready successfully associated when its not! So is there a way around this?

#Windows 7 change default program for extension code
The problem however is I have a button in my application that uses the above mentioned code to check for extension association with my application. I know it might seem obvious that if a user through explorer sets the associated application to an extension, that it would be expected to do it the same way again to re-associate the extension to a different application. My question is: Is there a way to achieve this programmatically? What registry values can be changed to regain control of an extension, after is associated with another program?

Running the above code, to regain control over the extension will not work. What happens at this point is that "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\\UserChoice" is changed by the system, and so the newly selected program takes over. The extension with whatever new program you choose.
#Windows 7 change default program for extension windows 7
However after using the Windows 7 built-in "Choose default program." (found under the file-right-click context menu under "Open with") it re-associates The above works initially, or if there are no other programs associated with the extension.
