Unicode NSIS Exec/ExecWait - nsis

Is it possible to execute command within Unicode NSIS script.
Execution works ok, if i use non Unicode NSIS version, but
when i try it with Unicode version it just doest do anything.
Command: Exec '"$TEMP/myFile.exe"'
Thank you

I found workaround.
I used UAC plugin (Unicode version) and executed
!insertmacro UAC_AsUser_ExecShell "$TEMP\myFile.exe"

Related

NSIS zipDLL.nsh not working with NSIS portable version

I'm trying to compile a script, perfectly working with NSIS installing version, by NSIS partable version but it doesn't work.
Other .nsh files, also natively available in Include folder of NSIS portable version, called by the script are working well. The web downloaded zipdll.nsh file, added in a second time into the Include folder of NSIS portable version, is at moment the only file called by the script that doesn't work!
The compiler gets back the following message:
!include: "C:\PortableApps\NSISPortable\App\NSIS\Include\zipdll.nsh" (UTF8)
!define: "ZIPDLL_USED"=""
Bad text encoding
!include: error in script: "C:\PortableApps\NSISPortable\App\NSIS\Include\zipdll.nsh" on line 77
Does anybody of you know how to put me in the right direction?
Thanks in advance to everyone who will help me
That file contains multiple languages but is not valid UTF-8 so you have to force the codepage:
!include /CHARSET=CP1252 zipdll.nsh

Nsis ExecWait command under the hood

There's a nsis exe that I know it using Nsis ExecWait to run a process.I need to hook it so I could replace the exe it Exec.
The problem is I'm not sure about what api to hook.And I've try dive into Nsis source codes till now find nothing:(. So Is there anyone familiar with nsis source codes give me some clue so I could find what ExecWait command under the hood API?
ExecWait is currently just CreateProcess+WaitForSingleObject.
In the NSIS source this instruction is called TOK_EXECWAIT in the compiler (script.cpp) and it maps to the EW_EXECUTE opcode in the installer stub (exehead/exec.c)...

Execute another installer silently within your Nsis installer

I am trying to execute ffdshow.exe silently within my nsis installer but ffdshow doesnt seem to work with my method but MatroskaSplitter.exe and other installers have run silently with the same method.
File "..\Prerequisites\ffdshow_rev4515_20130612_clsid.exe"
ExecWait '"$INSTDIR\ffdshow_rev4515_20130612_clsid.exe" /S'
Are you sure ffdshow uses NSIS?
It looks to me like they are using Inno so you could try /silent or /sp- /silent /norestart.

NSIS Silent Install changing default options

I have a third party application I would like to silent install from the command line.
The application is PPLive available at: http://www.pptv.com/en/
It is an NSIS installer, and currently when silently installed, installs toolbars, and additional pieces of software, launches on completion etc.
Without repackaging it, how do I control the checkbox options on the pages of the normal installer from the silent command line install.
Is it even possible?
NSIS supports the silent install option with the /S command line script, however, it only sets a flag that the install script can check:using IfSilent.
There is an example script here that demonstrated a silent installation.
You can't control the components unless the installer has been coded specifically for it (By using a "answer" file/.ini or some parameter you pass on the commandline) NSIS itself only allows the author of the installer to know if it is in silent mode or not, the rest is up to them. You would have to ask the PPLive people about it (Or request that they add it if they don't support it already)

ANSI color support using Groovy on Windows XP

Trying out the examples found on pleac.sf.net, I'm not able to get an example of ANSI colors to work on my WinXP box (Works fine on MacOS). What I've found is that on my WinXP machine, in both cygwin & DOS prompts, groovysh --color (and 'groovysh --terminal=unix') shows escape codes rather than the expected colored prompt. grep --color works just fine in the cygwin terminal. I can't find anything obvious that I'm doing wrong. Any ideas?
Note: I'm using Groovy 1.6.0
Update: I've tried adding ANSI.sys to my config.nt mentioned here Groovy-dev Mailing List but it didn't fix the problem (tried rebooting too).
I have the same problem, my solution is ugly but simple: Pipe groovy output to cygwin cat.exe
Suppose your script red.groovy is:
println "\u001B[31mI'm Red\u001B[0m Now not"
Then from command shell
groovy.bat red.groovy | cat
will display the right colors.
Of course you can write your own native code that handle the ANSI codes.
The thing is, you'd have to add DOSONLY to your CONFIG.NT as well to make the ANSI.SYS driver work, and then it would only work for COMMAND.COM which emulates DOS 5.0. Regular Command Prompts (CMD.EXE) do not support ANSI colors at all, afaict.
I don't know much about how cygwin handles it.
The Groovy site says to do this for cygwin:
groovysh --terminal=unix
For the winxp command shell, as far as I know, there is no ANSI support at all, not even with ansi.sys. Colors are supported through some MS API only.
A workaround in cygwin is to launch xterm or rxvt and run it there.

Resources