file-association

How do I get the icon associated with a file type?

I have a form that displays file information in a TabControl, and I'd like the pages to have the file's icon in their tab. How do I get the icon associated with a file type? I'd prefer solutions that don't involve looking things up in the registry, but if that's the only way then so be it. ...

ms office file extensions

I made a discovery some time back. Just follow these steps: Create a .doc/.xls/.ppt file in office 2003. Keep some test data in there and close the file. Now rename the file to change it's file extension to a random string, taking care that it is unassociated, like test.asdfghjkl etc. Double click the file and it opens seamlessly in the...

Cross-platform way to open a file using Java 1.5

I'm using Java 1.5 and I'd like to launch the associated application to open the file. I know that Java 1.6 introduced the Desktop API, but I need a solution for Java 1.5. So far I found a way to do it in Windows: Runtime.getRuntime().exec(new String[]{ "rundll32", "url.dll,FileProtocolHandler", fileName }); ...

How to associate file type with MacOS X App without launching it first?

Hi folks, I would like to associate the last installed version of my Mac OS X application with a certain type of file. A little experimentation shows that the info.plist file seems to be read and interpreted by the operating system when launching the application, not when dragging the application bundle to the disk. Apple's documentatio...

How do I find out the path of the file triggered by opening a file with a custom file extension?

How do i get the location of the file that i used to open my programs with? Example: if i create a new extention ".xyz" say and i tell windows that i want to open the file type .xyz with myapplication, then it starts my aplication. Great, but how does my application get a handle on the file path of the file that was used to start it? ...

How to change file association without UAC confirmation?

When I was working with file association in a .NET application I hadn't had found a way to set it without UAC popping up a confirmation dialog. Today, when I opened uTorrent and looked up for file association, I've found that you can enable (writing to registry) without any confirmation from the UAC. How is that possible? uTorrent is n...

How can i set an icon for my own file extension

i register my file extension in windows with "ftype" and "assoc", this works. now i have the bad looking default icon, how can i change this icon?? ...

How to get icon and description from file extension using Delphi?

Basically I have a TcxGrid which will be listing various files names and I'd like to give further details based on the file extension, specifically it's description (e.g. for .PDF it's "Adobe Acrobat Document") and it's related icon. I notice there is a very similar question already but it's C# related and I'd like something Delphi base...

How to bring up the "Windows cannot open this file" dialog?

My users can attach documents to various entities in the application. Of course, if user A attaches a .TIFF file, user B may not have a viewer for that type of file. So I'd like to be able to bring up this dialog: My application is C# with VS2005. Currently I do Process.Start and pass in the file name. If no association is found,...

What's the difference in Windows program invocation?

I have a program on a Windows XP computer on another continent. If I start it by double-clicking on an associated file, so that it runs the program according to the file-type association, it crashes at a certain point. If I start it by dragging an associated file to the program icon, it works fine. If I double-click on the icon and dr...

Associate Extensions in Windows CE

How can I associate an extension of a file to an program in Windows CE? It's so boring to run my Python programs using cmd. If I associate Python with my *.py files I'm going to run my program faster. Thanks! ...

What is the best .net alternative to dde for file associations?

I have an MDI Windows Forms application (.net 2008) that allows the user to associate various file types with the application. I currently do this with a registry entry something like this, that causes the application to load and access the file name via the command line: Registry.SetValue(appKey & "\shell\open\command", "", """" & _ ...

Perl on Windows, file associations and I/O redirection

Can someone explain the difference between calling a perl script via file association versus calling the same script explicitly via perl.exe? Apparently I/O redirection doesn't work very well when the script is called via file association, and I would really like to know why. E.g. take a look at the Activestate FAQ for Perl on Window...

Is there a Windows API to modify file type associations for an extension?

I'm looking for a way to programatically tweak the particulars of a file association on a Windows system. For example, the "Application User to Perform this Action" setting for the "Open" action for a particular file type. Clearly I could do this by modifying the registry directly, but if there is an API I'd prefer to use that as it wou...

"Windows (Vista) cannot find "abc.def". Make sure you typed the name correctly and then try again."

In Windows Vista (only) when I double click on a file in Windows Explorer that is associated with my application, the following message is displayed: "Windows cannot find "abc.def". Make sure you typed the name correctly and then try again. Where abc.def is the file I double click on in Explorer. My app starts if it isn't alre...

Associating file extensions with a program

I get how to do it, and i have been to http://www.codeproject.com/KB/vb/VBFileAssociation.aspx before. My question is about what doing that does, is it possible to reverse it? What if you do not know where your program will be, and you are just testing it for now? Is there any way for it to "find" your program, or an easy way to edit whe...

What's the best way for an app on Windows to assocaite itself with a particular file type, such as .xml, .txt, etc., but share that association with other apps that support that extension?

If I create a new app, and associate with, say, the .xml file extension on a particular computer, when someone double clicks the .xml file, it will launch my app and pass the file as parameter. But Windows seems to know what other files have the ability to work with that file type. How is that set up? Also, when I save a Microsoft Wo...

Double click document file in Mac OS X to open Java application

I have a Java application in an application bundle that I want to associate a file type with. For example, if there's a file foo.example when that file, or any file with the .example extension, is double-clicked, I want my application to start and open the file. I also want the files to have my application's icon. I'd like to do this...

Java application doesn't know name of file being opened - Mac OS X

I have a Java application in an application bundle that has a file association (using Info.plist) that runs when a document is double-clicked. How do I get the filename of the document that was double-clicked in my Java application? Right now my Java app just runs and displays an empty document. There doesn't seem to be any command line ...

C# - Associate a file type and open it within WebBrowser control?

How would I be able to open a file (lets say an .html file) and load it into the WebBrowser control on my WinForm application? I'm talking about right clicking on the file and choosing to open it with my application. Any ideas? ...