WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > How to Register File Types?
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
mcrbids
Junior Member

Registered: Jun 2003
From:

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!

Quick Link | Report this post to a moderator | IP: Logged

mcrbids is offline Old Post 06-27-2003 12:54 AM
Click Here to See the Profile for mcrbids Click here to Send mcrbids a Private Message Click Here to Email mcrbids Find more posts by mcrbids Add mcrbids to your buddy list Edit/Delete Message Reply w/Quote
Vytautas
Major Dude

Registered: May 2003
From: Victoria, Australia

What you need is to create some registry keys/enties in

code:
HKEY_LOCAL_MACHINE\Software\Classes
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.

Check the registy for some examples of the keys/entries.

Vytautas

Quick Link | Report this post to a moderator | IP: Logged

Vytautas is offline Old Post 06-27-2003 01:57 AM
Click Here to See the Profile for Vytautas Click here to Send Vytautas a Private Message Click Here to Email Vytautas Visit Vytautas's homepage! Find more posts by Vytautas Add Vytautas to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Jerusalem, Israel

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

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 06-27-2003 11:41 AM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
Vytautas
Major Dude

Registered: May 2003
From: Victoria, Australia

Archive page created here

Vytautas

Quick Link | Report this post to a moderator | IP: Logged

Vytautas is offline Old Post 06-27-2003 01:52 PM
Click Here to See the Profile for Vytautas Click here to Send Vytautas a Private Message Click Here to Email Vytautas Visit Vytautas's homepage! Find more posts by Vytautas Add Vytautas to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Jerusalem, Israel

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

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 06-27-2003 07:14 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
Vytautas
Major Dude

Registered: May 2003
From: Victoria, Australia

Will do as soon as i can, probably in a few hours

Vytautas

__________________
My NSIS Mods and Files

Quick Link | Report this post to a moderator | IP: Logged

Vytautas is offline Old Post 06-28-2003 01:47 AM
Click Here to See the Profile for Vytautas Click here to Send Vytautas a Private Message Click Here to Email Vytautas Visit Vytautas's homepage! Find more posts by Vytautas Add Vytautas to your buddy list Edit/Delete Message Reply w/Quote
Vytautas
Major Dude

Registered: May 2003
From: Victoria, Australia

Updated archive page to include restoration script for uninstaller. Thanks kichik for pointing this out.

Vytautas

__________________
My NSIS Mods and Files

Quick Link | Report this post to a moderator | IP: Logged

Vytautas is offline Old Post 06-28-2003 05:36 AM
Click Here to See the Profile for Vytautas Click here to Send Vytautas a Private Message Click Here to Email Vytautas Visit Vytautas's homepage! Find more posts by Vytautas Add Vytautas to your buddy list Edit/Delete Message Reply w/Quote
rene@alquesm.dk
Guest

Registered: Not Yet
From:

Exclamation Note

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)

Quick Link | Report this post to a moderator | IP: Logged

Old Post 11-23-2004 01:49 PM
Edit/Delete Message Reply w/Quote
super-llooyd
Junior Member

Registered: Dec 2005
From:

how do i call this SHChangeNotify?
(in NSIS I mean?)

Quick Link | Report this post to a moderator | IP: Logged

super-llooyd is offline Old Post 12-07-2005 11:55 PM
Click Here to See the Profile for super-llooyd Click here to Send super-llooyd a Private Message Click Here to Email super-llooyd Find more posts by super-llooyd Add super-llooyd to your buddy list Edit/Delete Message Reply w/Quote
dandaman32
Senior Member

Registered: Jan 2005
From: Look behind you.

Use the System plugin.

code:
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'


-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.

Quick Link | Report this post to a moderator | IP: Logged

dandaman32 is offline Old Post 12-08-2005 03:26 AM
Click Here to See the Profile for dandaman32 Click here to Send dandaman32 a Private Message Visit dandaman32's homepage! Find more posts by dandaman32 Add dandaman32 to your buddy list Edit/Delete Message Reply w/Quote
IGC
Junior Member

Registered: Jul 2006
From:

Question

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 on 07-14-2006 at 09:47 PM

Quick Link | Report this post to a moderator | IP: Logged

IGC is offline Old Post 07-14-2006 09:18 PM
Click Here to See the Profile for IGC Click here to Send IGC a Private Message Click Here to Email IGC Find more posts by IGC Add IGC to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 09:32 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > How to Register File Types?
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON