/build/static/layout/Breadcrumb_cap_w.png

File Extensions Issue

Hi Everyone,

After uninstallation of my application file extensions doesnot get changed to Windows defaults. If i reboot the system, it gets changed.

What changes do I need it to make in the MSI to make it work without reboot.

Any help would be appreciated. Thanks in Advance!!



0 Comments   [ + ] Show comments

Answers (13)

Posted by: Inabus 15 years ago
Second Degree Green Belt
0
Well the biggest help would be to know what extension your trying to fix?????
Posted by: Packager2008 15 years ago
Senior Yellow Belt
0
i am trying to fix .bmp, .cur, .wav, .jpg extensions.
Posted by: shweta_kar 15 years ago
Blue Belt
0
Your application while installing must editing the registry values of the extension you mentioned,so during uninstall just restore the default values through Custom Action.
Posted by: anonymous_9363 15 years ago
Red Belt
0
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.
Posted by: Packager2008 15 years ago
Senior Yellow Belt
0
still the icon remains same :(. Its not getting changed to default one.
Posted by: shweta_kar 15 years ago
Blue Belt
0
Are you restoring their respective progid's too besides their extensions.
Posted by: anonymous_9363 15 years ago
Red Belt
0
still the icon remains same :(. Its not getting changed to default one.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').
Posted by: Packager2008 15 years ago
Senior Yellow Belt
0
cannot find the related cache file. if I restart explorer.exe, it works. could you please let me know how to implement the same in MSI?

Thanks,
Posted by: anonymous_9363 15 years ago
Red Belt
0
cannot find the related cache fileI 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...)

could you please let me know how to implement the same in MSI?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).
Posted by: AngelD 15 years ago
Red Belt
0
ORIGINAL: VBScab

could you please let me know how to implement the same in MSI?Why would you need to? Do your users have a constantly-open instance of Explorer?

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
Red Belt
0
Indeed but that instance doesn't show any file extension icons, does it? It becomes an issue when another instance is opened e.g. when the user selects 'My Computer/Explore'. That new instance will show the new icons if it's opened after the icon cache file has been deleted.
Posted by: Inabus 15 years ago
Second Degree Green Belt
0
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 ;)
Posted by: Packager2008 15 years ago
Senior Yellow Belt
0
I added batch file to my package with below commands which resolved the problem.

assoc.bmp=Paint.Picture
assoc.cur=curfile
assoc.wav=soundrec
assoc.jpg=jpegfile


This restores the default file extensions. Thanks everyone for your help.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