file-association

Associate file extension to python script, so that I can open the file by double click, in windows

倖福魔咒の 提交于 2019-11-27 06:52:40
问题 I want to do the following: Save numeric data in a CSV-like formatting, with a ".foo" extension; Associate the ".foo" file extension with some python script, which in turns opens the .foo file, reads its content, and plots something with a plotting library (matplotlib most probably). The use-case would be: double-click the file, and its respective plot pops up right away. I wonder how I should write a python script in order to do that. Besides, the windows "open with" dialog only allows me to

MacOSX - File extension associate with application - Programmatically

一世执手 提交于 2019-11-27 04:38:49
I'm trying to get my program to automatically associate certain file extensions to be opened by it but I'm not sure how to do that in MacOSX. I'm not asking how to associate a program with a file extension in the GUI, I want to be able to program it into my program. Nick To register a new file extension with an application use the following defaults command. Replace PUT_FILE_EXTENSION_HERE_WITHOUT_PERIOD with the file extension i.e. txt. Replace org.category.program with the com/org name of your program i.e. com.apple.itunes. $ defaults write com.apple.LaunchServices LSHandlers -array-add \ "

Associating file extensions with a program

蓝咒 提交于 2019-11-27 04:34:13
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 where it is opened? For that matter, is it possible to tell if the file has been associated already, is it an issue to try and reassociate? Finally, how can you set the .ico file it uses? Thanks for the help, I know almost nothing about the registry and it

Use a Java application as the Default Program for a particular file type?

久未见 提交于 2019-11-27 02:49:02
问题 I have created a text editor using Java, and have it packed in a jar file using Netbeans. Now I created a text file, with an extension of ".text". I'm on Windows 7, so using it's property window I changed the default opening program to my text editor's jar file. Now when I double click the file with ".text" extension, windows shows a dialogbox saying "{file name} is not a valid win32 application". Please help me out of it.. Thanks. 回答1: The problem is that a JAR file is selected as the

register as music player

ぐ巨炮叔叔 提交于 2019-11-27 02:18:50
问题 I'd like to see my app in the list of player ("continue action using...") that pops up when I try to open an audio file (ie. from file browser or gmail attachment). Here are the intent filters I've tried for my MainActivity: <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SEARCH" /> </intent-filter> <intent-filter> <action android:name=

File association in Inno Setup

北战南征 提交于 2019-11-26 19:45:54
问题 I am using Inno Setup and am trying to associate a program that is located in the Program Files (x86) in Windows 7. I have the following: #define MyAppName "MyView" #define MyAppExeName "MyView.exe" [Setup] AppName={#MyAppName} [Registry] Root: HKCR; Subkey: ".mpl"; ValueType: string; ValueName: ""; ValueData: "MyView"; Flags: uninsdeletevalue Root: HKCR; Subkey: "MyView"; ValueType: string; ValueName: ""; ValueData: "MyView"; Flags: uninsdeletekey Root: HKCR; Subkey: "MyView\delta.ico";

Open file with associated application

只谈情不闲聊 提交于 2019-11-26 17:33:13
i want to ask for help with opening a file from c# app with associated app. I tried this: ProcessStartInfo pi = new ProcessStartInfo(file); pi.Arguments = Path.GetFileName(file); pi.UseShellExecute = true; pi.WorkingDirectory = Path.GetDirectoryName(file); pi.FileName = file; pi.Verb = "OPEN"; Process.Start(pi); or this: Process.Start(file); where string file in both examples represents full path to the file trying to open. Now, everything is working well, except the (jpg) images with ACDSee app . Irfanview associations works well, MS office documents too. After trying to open the jpg image

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

吃可爱长大的小学妹 提交于 2019-11-26 16:37:46
问题 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. 回答1: CodeProject has some classes you can download. First get the FileAssociationInfo , and from that get the ProgramAssociationInfo . The pai object can give you the icon. FileAssociationInfo fai = new

Temporary file association for single cmd.exe session

拟墨画扇 提交于 2019-11-26 14:09:12
问题 I need to set association for .py files to be executed with specific python version. But I need to make this association only for single cmd.exe session (parallel sessions should not be affected). Does Windows allow this? I suspect the answer is no, but I'd like to see some proof before throwing out the idea to get such feature into virtualenv. 回答1: Sure you can. You were very close to answer in your comment to Jakob's answer - If it is possible to change file association with environment

How to get recommended programs associated with file extension in C#

蓝咒 提交于 2019-11-26 14:05:54
问题 I want to get path to the programs that associated with file extension, preferably through Win32 API. List of programs that appears in "Open With" menu item List of programs that appears as recommended in "Open With..." dialog. UPD: Assume that i have office11 and office12 installed on my machine, default program for .xls is office 11. If look at HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command there is a path to office11 excel.exe, but when i right click on file i can choose office12 in