View Full Version : Create File Association
NewsArchive
04-28-2008, 01:31 AM
Hi Friedrich,
When reading the help on this function it's a bit sparse on some of
the subjects:
1. ProgID:
This is said to provide the file types icon and description. I don't
quite understand what this means.
In regards to the .sb6 association, would this be the
"SetupBuilder6.File" which is the default value of HKCR\.sb6 or what
exactly is this referencing to?
2. ProgID Description:
This states "String that specifies the path and filename to copy from
(this can include wildcards "*" and "?").
This really doesn't make much sense to me and looks more like a
copy/paste mistake;)
I have a very simple method to do this in my classes, but my guess is
that in Vista I'd have to run elevated write to the HKCR<g>
Best regards,
Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com
Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php
NewsArchive
04-28-2008, 01:32 AM
Hi Arnór,
> When reading the help on this function it's a bit sparse on some of
> the subjects:
The problem is that even MSDN does not give more (detailed) information.
> 1. ProgID:
>
> This is said to provide the file types icon and description. I don't
> quite understand what this means.
>
> In regards to the .sb6 association, would this be the
> "SetupBuilder6.File" which is the default value of HKCR\.sb6 or what
> exactly is this referencing to?
SetupBuilder documentation changed to the following:
The Create File Association function lets you associate a file extension
with an executable to determine which application to launch when the end
user double-clicks a file with a certain extension. You can associate file
extensions with any executable file in an installation.
File associations in Windows are two parts, the extension itself and the
ProgID (programmatic identifier). ProgIDs are friendly versions of ClassIDs
that identify a version of an application.
Extension
[in] A unique extension, usually three characters. For example "clw" or
"sb6". Do not include a leading period.
ProgID
[in] The Prog ID to be used for the association. Microsoft recommends to use
the following naming convention for versioned file ProgIDs to avoid
duplication with registration from other vendors:
ProductName.extension.versionMajor.versionMinor. For example:
VisualStudio.DTE.8.0
NOTE: The selected Prog ID provides the file types icon and description
displayed by the Windows shell.
ProgID Description
[in] String that specifies the type of file. The end user sees this
description on the Properties dialog for files of this type.
File
[in] String that specifies the application which will open the file type.
Use the browse feature to select the application.
Command
[in] Enter the command as it should appear on the right-click menu.
Arguments
[in] Enter command line options that will be passed to the executable file
when the function is performed. The default (%1) is a Windows variable that
holds the pathname of the file that was opened.
Icon File
[in] Enter a pathname, or press Browse to select a file from your
installation, or use variable substitution to build a pathname. This field
specifies the icon to be used for the shortcut if you do not want to use the
source file's original icon.
Icon Index
[in] Enter the number of the icon to use from the file selected in the Icon
Pathname field above.
Standard Canonical Verbs
[in] Some common standard canonical verbs and their expected behaviors are
listed below.
open. A typical primary verb that launches the associated application and
uses it to open the invoked file.
play. Similar to open, but is typically invoked on media file types. This
verb indicates that the associated application immediately begin, playing
the contents of the file, rather than just opening the file and waiting for
user direction.
> 2. ProgID Description:
>
> This states "String that specifies the path and filename to copy from
> (this can include wildcards "*" and "?").
>
> This really doesn't make much sense to me and looks more like a
> copy/paste mistake;)
Yep. Copy and paste issue <g>. Fixed now, thank you.
> I have a very simple method to do this in my classes, but my guess is
> that in Vista I'd have to run elevated write to the HKCR<g>
Correct. You need administrator execution level privileges under Vista/2008
to create file associations (in HKCL).
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
04-29-2008, 03:03 AM
Hi Friedrich,
>SetupBuilder documentation changed to the following:
Much clearer, thank you very much:)
>> This really doesn't make much sense to me and looks more like a
>> copy/paste mistake;)
>
>Yep. Copy and paste issue <g>. Fixed now, thank you.
Thanks, that happens<g>
>> I have a very simple method to do this in my classes, but my guess is
>> that in Vista I'd have to run elevated write to the HKCR<g>
>
>Correct. You need administrator execution level privileges under Vista/2008
>to create file associations (in HKCL).
That's what I figured;) Which is why I was trying to do this in SB
and got confused<g>
Best regards,
Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com
Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.