Adding/changing what prog a file opens in?

Getox

Well-known member
Joined
Jul 8, 2004
Messages
122
How would i change what program or add an entry into the registry to set what program a file extension opens in?
 
http://msdn.microsoft.com/library/d...asics_extending/fileassociations/fa_intro.asp

http://www.windowsitlibrary.com/Content/368/07/2.html?Ad=1&

Imports Microsoft.Win32;

Dim regClassRoot as RegistryKey = Registry.ClassesRoot;
regClassRoot.CreateSubKey("applicationName");
regClassRoot.SetValue("whavever", "applicationpath");


Create two trees similar to the ones on the msdn page.
The result will be that you will be creating a key to identify what program opens
the file type and a key to describe the application and its run path.

It would be a better idea to use the Windows Installer to create the registry keys and register the file extension.

Marble_eater, for being such a big proponent of googling you sure do give crappy links.
 
dont know about crappy links :rolleyes: the 2nd link in the list on that google search happens to be one of the best VB code sites on the net, nearly all of it may be pre - .NET, but just about all of that can be modded to work in .NET

this section of code ....

Copyright
 
Back
Top