|
|
#1 |
|
Junior Member
Join Date: Jun 2003
Posts: 2
|
How to Register File Types?
I'm attempting to write an installer for a php-gtk program. I've figured out most of it, except that I need to register the ".php" filetype with the correct executable so that the application will actually run.
I can't find this anywhere in the documentation... how do I do this? I want to register the ".php" filetype with application c:\Program Files\php4\php_gtk.exe Thanks! |
|
|
|
|
#2 |
|
Major Dude
|
What you need is to create some registry keys/enties in
first you need to create a ".php" key with the description of the file type. Then create a key with the description as the name.code: Check the registy for some examples of the keys/entries. Vytautas |
|
|
|
|
#3 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
The NSIS installer registers .nsi and .nsh. Its source code can be found in Examples\makensis.nsi. Is someone up to creating an Archive page for this?
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
#5 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
Thanks.
The code you've copied also backups the old value so it would be nice if you include the uninstall part too that shows the reinsertion of the backuped value. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
#6 |
|
Major Dude
|
Will do as soon as i can, probably in a few hours
Vytautas |
|
|
|
|
#7 |
|
Major Dude
|
Updated archive page to include restoration script for uninstaller. Thanks kichik for pointing this out.
Vytautas |
|
|
|
|
#8 |
|
Guest
Posts: n/a
|
Jsut wanted to add, that according to the MSDN, it's important to notify the system that you have made a change. You do this with the function SHChangeNotify. To notify Windows of a file association change, call the function like this:
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_DWORD, NULL, NULL); If you do not call this function, Windows might not recognize your new filetype, or the change you made, before the system has been restarted. Best regards René Gundersen (rene@alquesm.dk) |
|
|
#9 |
|
Junior Member
Join Date: Dec 2005
Posts: 11
|
how do i call this SHChangeNotify?
(in NSIS I mean?) |
|
|
|
|
#10 |
|
Senior Member
Join Date: Jan 2005
Location: Look behind you.
Posts: 209
|
Use the System plugin.
code: -dandaman32 ExperienceUI for NSIS | Latest project: Enano CMS Do not PM me on the Winamp forums, I hardly ever check my messages here; you are more likely to get my attention through the ExperienceUI forum.
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Jul 2006
Posts: 1
|
I have a question regarding this...
I was able to register the .igc extensions with my program. Everytime I click on one of the .igc files the program executes correctly BUT.. The parameter passed to the program (the .igc file clicked) has a limited length. When that limit is passed the parameter contains tildes (~) on the path and in the filename. For example: I click on "D:/Documents/My_files/igc_files/file to open.igc", my program executes, but the paramter passed to the program is something like: "D:/DOCU~/MY~/IGC~/FILET~1.igc" When this happens my program can't find the passed file and it is not opened. How do I solve this problem? It does not affect the execution of the program, and if I use the Open button on my program the files open correctly, but it is an extrange behaviour that can be viewed as a bug on the code... EDIT: I found the source of the problem... after shell\open\command I forgot to put quotes between the path to my executable. I do not know how that affects the arguments passed to the program, but it does. Everything works perfect now. Last edited by IGC; 14th July 2006 at 21:47. |
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|