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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Well the biggest help would be to know what extension your trying to fix?????
Answered 02/02/2009 by: Inabus
Second Degree Green Belt

Please log in to comment
0
i am trying to fix .bmp, .cur, .wav, .jpg extensions.
Answered 02/02/2009 by: Packager2008
Senior Yellow Belt

Please log in to comment
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.
Answered 02/02/2009 by: shweta_kar
Blue Belt

Please log in to comment
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.
Answered 02/02/2009 by: VBScab
Red Belt

Please log in to comment
0
still the icon remains same :(. Its not getting changed to default one.
Answered 02/02/2009 by: Packager2008
Senior Yellow Belt

Please log in to comment
0
Are you restoring their respective progid's too besides their extensions.
Answered 02/03/2009 by: shweta_kar
Blue Belt

Please log in to comment
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').
Answered 02/03/2009 by: VBScab
Red Belt

Please log in to comment
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,
Answered 02/03/2009 by: Packager2008
Senior Yellow Belt

Please log in to comment
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).
Answered 02/03/2009 by: VBScab
Red Belt

Please log in to comment
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 [;)]
Answered 02/03/2009 by: AngelD
Red Belt

Please log in to comment
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.
Answered 02/03/2009 by: VBScab
Red Belt

Please log in to comment
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 ;)
Answered 02/03/2009 by: Inabus
Second Degree Green Belt

Please log in to comment
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.
Answered 02/04/2009 by: Packager2008
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity