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)...
Related
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
First time with making an installation file. Using NSIS. Trying to run a nodeJS script command line after installation completes and poking about online suggestions all seem to be a variation of
Section "runNodeJavascript"
nsExec::Exec '"$SYSDIR\cmd.exe" /c
node "c:\Program Files (x86)\FolderOne\FolderTwo\JavascriptToRun.js"'
SectionEnd
But my experimentation so far is for naught, any insight? Everything else with NSIS online has been pretty helpful making a little installer but for some reason hitting a little barrier here...
I have created a little electron program for one of my friends, it is a patcher for a private metin2 server of some sort. The game itself is really old so it requires a few redisturables to be installed.
[dxwebsetup0411 / dotNetFx35setup / vcredist_x86 ( i believe its a 2013 version) ]
I want to include them as an option at the end of the install (or even before it, doesn't really matter).
I have found a few examples how to do so but they are all for Standalone NSIS installers and when i try to include that script ( in the build/installer.nsh file ), the build process crashes, presumably because its not the main build script therefor adding Sections is prohibited (?).
Im really new to NSIS scripts and NSIS overall.
So far i only figured out how to put checkboxes and labels and so on in, with the help of nsDialogs, but as i looked at its documentation, it seemed that there are no option where i could do this.
Any help would be greatly appreciated.
EDIT :
My script currently is almost empty, I only changed the default directory, but anyway here is that:
!macro preInit
SetRegView 64
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Decay2"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Decay2"
SetRegView 32
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Decay2"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Decay2"
!macroend
Everything i know about electron-builder's NSIS main script and this included script is here :
Custom Script Example
NSIS- Electron Builder
It is definitely possible to embed other installers and execute them. See this example on SO:
Embedding other installers using NSIS
or these official NSIS tutorials/guides: https://nsis.sourceforge.io/Embedding_other_installers
Please post your script and build file(s) if you have some issue with your script and you expect specific answer.
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.
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"