Archive: nsExec Issues and The ModerUI


nsExec Issues and The ModerUI
I have been reading all the forum threads regarding starting dos commands or batch files and have determined that nsExec should do what I want it to. However I am having some issues with it casuing the graphics of my installer to hang (using moder UI).

Here is a brief explanation of my install program. It is basically a wrapper for an MSI.

get user input
NSIS Installs files for MSI Installation.
custom leave funtions for MUI_PAGE_INSTFILES hides installer and runs the MSI with appropriate switches
some final pages then determine if MSI installed properly, etc

However, I have a few command line scripts that I want to run as soon as the MSI install finishes succesfully. I don't want the dos windows to show so I am trying it with nsExecLog (the output would be nice to display but not necessary). However, whenever I run this the gaphics hang until the commands finish.

I have placed the commands in several areas of the code with the same result.

It is logging the command' output to the installer window but I can't see it happening. I know it is logging because if I place a message box after the nsExec commands the installer re-paints when the message box appears and I can see the appropriate result in the log window.

No matter where I run these commands I can't get it to post the output while it is happening. And the installer hanging will not be acceptable

I also put all the commands into a batch file and ran

ExecShell "open" 'firewall.bat' SW_HIDE and
ExecShell "" 'firewall.bat' SW_HIDE

which runs the batch file fine, but the dos windows still appears even though I have the SW_HIDE option set.

None of these commands seem to be behaving the the documentation states. What am I doing wrong.


nsExec will pause your installer until it is finished, and there is no way of getting around this.
You should either display a Banner (see Contrib\Banner) or use DetailPrint if calling it in a Section.

-Stu


Banner looks like it might work to keep the user busy while these commands run. However I am getting strange results with it and the ModernUI. The example file for it says:

# Look at Readme.txt for usage alongside with the Modern UI

Yet no readme.txt was supllied for this dll in the NSIS install.

Where can I find it?


In the Docs folder.


OK, Thanks. Does MSIBanner work with the modern UI. I just tried it and it crashed the program. I can't find any documentation about the MSIBanner other than the samples. There is a clue about needing to destroy it in a "Section" section. I can't do this becasue I would use this Banner after the section have completed.

Also no one has answered why the SW_HIDE is not working on the ExecShell command.


ExecShell uses ShellExecute API call, and it cannot hide DOS windows.
MSIBanner related thread ;) http://forums.winamp.com/showthread....hreadid=211870 and wiki page with latest version.
It is possible to make DOS plug-in (nsExec or ExecDos)running with /NOUNLOAD (additional thread) but not implemented yet.


So the documentation for ExecShell is innacurate?

According to the threads you gave me, it appears that MSIBanner is obsolete and the nxs.dll replaces it?

Thanks again for your help.


I updated ExecDos to support async process execution.