Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Why file type isn't created?

- - - - -

  • Please log in to reply
3 replies to this topic

#1
Hell Racer

Hell Racer

    Junior

  • Member
  • Pip
  • 68 posts
  • Joined 14-June 09
Hi W3bbo! Since even in light installation mode xpize 5 installs 128x128 file type icons, I've decided to try to create a small anolis package which contains only cut down versions of file type icons (I've taken most of them from original xpize 5 release 6, removed hi res parts from them, left only 16, 32 and 48, and created several more icons with same sizes by myself for iso, bin and torrent extensions). I've tried to add several more extensions, e.g. .bin and .mov, but Anolis installer doesn't register them :(.

Here are parts that work perfectly:

...
<fileType typeExt=".qt" icon="Icons\qt.ico" friendlyName="QuickTime Video" />
<fileType typeExt=".iso" icon="Icons\iso.ico" friendlyName="CD/DVD Image" />
...

and here are parts that don't :( :

...
<fileType typeExt=".mov" icon="Icons\qt.ico" friendlyName="QuickTime Video" />
<fileType typeExt=".bin" icon="Icons\bin.ico" friendlyName="Binary File" />
...

Here's what I see in the log after installation:

...
2009-09-20T19:59:27 - Info - Extension defined : ".mov", but FileType undefined. Creating FileType
2009-09-20T19:59:27 - Info - Extension defined : ".bin", but FileType undefined. Creating FileType
...

Could you please point me in the right direction? What am I doing incorrectly?
Please see full Package.xml attached.

Thanks!

Attached Files


Edited by Hell Racer, 20 September 2009 - 11:47 AM.

Posted Image


How to remove advertisement from MSFN

#2
W3bbo

W3bbo

    xpize / Vize Project Lead

  • Developer
  • 473 posts
  • Joined 14-June 06
File-type registrations are split into two types: the extension, and the associated type. There is a one-to-many relationship: one file type can have many file extensions.

Note that a file extension can exist, but not be associated with any type. Windows's behaviour for handling these types of files is undefined.

In this case, the ".bin" and ".mov" extensions are already defined in your registry hive, but don't refer to an existing file type definition. Anolis Installer will create that definition (and set the right icon) and should be configuring the extension to point to that type. You're setting the XML right, but clearly something isn't working after installation.

Make a note of the registry key "HKCU\.bin" and look for a "HKCU\binfile" key. See if anything's amiss both before and after installation.

Note that the "Lite" installation mode doesn't include 128+ icon subimages only when patching resources to prevent files from going over undefined size limits. There is no need to make the file type icons smaller, you'd only be saving a couple of kilobytes on the final package size.
Posted Image

#3
Hell Racer

Hell Racer

    Junior

  • Member
  • Pip
  • 68 posts
  • Joined 14-June 09
Thanks very much for answer! I've done what you've suggested - I've looked at registry entries for .bin and .mov and just exported them before package installation:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.bin]
"NoOpen"=""
[HKEY_CLASSES_ROOT\.bin\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.mov]
[HKEY_CLASSES_ROOT\.mov\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"
There were no entries for binfile and movfile.
Then I've installed my package and .bin and .mov entries aren't changed, but the entries for binfile and movfile were added:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\binfile]
@="Binary File"
[HKEY_CLASSES_ROOT\binfile\DefaultIcon]
@="C:\\WINDOWS\\Resources\\Icons\\bin.ico"
[HKEY_CLASSES_ROOT\binfile\shell]
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\movfile]
@="QuickTime Video"
[HKEY_CLASSES_ROOT\movfile\DefaultIcon]
@="C:\\WINDOWS\\Resources\\Icons\\qt.ico"
[HKEY_CLASSES_ROOT\movfile\shell]
But these extension still aren't displayed on the Tools -> Folder Options -> File Types tab, and new icons aren't used:

Posted Image

What can I do to solve this?

Edited by Hell Racer, 22 September 2009 - 02:10 AM.

Posted Image

#4
W3bbo

W3bbo

    xpize / Vize Project Lead

  • Developer
  • 473 posts
  • Joined 14-June 06
Hmm, then clearly my software isn't setting the extension's type reference to the newly created type. I'll fix this bug in the next release.
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users