Archive: Need help for a very in-depth installation


Need help for a very in-depth installation
Hey everyone,

First off I read through the rules for this forum and I believe what i'm wanting to do isn't against any of the rules. This type of installation is extremely important to me and I need to be able to accomplish this as soon as possible.

What I'm trying to achieve:

I resell software from a vendor and currently right now they don't offer great "Rebranding" features in the installation of their product. What I want to be able to do is create an installation file that will install both my software and their software at the same time. The only problem is their installation is a basic "setup.exe" that has to be ran since it creates a lot of different registry values etc.

I have my own setup.exe that i want to be ran before theirs so i can make sure that everything is installed properly. Their installation setup.exe installs some files, but sometimes they don't get installed correctly and this is where my setup.exe comes into play by installing this files first so their setup.exe skips trying to install since theirs does a check to see if those files (ones required) have already been installed on the system.

Another thing I would love to be able to do, which i don't know if i can, is when their setup.exe has completed, it takes a file from where my setup.exe installed to and replaces it with a file their setup.exe has created.

For Example... Their setup.exe after completing creates a desktop Icon pointing to their software.exe. I want their software.exe to be renamed to something like vendorsoftware.exe and then a file from my Setup.exe (my installation that happened first) to be placed into their folder and named software.exe

Why you ask? well they don't have an automatic updater feature. i have wrote an automatic updater for their software that i want to be ran before their software opens. My automatic updater needs to run first, check for updates, then run their actual software.


Hopefully I didn't confuse you guys too bad. I made these basic steps to give a more "visual" idea..

to help prevent confusion these are "variables" i will use in these steps.

My SETUP.EXE is called "Eqiz Software"
Their Setup.exe is called "Vendor Software"
NewSetup.exe = the created installation file using NSIS

1) Main Installation starts (NewSetup.exe)
2) NewSetup.exe starts installing "Eqiz Software"
*Note - Being able to play a FlashVideo during this part while other installs are going would be really nice*
3) Once completed, it then starts the setup.exe for "Vendor Software"
4) Once completed, it renames the file "startup.exe" from inside the "Vendor Software" directory (which is always the same path, we will say it goes to "C:\VendorInstall\") to "vendorstartup.exe" then takes the "startup.exe" from "Eqiz Software" directory (C:\eqizDirectory\) and places it into the C:\VendorInstall\ directory.


This way when the shortcut that was created by the "Vendor Software" installation will open the newely placed "startup.exe" located in C:\VendorInstall\


I've tried reading some of the tutorials and code behind trying to do something like this, but i haven't came close to finding out specifically how. If need be i'll pay someone to do this, but i have been programming for a while and can understand it pretty easily if someone could help point me into right direction.


This is very simple to do. Simply install your own files, then execute the other setup using ExecWait, then continue doing your own stuff.

Section
SetOutPath "C:\VendorInstall"
File "File1.ext"
File "File2.ext"
SetOutPath $PLUGINSDIR
File "Vendor Software.exe"
ExecWait '"$PLUGINSDIR\Vendor Software.exe"'
SetOutPath "C:\VendorInstall"
Rename "C:\VendorInstall\startup.exe" "C:\VendorInstall\Vendorstartup.exe"
File "startup.exe"
SectionEnd

Note that the user will need to go through the installation steps of vendor software.exe manually, unless that setup features a silent mode (something like ExecWait '"$PLUGINSDIR\Vendor Software.exe" /silent' ).

It sounds like you're new to NSIS. To learn NSIS, you should start by looking at NSIS\Example1.nsi and Example2.nsi. Learn what all the commands in those examples are for, and why they are used. You can use the command reference for this: http://nsis.sourceforge.net/Docs/Chapter4.html
Once you've done that, you will be well underway to building your own NSIS installer.