DukeyToo
28th November 2006 22:23 UTC
nsExec::ExecToLog may crash Outlook on silent install
  Sample script (also attached):
Name "Example1"
>; The file to write
OutFile "example1.exe"
>; The default installation directory
InstallDir $PROGRAMFILESExample1
Page directory
Page instfiles
Section "" 
  SetOutPath $INSTDIR
  
  nsExec::ExecToLog '"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\RegAsm.exe"'
 
>SectionEnd ; end the section 
>
Running the setup generated by the above in silent mode "/S" crashes Outlook 2003 on my machine 100% of the time. The command-line may or may not be relevant, but it is important that it produces text output. Changing to nsExec::Exec works around the problem, as does nsExec::ExecToStack.
      
      My theory is that something about the ExecToLog is faulty when directing the output to the (non-visible) NSIS log window.
    
 
    
      DukeyToo
      28th November 2006 23:30 UTC
      I confirmed that the command path is not relevant. The sample nsExec found at http://nsis.cvs.sourceforge.net/*che...i?revision=1.5 exhibits the same problem as the sample I gave.
      
      Also confirmed the issue does not crash Outlook 2003 on all machines.
     
    
      robotmp3
      30th November 2006 13:49 UTC
      My customer also complains about the crashes of Outlook 2003 on some Machines in silent mode. Unfortunately I cannot reproduce that :(, but have a lot of nsExec::ExecToLog and have no possibility to check the cause yet.
      I would be very gladly for a help
     
    
      Takhir
      30th November 2006 18:01 UTC
      DukeyToo
      Can you reproduce the situation with ExecDos plug-in? Last version supports redirection to stack, but some details may differ compare to nsExec. Put included dll to NSIS\plug-ins folder.
     
    
      kichik
      30th November 2006 18:47 UTC
      LogMessage does nothing if g_hwndList is NULL. However, I can see how g_hwndList can get the wrong value when g_hwndParent is NULL.
      
      Try the attached version and let me know if it still crashes.
     
    
      DukeyToo
      1st December 2006 14:37 UTC
      Updated nsExec dll works
        kichik
      I downloaded the nsExec you supplied, and it no longer crashes Outlook :)
      
      Thanks much.
      ~Steve
     
    
      DukeyToo
      1st December 2006 14:46 UTC
      Takhir
      I tried the exec2stack example for ExecDos, and it did *not* crash Outlook. I doubt it would sufer from the nsExec problem, since it does not access the listview window.