Pre-install exe file before InstallShield main process - installshield

I am using InstallShield for creating .ism files of C# projects.
To run my project (A) successfully I need to have already installed another program (B) via an .exe file.
Is it possible to add this installation (B) as an extra step on the main installation (A) using InstallShield?
How can I achieve pre-installation using InstallShield for project (B)?
To be honest, I have searched a lot, but could not find something clear.
Thank you in advance!

We can add it in the end as a step.
.exe for project B can be added on the project A as a file and select to launch it at the end of the installation.
Answer found here: Run solution exe after installtion using installshield , on #Christopher Painter answer.

You can set the installation of (B) with a redistributable of (A).
Create an .exe setup for A using installshield, the setup should be bare minimum.
Create a new redistributable of A (tools | prerequisite editor)
Select the setup package as a redistributable in the project B (using installshield | application data | redistributables), you should see it in the list.
Make sure under 'conditional installation', that the 'install before feature selection' is checked.
(optional) right-click on the redistributable package A, select prerequisite order, and then make sure it is set to be the first.
This should execute A prior to B, when executing B.
Note: advisable to include A (if small enough) bundled together with B. So that customer has both of them together in one package (B).

Related

Silent installation msi

0x80070652 - when installing VS 2012 C++ redistributables.
Hi All,
I have a weird issue for the last few days now, i've been looking for a solution in the forums, google etc.
So far, couldn't find a similar problem:
Scenario:
I have an "Basic MSI" project that deploy our company product.
everything worked OK till i needed to add installation of VS 2012 C++ redistributables.
i'm using the installscript to initiate a command line for installing it quietly - 'vcredist_x64.exe /q'.
if the custom action is being added to the execute sequance, the following error is coming from the "VS 2012 C++ redistributables. -
ERROR 0X80070652: ERROR_INSTALL_ALREADY_RUNNING.This error is due to Another installation is already in progress. Complete that installation before proceeding with this install.
if running it manually, regardless to the IS installation, everything is working perfectly.
Also, when the custom action is on the UI sequance - works great. - i cannot leave it on the UI sequance, since our product is being deployed quietly along with our product client.
I've been trying to change into a different project type - "installscript MSI"... Same error.
Please advise, thanks for any inputs.
Short Answer: You can't run this executable from inside your MSI for technical reasons, you should run them in sequence instead. First the executable, then your MSI (batch file or manually). Or you should make an executable that runs them in sequence (WiX Bundle for example).
VCRedist: The VS 2012 C++ redistributable vcredist_x64.exe is a WiX Bundle with a couple of MSI files inside. You are not allowed to run embedded / nested MSI files concurrently with the main MSI installation. Simple explanation here. Inline explanation: This is because MSI files install as a transaction that is supposed to be possible to roll back. Hence the file installation sequence locks the system to prevent other MSI files installing when one is already in progress.
Extract: You can extract a WiX bundle using the WiX toolkit's dark.exe: dark.exe /x D:\VCRedist vcredist_x64.exe. WiX toolkit must be installed and dark.exe must be in the path or you must specify its full path.
Setup.exe: The solution is to run the MSI files in sequence inside a setup.exe bundle created with WiX, Installshield (see link for sample screenshot - more on suite projects here), Advanced Installer or a similar setup creation tool. Another approach is to simply deliver the runtime next to your installer and install them in sequence with a batch file or even by instructing the user to do so.
Merge Modules: Most VCRedist versions have merge modules that you can use to install the runtime (as opposed to setup executables). WiX sample. These are merged into your own MSI at build time and hence feature no nested MSI processes. There are some issues with merge modules and recent VCRedist versions.
Links:
The latest supported Visual C++ downloads
Detect VC runtime presence
Similar answer

Add C++ redistribuitable in my .msi and install on silent

I am working with a setup project of Visual Studio 2015. I want to distribute the 2015 C++ library, vc_redist.x86.exe. But I don't want user to be aware of this pre-requisite, so the idea is that while he is running the .msi, the C++ library will be auto-installed.
I have been reading about the merge modules, but this cannot fix my problem because the setup.exe should be run. Please, could anybody tell me how to deal with this?
Many thanks!
You'll need to change (or create your own custom one) the standard bootstrapper that has documentation starting here:
https://msdn.microsoft.com/en-us/library/ms165429.aspx
The bootstrapper packages contain the detection and install logic for the redistributables. For example, the \Bootstrapper\Packages folder has VC redist folders, each with a product.xml and a package.xml about installing them as prerequisites. They have standard command lines such as:
Command PackageFile="vcredist_x64.exe" Arguments=' /q:a
and you can substitute that command with something like those listed here:
http://asawicki.info/news_1597_installing_visual_c_redistributable_package_from_command_line.html
that show the quiet options (as do standard Microsoft docs somewhere).

