- NSIS Discussion
- log windows is empty when using nsexec
Archive: log windows is empty when using nsexec
sofaelch
24th September 2008 11:53 UTC
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.
pospec
24th September 2008 12:23 UTC
Are you using nsExec::ExecToLog?
sofaelch
24th September 2008 12:28 UTC
Sorry, I've forgotton to say that neither nsexec::exec nor nsexec::exectolog are making a difference.
pospec
24th September 2008 12:29 UTC
Can you attach script?
sofaelch
24th September 2008 15:49 UTC
in the attached zip file is a nsh file used by nsi script.
pospec
25th September 2008 07:49 UTC
Does the file D:\Service\subinacl.exe exists? Does it make output to command line?
sofaelch
25th September 2008 07:58 UTC
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
pospec
25th September 2008 08:23 UTC
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.
sofaelch
29th September 2008 07:45 UTC
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.
pospec
29th September 2008 07:54 UTC
OK, but why is nsExec giving weird output each time when executing
subinacl.exe /?
sofaelch
29th September 2008 09:02 UTC
No idea, but it works.
pospec
29th September 2008 09:16 UTC
Excuse me, my attached script gives you right output (Subinacl's command line help)?
Takhir
2nd October 2008 07:42 UTC
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.