Are you using ProgId/Extenstion in your MSI?  If so, Windows Installer "should" 
take care of this for you. 

To be safe, I think I'd place this inside the InstallExecute sequence after 
InstallFinalize. This would ensure your binaries were on disk so any icons for 
the new extensions would be available for the shell to cache.


-----Original Message-----
From: up2date.cyb...@gmail.com [mailto:up2date.cyb...@gmail.com] 
Sent: Sunday, January 13, 2013 6:01 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Notify shell for new file associations

Hi
In my wix product project, I create some file associations in the registry.
I have a small c++ custom action with only:
   ::SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_DWORD | SHCNF_FLUSH, NULL, NULL);
   ::Sleep(1000); //
http://msdn.microsoft.com/en-us/library/windows/desktop/cc144154(v=vs.85).aspx

My question is, when should I run this action, is it correct to do the 
following?
     <CustomAction Id="ShellNotifyAssociations"
                   BinaryKey="MyWixCA"
                   DllEntry="ShellNotifyAssociations"
                   Execute="immediate"
                   Return="ignore" />
     <InstallExecuteSequence>
       <Custom Action="ShellNotifyAssociations" 
After="WriteRegistryValues" />
     </InstallExecuteSequence>

In other words: is executing the custom action after WriteRegistryValues 
correct?, if not, which action should I use?
thanks

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, 
Windows 8 Apps, JavaScript and much more. Keep your skills current with 
LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. 
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to