Adding InstallShiled project to another InstallShield project

I have two installshield projects, I want to ask is it even possible to wrap an existing ism project within a wrapper ism project?!
The desired functionality is:
When i use custom installation and select to install the nested project it will behave as like i used it's native installer.
I'm using installshield 2011 Professional edition.
Thanks for helping.
I encountered this SAME problem. I wanted an installshield project to run another installshield project (which was an updater) to bring the software up to date before installing the first installer.
I solved this by creating a batch file.
1) The user launches the install msi.
2) The installer prerequisites detects that "previous version must be installed" by checking the registry and runs the batch file
3) The batch file kills the current process of installer and runs the second installer
4) Once the second installer is finished, the batch file re-runs the first installer (by using the batch command START /WAIT, which waits for a process to finish)
5) Now that the second installer was installed, the prerequisites doesn't trigger, and you resume with the installation.
You can, with caveats. If both of your projects are Basic MSI or InstallScript MSI, you will encounter the limitation that Windows Installer will only allow one MSI at a time. The end result of that is you can either run both safely through actions in the UI sequence (and fail if they are run silently), you might be able to use MSI Chaining (which I don't personally recommend), or turn one of the MSI packages into a prerequisite, or you have to find another way.
One option could be to add a third project, a pure InstallScript project, as a wrapper. If you go down this route, you have to consider what user experience you want for installation, maintenance, and uninstallation, including deciding what shows up in Programs and Features. Note that in later versions of InstallShield the Suite or Suite/Advanced UI project type is designed for this, but only in the Premier edition. (The Advanced UI project type in the Professional edition only allows for one main package, and you have two already.)

Installshield: Upgrade Windows Installer do not update anything?

I have created an MSI installscript project in Installshield. I went to Project Assistant>Application Files, then added the application files(package) and built Setup.exe to install.
After installed these files, I went back to Project Assistant and added some application files, then i changed the product version for updating. Finally, i built the Setup.exe again. When i run the Setup.exe, the automatic update (Upgrade Window Installer Setup) asked me to update a new version. After finishing, I checked Program Files(x86) and the updating didn't do anything, the old package was still here.
How can i update my new package? Is there any way to disable the Upgrade Window Installer Setup?
Thanks for the help.
In my humble opinion, most likely, you added new files to existing Component with keypath, which didn't change. Also you should check "Add\Remove Programs" snap-in in Control Panel to see if upgrade was applied - there should change version of your product.
So, I recommend you check Components, and re-allocate files to new Components if I had right. Also please read more about Components and Files. Could start from here.
Two words about InstallScript MSI project. From InstallShield documentation: Because this project type uses two different engines, it is more complex than pure InstallScript or Basic MSI installation projects. It is recommended only for advanced users.
So, if possible, use Basic MSI project - it's a bit simpler than InstallScript MSI for begginers.

Stanford Engineering Everywhere CS106B Library

I am currently a C# programmer and have been interested in learning more about C++ and data structures. I found the CS106B class offered free online through the Stanford Engineering Everywhere program which seems like it would be a good fit.
I've tried to install the library files they use for the class and keep getting a message that I have to have visual studio 2005 installed for the setup file to run. I don't have 2005, but I've tried the express editions of both vc++ 2008 and vc++2005. Is there any way around this that I can get the proper files installed?
The zip file containing the libraries came with two files, an exe and an msi.
Just got it to work by using some information I found here: http://www.functionx.com/visualc/libraries/staticlib.htm
I'm using Visual C++ 2008 Express. Here's how I did it:
Download the PC Starter Code ZIP file for Assignment 1 from the
current semester's CS106B class website.
http://www.stanford.edu/class/cs106b/ In that file you'll find a
folder named "StanfordCPPLib". In that folder, you'll need the
StanfordCPPLib.lib and the *.h files you want to include.
In Visual Studio, create a new project (File -> New -> Project). Select a Win32
Console Application, choose a name, and click Next.
When the Application Wizard pops up, click Next (not Finish). In the
Application Settings, check the box marked "Empty Project". Click
Finish.
In the Solution Explorer, right click on the Source folder and
create a new .cpp file. (Add -> New Item -> Code -> C++ File)
Find your new project's folder in Windows Explorer. In that folder,
you should be able to find your new .cpp file you just created.
Paste the StanfordCPPLib.lib and your needed *.h files you
downloaded earlier into the same folder that contains your new .cpp file.
Finally, you need to add the library to our new project. In Visual Studio, using
the main menu, click Project -> Add Existing Item. The dialog should
default to your project's folder where you just pasted
StanfordCPPLib.lib. Select StanfordCPPLib.lib and click Add.
You should now be able to add an #include "example.h" for whatever .h files you copied into your project folder.
Note: Since you'll be using a newer version of Stanford's custom library, there may be some small differences between the original handouts and the new library. For instance, when using #include "simpio.h", the handouts list a function called GetLine(). In the new library, that function is capitalized differently: getLine(). Make sure you check the header files for correct syntax/usage.
Thanks to Dani, with his help, I succeed in installing the library on vs2008(both express and professinal are OK) on win7. With Dani's help,
I have finished the first three assignments in cs106X(winter2010) - life, ADT, boggle - so far.
I'm just a undergraduate in China, thanks so much to the great education of stanford and power of internet.
http://abloggingattempt.blogspot.com/2010/05/stanford-cs106-lib-and-vs2008-express.html
the following are copied mainly from Dani's blog.
Stanford CS106 Lib and VS2008 Express
The CS106B is a great CS Stanford course available online (iTunes e.g.) in video and for free. All assignments and the course itself use an in-house developed library (not sure if it has a name, cslib, cs106 lib, dunno) available in all of the assignment zips as well as installable with the Xcode/VS2005 wizard installs. The problem - the VS custom wizard will install on VS2005 only (could be that a newer version exists but I couldn't find one). So how to port the VS wizard to VS2008 Express(professional)?
- I got the 2005 custom wizard setup, PCLibs-VS2005-ADT-Installer.zip and used a small tool , the LessMSIerables(Universal Extractor also works well) in order to extract the contents of the msi file. The msi contains four folders with all the stuff needed to create a new custom wizard. So, the tool extracted the following:
SourceDir
|- Includes Folder
|- Library Folder
|- Project Folder
|- Wizard Folder
Now some copying:
The CS106CPPInc folder inside the 'Includes Folder' goes to
C:\Program Files\Microsoft Visual Studio 9.0\VC\include (as a subfolder!)
'Library Folder'\CS106CPPLib.lib goes to
C:\Program Files\Microsoft Visual Studio 9.0\VC\lib
'Wizard Folder\AppWiz\CS106 Assignment Wizard' to
C:\Program Files\Microsoft Visual Studio 9.0\VC\VCWizards\AppWiz
(meaning CS106... should appear as a sub-folder of AppWiz)
The three files in 'Project Folder' will go into
C:\Program Files\Microsoft Visual Studio 9.0\VC\Express\VCProjects\Stanford. One of those three files, the CS106 Assignment Wizard.vsz, needs to be edited (a text file) and its second line should become:
Wizard=VsWizard.VsWizardEngine.9.0
Was having the same problem. I found both the .h and the .c files online.
You can find them here:
http://www.ime.usp.br/~pf/Roberts/C-library/standard/cslib/
I suggest to go to the CS106B page directly:
http://www.stanford.edu/class/cs106b/
And grab newest assignments. They are compatible with VS 2008.
The assignment material from SEE is outdated (VS 2005). The assignments are not discussed in the video, so you won't miss anything by doing that.
Just download from the CS106B page and open in VS 2008, that will work!
Reading through handout 5P makes it seem like the installer will expect the file structure VS2005 will create - especially this sentence: "Run (and quit) Visual Studio (you can go ahead and register your copy if it asks you). It is important that you have done this at least once before proceeding to the next step."
Try creating a folder structure like: (under "My Documents") "Visual Studio 2005\Projects" and see if setup.exe will work.
I am using visual studio express, and all I did was to just unzip the files it works fine.. here I have done the CS106B assignment with also the full zip'd up files of that assignment as well, all I did was to uncompress the assignment from the cs106b website and open up the sln (solution) file within visual studio express.
There is no c++ library available for cs106b in unix system. I hope they publish the library in source.

Resources