file-association

Windows 7 file extension association

时光总嘲笑我的痴心妄想 提交于 2019-12-20 15:23:06
问题 I am referring specifically to windows 7. I have code that associates a certain extension with my application as proposed by webJose on the following page: What registry keys are responsible for file extension association? (However i correctly write to HKEY_CURRENT_USER\Software\Classes instead of HKEY_CLASSES_ROOT as suggested) The above works initially, or if there are no other programs associated with the extension. However after using the Windows 7 built-in "Choose default program..."

How do you set up a file association with a click-once application?

≯℡__Kan透↙ 提交于 2019-12-20 10:55:58
问题 I have a click-once application. I have an associated file that I store the application's data in. When a user clicks on one of these files I want it to open the click-once app and load the file. I can set up the file association in the publish, the icon and name is correctly set. Clicking on the file opens the application, but the application doesn't seem to be passed the path to the file - the command arguments are empty. How do I get it so that the path to the file is passed to the

File associations in Java using jnlp.jar, without full JWS?

馋奶兔 提交于 2019-12-20 07:18:50
问题 The Java Web Start technology has an IntegrationService API for creating file associations. My question is whether it is possible to somehow use this API (possibly by including jnlp.jar in my app) to create file associations, but without the full Java Web Start technology (no website for the initial installation, the program is distributed with a traditional installer or as a simple executable jar file). The app in question is a desktop/swing app. (This question arose in the comments of the

Have the ability to set Java application as default file opener?

依然范特西╮ 提交于 2019-12-19 21:16:11
问题 I've been searching for a way to have users set my program as the default to open files for awhile and found nothing. I have a program that is supposed to be universal for Mac, Windows and Linux, so I don't want to use a method that only works with one OS. So how can I give users the ability to set a Java app as the default file opener? Would I use the Desktop class? 回答1: No Java does not support this. You would have to write a small app for every OS that you want to support in its native

WPF; click once; Double Click file to launch; VS 2008

两盒软妹~` 提交于 2019-12-19 08:53:13
问题 My application is only for me and co-workers, so I don't care if it's Click-Once or copy-the-exe. I want to be able to click a file with given extension in windows explorer and have my program launch and open that file. I can't get it to capture the file name. Ostensible solution: http://blogs.msdn.com/b/avip/archive/2008/10/27/wpf-supporting-command-line-arguments-and-file-extensions.aspx The code I'm trying is below and at this point all I'm trying to do is put the name of the clicked file

WPF; click once; Double Click file to launch; VS 2008

旧城冷巷雨未停 提交于 2019-12-19 08:53:05
问题 My application is only for me and co-workers, so I don't care if it's Click-Once or copy-the-exe. I want to be able to click a file with given extension in windows explorer and have my program launch and open that file. I can't get it to capture the file name. Ostensible solution: http://blogs.msdn.com/b/avip/archive/2008/10/27/wpf-supporting-command-line-arguments-and-file-extensions.aspx The code I'm trying is below and at this point all I'm trying to do is put the name of the clicked file

Detect Chrome as browser associated with html files in Windows

十年热恋 提交于 2019-12-19 07:49:53
问题 We provide Flash tutorial videos that install on the local (Windows) hard disk with our application. Our app uses ShellExecute to open the html file (in whatever browser is associated with html files) in which they are embedded. Apparently there's a bug in Chrome's more recent Flash players that fails to play local files (but files over the web are fine.) (Frankly, I'm astonished that this bug hasn't been fixed by Google. Seems like a big one to me... but maybe not many people play Flash from

How to associate a file extension to a program without making it the default program

丶灬走出姿态 提交于 2019-12-19 06:39:15
问题 I'm deploying a small conversion tool on some systems, and want the users to be able to run it from the right click Open with menu. But I don't want to change the default program users have associated to this file type. It is easy to associate a file extension/type to a program, but how to do it (programatically of course) without changing the default program? 回答1: Setting the following keys worked for me: key HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/App Paths/<progname>: "" = <appPath>

Is there an easy way to determine what a file is by its extension in C#?

馋奶兔 提交于 2019-12-18 17:54:27
问题 Is there an easy way to determine what a file is by its extension in C#? For example if I pass a file extension of ".txt" then it will return "Text Document" or if I pass it ".pdf" it will return "Adobe Acrobat Reader". I see this behavior built into Windows Explorer, under the "Type" column. Is there a way to mimic this in C#? 回答1: If you want to get what explorer actually shows and are willing to use COM inter-op you can use the Shell.Application class to get it with the minimum amount of

C++ program needs an file association

徘徊边缘 提交于 2019-12-18 17:33:09
问题 I'm distributing a freeware product that reads and writes text files with a unique extension. I hoped that double-clicking such a file would automatically start the app. While developing on Windows 7 Professional, I set up an association to open my files upon double-click, by right-clicking the file->Open With...->Choose Default Program...->Browse... followed by "Always use the selected program to open this type of file." Good. It did just what it needed to. I was going to ship my program