x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Acrobat and associations

Crunchy Frog
Crunchy Frog Page Icon Posted 2004-11-09 5:41 PM
#
Status:
I recently found Acrobat 1.0 for my J720. It only came as a folder without the install routine. The associations are not set so I have to open Acrobat and then the file. How can I easily set associations in CE to open files?
If anyone has the install/setup file for Acrobat, that would be great too.

Thanks,
 Top of the page
C:Amie Page Icon Posted 2004-11-09 6:07 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,976
Location:
United Kingdom
Status:
CF. HPC:Factor created a redist, it's in the downloads section.
 Top of the page
chiark Page Icon Posted 2004-11-10 5:13 AM
#
Avatar image of chiark
H/PC Sensei

Posts:
1,330
Location:
North of England
Status:
I wrote something about file associations on Windows CE just yesterday - it'll be on my website later, but here's the text...

As Chris recommends, you're best off using an installer, but here's the article all the same

Cheers,
Nick.

File Associations in Windows CE

File associations in Windows CE are handled through the registry: there is no "user friendly" way to manage file associations built into the operating system. For example, double click on something with a three letter extension that is not managed, and what do you get? A requester telling you to that there's no application associated with the file type, and that you should "run the application first, then open this file from within the application".

Helpful, eh?

The solution is fairly straightforward, but is best off left to either an installation routine or an application initiation routine as it involves adding entries to the registry.

To associate a file with an application, you need to create four entries in the HKEY_CLASSES_ROOT registry hive:
- a mapping between the extension and class name (ie .xyz to xyzfile)
- a class name with description of what that file type is that will mean something to the user (ie xyzfile to "XYZZY data file"
- A pointer to the default icon to use for the class in explorer
- The command with which to open the file type

As an example, let's show adding the ".z5" (Infocom Story file) extension to a machine to be opened by FrotzCE (an infocom interpreter). The following keys would be needed:

HKCR\.z5 with the default value set to "z5game"
HKCR\z5game with the default value set to "Infocom Story File"
HKCR\z5game\DefaultIcon set to the path to FrotzCE, followed by the icon number to use from the file. As an example "\Program Files\FrotzCE\FrotzCE.exe," will use the first icon in the application
HKCR\z5game\Shell\Open\Command set to the path to FrotzCE with any parameters to pass. The filename is stored in the variable %1%, so something along the lines of '"\program files\frotzce\frotzce.exe" %1'.

The best place to set this up is within a CabWiz installation file. One thing to be aware of is the handling of quote marks within CabWiz, and also of % symbols, which are used for internal variables.

Here's an example from the CabWiz INI file for MagnetiCE, which associates .mag files with the installed application:

[RegSettings]
HKCR,.mag,,,magfile
HKCR,magfile,,,"MagnetiCE Game file"
HKCR,magfile\DefaultIcon,,,"%InstallDir%\MagnetiCE.exe,"
HKCR,magfile\Shell\Open\Command,,,""""%InstallDir%\MagnetiCE.exe"""" %%1
 Top of the page
smiffit
smiffit Page Icon Posted 2004-11-14 8:45 AM
#
Status:
Surely it's much easier to use the 'Associate' menu commend that omes as part of the Power Tools package?
 Top of the page
chiark Page Icon Posted 2004-11-15 4:06 AM
#
Avatar image of chiark
H/PC Sensei

Posts:
1,330
Location:
North of England
Status:
Yeah, but where's the fun in that
 Top of the page
takwu Page Icon Posted 2004-11-16 4:30 AM
#
Avatar image of takwu
H/PC Elder

Posts:
1,953
Location:
BC, Canada
Status:
or you can use SmallTweak
http://tillanosoft.com/ce/stweak.html

but yeah I agree it's always interesting to know the technical way. I guess you need that if you're scripting a cab or something?
 Top of the page
chiark Page Icon Posted 2004-11-16 9:43 AM
#
Avatar image of chiark
H/PC Sensei

Posts:
1,330
Location:
North of England
Status:
Or you could use Resco File Explorer to manage the associations

Yes, you'd want the above information if you're writing a cab file script for cabwiz: it'll associate stuff automatically for the user, avoiding all this malarky!
 Top of the page
Jump to forum:
Seconds to generate: 0.140 - Cached queries : 63 - Executed queries : 8