File Extensions Issue
0 Comments
[ + ] Show comments
Answers (13)
Please log in to answer
Posted by:
Inabus
15 years ago
Posted by:
shweta_kar
15 years ago
Posted by:
anonymous_9363
15 years ago
What kind of idiot package requires a reboot to restore file extensions?!?
The normal way to do this would be, as 'shweta_kar' almost tells you, is to record the EXE which is currently associated with those file extensions and record it in the registry somewhere, normally a key under your application's name, using a Custom Action (which you need to build, BTW). Then, you have to build a corresponding Custom Action for the uninstallation (every install CA ought to have a corresponding uninstall CA, to reverse whatever action took place). The uninstall CA reads that registry entry and restores it for the file extension associations in question.
The normal way to do this would be, as 'shweta_kar' almost tells you, is to record the EXE which is currently associated with those file extensions and record it in the registry somewhere, normally a key under your application's name, using a Custom Action (which you need to build, BTW). Then, you have to build a corresponding Custom Action for the uninstallation (every install CA ought to have a corresponding uninstall CA, to reverse whatever action took place). The uninstall CA reads that registry entry and restores it for the file extension associations in question.
Posted by:
Packager2008
15 years ago
Posted by:
shweta_kar
15 years ago
Posted by:
anonymous_9363
15 years ago
Isn't that to do with Explorer's dumb so-called 'cache' file? If you delete that file (I just can't remember its name...is it 'ShellIconCache'?) from %SystemRoot% (?), Explorer will create a new one, after looking up the EXE name and icon index (which defaults to '0').still the icon remains same :(. Its not getting changed to default one.
Posted by:
Packager2008
15 years ago
Posted by:
anonymous_9363
15 years ago
I did say I was unsure of its name but AS USUAL a Google search turned up the equivalent for XP ==> http://www.computing.net/answers/windows-xp/where-is-shelliconcache/153150.html Remember that it's also a hidden file, just like ShellIconCache so you'll need to have the relevant Explorer option on to view those (hard to know what packager wouldn't have that on...)cannot find the related cache file
Why would you need to? Do your users have a constantly-open instance of Explorer? I wouldn't worry about it. Just delete the file as part of your package (hint: RemoveFiles table).could you please let me know how to implement the same in MSI?
Posted by:
AngelD
15 years ago
ORIGINAL: VBScab
Why would you need to? Do your users have a constantly-open instance of Explorer?could you please let me know how to implement the same in MSI?
Sure they are Ian; however it's called Desktop in this case as the explorer.exe process will be launched by the (Desktop Shell) userinit.exe process during logon. So there will always be at least one instance of a running explorer.exe process.
But this you knew [;)]
Posted by:
anonymous_9363
15 years ago
Posted by:
Inabus
15 years ago
Basically what is happening, I assume, is that your taking over a "core" extension, like .zip, and when you uninstall your package, thus removing the new assignment, your package isnt putting the extension back to default.
When restarting exploerer windows is doing an internal self repair and putting the extensions back. A good example of this is install winrar and allow it to take over .zip, uninstall winrar and you will notice that .zip extensions are unassociated until windows does this internal self repair.
The way to fix this is to put the extensions back yourself via your MSI on an uninstall.
As a test:
1) On a clean machine export the HKCR\.bmp key
2) Install your app
3) Uninstall your app
4) Import your reg file with the HKCR\.bmp key
5) Test
If that works, which I assume it will, then make a vbscript that will create those keys in your .reg file and allow that script to run at the end of the un-installation.
P
PS - I have a VBScript that puts back the .zip extension if an example is needed.
PSS - I know that this may of already be covered, just doing a brain dump ;)
When restarting exploerer windows is doing an internal self repair and putting the extensions back. A good example of this is install winrar and allow it to take over .zip, uninstall winrar and you will notice that .zip extensions are unassociated until windows does this internal self repair.
The way to fix this is to put the extensions back yourself via your MSI on an uninstall.
As a test:
1) On a clean machine export the HKCR\.bmp key
2) Install your app
3) Uninstall your app
4) Import your reg file with the HKCR\.bmp key
5) Test
If that works, which I assume it will, then make a vbscript that will create those keys in your .reg file and allow that script to run at the end of the un-installation.
P
PS - I have a VBScript that puts back the .zip extension if an example is needed.
PSS - I know that this may of already be covered, just doing a brain dump ;)
Posted by:
Packager2008
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.