From: Webbiz on
On Wed, 10 Mar 2010 22:28:35 -0600, Webbiz <nospam(a)noway.com> wrote:

>On Wed, 10 Mar 2010 19:19:33 -0500, "Nobody" <nobody(a)nobody.com>
>wrote:
>
>>"Webbiz" <nospam(a)noway.com> wrote in message
>>news:qs6gp5lqruu14nonle8gvghqp25r1r85hh(a)4ax.com...
>>> However, I still can't find an answer to my FileType issue. I need to
>>> somehow register my filetype of .fdr with Windows OS as associated
>>> with my app. I don't want to have to have the user do this manually.
>>
>>If you are using Inno Setup, start ISTool and use Project-->Create
>>Association. If you are using PDW, try searching MSDN library for "shell
>>association" or "file association". You would get less results than you
>>would find in Google.
>>
>
>
>I'm using Inno Setup 5.3.8. However, there is no ISTool in this app.
>Did a search under Help and "No Topics Found" for ISTool. No Project
>--> Create Association found in this app also.
>
>From what you're saying, what I need to do is to be done in the
>installation and not part of my app code. So I'm looking at the wrong
>place to handle this.
>
>Thanks.
>
>Webbiz


Nobody's comment about Inno Setup and PDW set me on the correct path.
I was looking at the app itself and not the installation medium.

So, with that, I was able to Google "file association inno setup" and
got the following:

Creating File Associations

First set the [Setup] section directive "ChangesAssociations" to
"yes". Then create [Registry] entries as shown below.

[Registry]
Root: HKCR; Subkey: ".myp"; ValueType: string; ValueName: "";
ValueData: "MyProgramFile"; Flags: uninsdeletevalue

".myp" is the extension we're associating. "MyProgramFile" is
the internal name for the file type as stored in the registry. Make
sure you use a unique name for this so you don't inadvertently
overwrite another application's registry key.

Root: HKCR; Subkey: "MyProgramFile"; ValueType: string; ValueName:
""; ValueData: "My Program File"; Flags: uninsdeletekey

"My Program File" above is the name for the file type as shown
in Explorer.

Root: HKCR; Subkey: "MyProgramFile\DefaultIcon"; ValueType:
string; ValueName: ""; ValueData: "{app}\MYPROG.EXE,0"

"DefaultIcon" is the registry key that specifies the filename
containing the icon to associate with the file type. ",0" tells
Explorer to use the first icon from MYPROG.EXE. (",1" would mean the
second icon.)

Root: HKCR; Subkey: "MyProgramFile\shell\open\command"; ValueType:
string; ValueName: ""; ValueData: """{app}\MYPROG.EXE"" ""%1"""

"shell\open\command" is the registry key that specifies the
program to execute when a file of the type is double-clicked in
Explorer. The surrounding quotes are in the command line so it handles
long filenames correctly.



Rock n' Roll!

Thanks Nobody.

Webbiz
From: C. Kevin Provance on
"Webbiz" <nospam(a)noway.com> wrote in message news:8hrgp55g86fsbp4j4da7ckfo73nq2q90qp(a)4ax.com...
: Quote from original post:
:
: "Problem: When the user goes to download this file, it shows up in the
: download directory dialog as "myfile.unk". In other words, it has the
: .unk filetype because my Windows system does not know what a .fdr file
: is.
:
: Is there a way via code to add the .fdr filetype to the system?"
:
:
: Same problem. My system does not recognize the .fdr filetype I'm using
: for my download file. It defaults to .UNK when ask where to save the
: file. I would like to show the actual filename "MyFile.fdr" when the
: Save dialog opens up. To do that, .fdr needs to be added to the
: filetypes that Windows understands.
:
: How is what I just said, and what I said before, and what I said at
: the very beginning different?
:
: And if I knew what the problem was exactly I'd not have to ask for
: help.

That's not a Windows issue, it's a browser issue. You're browser needs the assignment and depending on which browser you use, the solution could be many things, most of which are terribly hard to execute. I use Firefox and I download unknown file extensions all the time and they save with the correct extension, which is why I say it's a browser problem. I'm not entirely sure adding the windows association would work, but if you try, it needs to be done through your apps setup program. I recommend Inno as it's easy to use and very powerful.
From: Nobody on
"Webbiz" <nospam(a)noway.com> wrote in message
news:r5sgp51k9c197uibj3k0qov3rg48loaf7l(a)4ax.com...
> I'm using Inno Setup 5.3.8. However, there is no ISTool in this app.

ISTool is usually a separate download, usually as part of "QuickStart Pack",
or you can download it separately from "Third-Party Files":

http://www.jrsoftware.org/is3rdparty.php

> From what you're saying, what I need to do is to be done in the
> installation and not part of my app code. So I'm looking at the wrong
> place to handle this.

I think it can be done from your app, but it would be per user.


From: ralph on
On Thu, 11 Mar 2010 00:13:22 +0100, "Helmut Meukel"
<NoSpam(a)NoProvider.de> wrote:


>
>OTOH, as a user I hate those ignorant american programmers whose
>programs create folders named "Programs", "Common Files",
>"Documents and Settings", "Application Data", etc. on my german
>system instead to use the existing folders "Programme", "Gemeinsame
>Dateien", "Dokumente und Einstellungen", "Anwendungsdaten", etc.
>

Hummmpf!

And I suppose it is our fault you all come up with different names and
odd spellings for EVERYTHING!

Frankly I'm amazed you can understand each other let alone expecting
us to make heads or tails out of it.

-ralph
<g>
From: Dee Earley on
I know you've had the answers already but..

On 10/03/2010 21:01, Webbiz wrote:
<SNIP>
> The directory defaults to c:\Program Files\MyApp

No it doesn't...
(Unless you have an app really called "My App" which is just silly)

Either give the full unmodified name, or don't give specifics at all.
Both are better then effectively lying.

> For Windows 7 (and likely Vista), it will not allow the downloading of
> the file to write to this default directory.
>
> Is there a way to make it do so, or do I have to create a separate
> directory elsewhere as my only alternative.

The user can download to wherever they want.
You should then allow them to open it from wherever they want.

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems