I have an NSIS script that pulls other installers from a local share. Some of these update very often. Rather than push out a new NSIS script every time, I'd like the script to look for the most recent installer matching a pattern in a certain directory. Is there a plugin or a Windows API that I can call from NSIS to do this?
You can execute batch files with the !system command (at compile time)
Related
I have a kivy project in python.
I build an exe with Pyinstaller based on this project.
I have a .nsi compiled which builds me an .exe installeur based on the previous .exe.
Everything works !
I am actually scripting the proccess to make it easier.
PROBLEM: What is the line of command that build an .exe installer based on a .nsi and an .exe ?
(To be really precise, I want to replace the "open HM NSIS Edit software, find your file.nsi, right click on it, click on 'Compile and Execute'" by a command line on a Windows terminal)
Just pass the .nsi path to MakeNSIS:
"c:\Program Files\NSIS\MakeNSIS.exe "c:\mystuff\myinstaller.nsi"
It is possible to create extra defines with /D but you would know if your script requires this.
I have an electron app that I want my users to be able to install. However, a dependency of this app is a C++ package that I have compressed in a .zip file. I need the user to unzip this file and put it into a certain directory under Program Files (target platform is windows). Is it possible to create an installer that both installs the electron app and contains a payload that it can unzip and put into that directory?
Yes, this is possible. An Electron app is just a bunch of files that you can package however you want. A great tool for packaging Electron apps is electron-builder
electron-builder uses NSIS by default to build Windows setups. It also provides a way to customize the NSIS script
If you want to include additional resources for use during installation, such as scripts or additional installers, you can place them in the build directory and include them with File. For example, to include and run extramsi.msi during installation, place it in the build directory and use the following:
!macro customInstall
File /oname=$PLUGINSDIR\extramsi.msi "${BUILD_RESOURCES_DIR}\extramsi.msi"
ExecWait '"msiexec" /i "$PLUGINSDIR\extramsi.msi" /passive'
!macroend
In your case, instead of extramsi.msi, you'll probably want to include 7zip standalone console version and your additional .zip file. You can use this custom script to extract this file to wherever you want
I am building an installer using InstallForge.
Along with my install, i need to run some Third Party installers, for example, Cuda 9.1.
What I want is to create an installer, and a folder structure like this:
Installer.exe
InstallsDir
-Cuda.exe
-ThirdpartyInstall.exe
Then when my installer runs, it should also run the other two exe files.
In the setup process for InstallForge, it allows you to run commands, which i can use to run the exe files.
There is a command variable: <installpath>\ that is used to run a file from the path that my programme is installed to.
My question is, is there a similar command that i can use to run a file in the directory that the installer runs from?
How can i set a relative link to the current directory using InstallForge setup?
I need a help from you. Here is my total scenario:
I have created a batch file which will install some digital certificate. Now I need to make a one click installer(.exe) which will extract all the files (my provided digital certificates and bat file in the .exe file) to the temp folder and run the bat file to install them. After finishing, it delete the extracted files from temp folder. I made the bat file and it is working well but can't make the one click installer.
Can anyone suggest me how to create that one click installer (.exe)?
Windows comes with an integrated installer creator. IExpress.
I prefer 7z for mine. See link in MikeG's comment for additional details.
https://superuser.com/questions/42788/is-it-possible-to-execute-a-file-after-extraction-from-a-7-zip-self-extracting-a
I'm building a deployment for a work environment, and doing it with Inno Setup. I wrap the other installers in one Inno-exe-File. It's working fine with other exe installers, but fails when it comes to MSI installers.
I don't know if there is any general problem, but it completely ignores my file association with the MSI exe (it works fine in Explorer, the association is ok).
Any ideas ? Probably there is some general problem..
Have the script launch Windows Installer just by executing the .MSI file will not work--the lookup of the default action to do when you open a file is done by the shell, but not automagically done by programs trying to launch things.
But the answer is simple: you just need to provide the msiexec.exe command line to launch them, something like this:
%windir%\system32\msiexec.exe /i <your_msi_filename> /qb-
Thanks to ewall I found this working for me:
Use a bat file for execution of all your MSIs, where you call each with full path, this way:
"C:\WINDOWS\System32\msiexec.exe" /i "C:\Programme\mySetup\tmp\InstallernameX" /qb-