Archive: log windows is empty when using nsexec


log windows is empty when using nsexec
Hi,

has someone observed the same behaviour as me.

When using nsexec the log window (under the progress bar) is always empty.
Not one instrcution is logged there even if the instruction
is something like "CreateShortCut" or "Delete" which are not used with nsexec.

My nsi script uses modern UI (mui.msh) with multilanguages.

Thanks in advance for any hint.


Are you using nsExec::ExecToLog?


Sorry, I've forgotton to say that neither nsexec::exec nor nsexec::exectolog are making a difference.


Can you attach script?


in the attached zip file is a nsh file used by nsi script.


Does the file D:\Service\subinacl.exe exists? Does it make output to command line?


Of course the file exists. It is fro changing the access right on file/directory and can be downloaded from Microsoft.
I think it is part of one of the resource kits.

Yes, subinacl.exe does make output to the command line like the log.exe which is called in the *.nsh file.
But this output is what I want to hide.
But I do not want to hide all other output produced by the NSIS commands like "delete, rmdir ..." or at the end the line completed


I see where is the problem. SubInACL's output to command line is in some extended mode (coloured text) and I think, that nsExec plugin can't handle it. You can try it yourself: subinacl.exe /? or subinacl.exe /? > output.txt (weird output too). I tried to nsExec::ExecToLog 'subinacl.exe /?' (attached) and it returns different values each time (why?).

My solution: Try to redirect output to file and parse/print that file
OR
you can use SubInACL's /outputlog switch.


Subinacl.exe ist not the problem nor is nsexec (in all variantes).

So I debugged a bit further and I found out that the problem is caused by the macro ${locate} from Usefull FileFuncs.snh used in my *.nsh file.

If I use instead of this "locate macro" the plugin variante from NSIS homepage with ${loacte::open} and ${loacte::finde} etc. Then every works fine!

Please do not ask me why. I have no clue.

If you set SetDetailPrint both after the ${Locate} call everything works fine also.


OK, but why is nsExec giving weird output each time when executing

subinacl.exe /?

No idea, but it works.


Excuse me, my attached script gives you right output (Subinacl's command line help)?


Some programs require terminal emulation and do not work with simple plug-ins for CLI input-output redirection (nsExec, ExecDos). Colored text is a terminal feature, so subinacl will not work here. 'Usage' printout may work in a 'short loop' and just puts text to stdout, not sends any escape sequences (but on my comp I see grayed text for /help as well).
Another example of such utility is telnet.