Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Installation of an external executable fails in Windows XP SP3

Updated: 22 May 2010 | 23 comments
Madhu Samuel's picture
0 0 Votes
Login to vote

I am using Wise Package Studio 7.0 SP3 Enterprise Edition.



I want to install my application plus an external executable file. I could do this using the below msi script which was given in the Execute Deferred sequence.



"Execute Program From Installation Command Line /s(InstallMyExecutable) ",

where InstallMyExecutable points to the MyExecutable.exe file and its Inscript option is 'Deferred Execution - System Context', Processing is 'Synchronous'.



And the installation is succesful in Windows XP SP2. But when I try the same installation in Windows XP SP3, when the second executable is started the following error is displayed

"Another installation is already in progress. Complete that installation before proceeding with this install.".



With this error the installation of the second executable halts. If I install MyExecutable.exe directly, it is getting installed in Windows XP SP3. The error is thrown when I invoke the exectutable using Wise Package Studio 7.0 SP3.



It would be great if someone could give some insight on this issue. Please note that I have installed Windows XP SP3 in a VMWare (Vritualization Software) installation.



Please let me know whether there is any other way to execute an external executable.



Thanks,

Samuel

discussion Filed Under:

Comments

VBScab's picture
30
Nov
2008
0 Votes 0
Login to vote

There should be no difference between SP2 and SP3 behaviour, since that message is telling you that the Windows Installer engine cannot operate on more than one MSI at a time.



The fact that you get that message indicates that the EXE is extracting an MSI and attempting to run it against the Windows Installer engine. As such, you would be best advised to extract that MSI yourself and install it separately. As you may know, when you see the first screen of the install process, there will be an MSI in the %TEMP% folder (or possibly a sub-folder branching from %TEMP%).



Most would agree nowadays that nesting MSIs is A Bad Idea so, once you have the 2 MSIs, have them install as separate entities. You can do that either via your deployment mechanism or by building a wrapper EXE in WPS.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

Madhu Samuel's picture
30
Nov
2008
0 Votes 0
Login to vote

Thanks for your update.



By the creation of 'Wrapper Exe', did you mean that we will have one parent exe which inturn calls two other exe files? How can this be achieved using WPS?



Also can you please let me know which 'Deployment Mechanism' you referred to?



Thanks,

Samuel



EdT's picture
30
Nov
2008
0 Votes 0
Login to vote

Use the Wisescript tool to create an EXE which calls each of your MSI files in turn.



Examples of deployment mechanisms: SMS Server, Altiris Notification Server - corporate systems which install applications on corporate workstations to avoid having to visit each machine with a CD in your hand.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Madhu Samuel's picture
01
Dec
2008
0 Votes 0
Login to vote

Hello,



I am a newbie to Wise Tool. And I am afraid I need to ask some very basic questions.



I was trying to create a wrapper exe using the Wise Script tool and I am completely lost. Can you please let me know how to do it so that I can call the other two .exe files from this wrapper .exe file? Or if you could atleast point me where to look, then it would be great.



But if I have nested .exe files, then won't I have the same problem which I was referring initially. ie, the same error "Another installation is already in progress. Complete that installation before proceeding with this install."



Thanks in Advance,

Samuel

Madhu Samuel's picture
01
Dec
2008
0 Votes 0
Login to vote

As an extension to my previous post, we found that Windows Installer 3.0 has some issues.



http://www.ditii.com/2008/09/2...dows-installer-45-sdk/



Hence I have upgraded the windows installer version from 3.0 to 4.5. But still my initial error persists.

Madhu Samuel's picture
01
Dec
2008
0 Votes 0
Login to vote

Also please see the attached image (WiseSupportedOS.jpg). In the System Requirements option, Wise Studio Package 7.0 SP3 supports only upto Windows XP SP2.



Is this the reason parallel(asynchronous) execution of exe files are crashing in Windows XP SP3?



Do you have any workaround ideas to solve this issue?



Thanks in Advance,

Samuel



VBScab's picture
01
Dec
2008
0 Votes 0
Login to vote

quote:
Originally posted by: madhusamuel

As an extension to my previous post, we found that Windows Installer 3.0 has some issues.

...which I never encountered in [whispers] years of packaging. When you see posts referring to the need to contact MS directly to receive a hotfix, you can guarantee that the fix is only to be applied in a very limited set of circumstances. There is no way WI 3.0 was broken to the extent implied in that link.






quote:
Originally posted by: madhusamuel

But still my initial error persists.

Of course, because you haven't set up the MSI for multiple installs. I haven't yet played with 4.5 but, from reading the docs on MSDN, one has to set up stuff in new tables, which WPS knows nothing about. I wouldn't hold your breath waiting for WI 4.5 support in WPS.



Use the help to build your wrapper. It really isn't that difficult. Failing that, a simple batch file would suffice and, if you have to have an EXE, there are countless BAT/CMD-to-EXE converters around.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

EdT's picture
01
Dec
2008
0 Votes 0
Login to vote

If you are still trying to run an MSI install (even if it is in EXE format) from within another MSI install, without using a nested custom action, then you can play with versions of windows installer until the sun cools down, but it will not work. Windows installer is a single threaded process, and can only handle one MSI install at a time.



The next thing to do, is to find the MSI.CHM help file on your system (in the Altiris/Wise folders) and open it. Look up the VersionNT property. In fact, look for the "Property Reference" entry and review all the pre-defined properties that windows installer sets, especially in the Operating System category.



The System Requirements page is just setting up some launch conditions which you can find in the appropriate table via the Setup Editor tab (I will let you figure out which one). You can modify these launch conditions to suit later operating systems and other parameters of your choice, to allow for operating system versions that did not exist when the last update was released. There is also a search function on these forums where these issues can be found in previous threads, both current and archive.



Just bear in mind, when updating your system to Windows Installer 4.5, that your system no longer represents the vast majority of systems that might also want to install your software. You should always test your software on the lowest version of windows installer that your user base may have. Do not assume either that windows installer 4.5 is without bugs of its own.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VBScab's picture
01
Dec
2008
0 Votes 0
Login to vote

quote:
Originally posted by: EdT

Windows installer is a single threaded process, and can only handle one MSI install at a time.

I thought that one of the marketing points for 4.5 was the exact opposite as documented

here. Or have I read it wrong?



I wholeheartedly agree with the foolhardiness of packaging to 4.5, though.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

Madhu Samuel's picture
02
Dec
2008
0 Votes 0
Login to vote

Creating a wrapper exe will not solve our problem entirely. After creating the wrapper exe, we have issues with our uninstaller.



Other than the wrapper exe is there a solution using either the wise script or msi script?

Madhu Samuel's picture
02
Dec
2008
0 Votes 0
Login to vote

I am trying to execute the executable through the wise script as follows.



Get Windows Installer Property INSTALLATIONPATH into INSTALLPATH

Execute %INSTALLPATH%\myexecutable.exe [wait]



But we are getting the below error

"The script action, Get Windows Installer Property, can only be sued in a script that is executed by Wise for Windows Installer."



I wanted to get the location of the final installed product. How can I get the installatioin location of the appln in a variable, so that i can append myexecutable.exe to that location and invoke it using 'execute program' command.



Thanks,

Samuel

EdT's picture
02
Dec
2008
0 Votes 0
Login to vote

quote:
Originally posted by: VBScab


quote:
Originally posted by: EdT

Windows installer is a single threaded process, and can only handle one MSI install at a time.

I thought that one of the marketing points for 4.5 was the exact opposite as documented

here. Or have I read it wrong?



I wholeheartedly agree with the foolhardiness of packaging to 4.5, though.




I was referring to ONE INSTALL AT A TIME. Windows Installer 4.5 does not change this, as I understand it - it just allows you to specify a chained MSI install, which is then implemented ONE INSTALL AT A TIME, and rolled back in the same way if any of the installs fails.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

EdT's picture
02
Dec
2008
0 Votes 0
Login to vote

quote:
Originally posted by: madhusamuel

I am trying to execute the executable through the wise script as follows.



Get Windows Installer Property INSTALLATIONPATH into INSTALLPATH

Execute %INSTALLPATH%\myexecutable.exe [wait]



But we are getting the below error

"The script action, Get Windows Installer Property, can only be sued in a script that is executed by Wise for Windows Installer."



I wanted to get the location of the final installed product. How can I get the installatioin location of the appln in a variable, so that i can append myexecutable.exe to that location and invoke it using 'execute program' command.



Thanks,

Samuel




References to windows installer properties are only useable when your wisescript is running as a custom action inside the windows installer process.

You may find that the DOCUMENTED variable %INST% will give you the location of the folder from which the wisescript EXE is running.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

EdT's picture
02
Dec
2008
0 Votes 0
Login to vote

quote:
Originally posted by: madhusamuel

Creating a wrapper exe will not solve our problem entirely. After creating the wrapper exe, we have issues with our uninstaller.



Other than the wrapper exe is there a solution using either the wise script or msi script?




What issues? We can't help you if you don't provide us with more detail.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Madhu Samuel's picture
02
Dec
2008
0 Votes 0
Login to vote

Thanks. We will use the %INST% variable and see whether it will work. Will keep you updated.

Madhu Samuel's picture
04
Dec
2008
0 Votes 0
Login to vote

Folks,



Hurray! Got the solution. Thanks to Wise Studio Package Technical Support.



There are three safe ways to run a .MSI within another .MSI without generating the error that I was encountering.



First Method:

1. Go to the Build Options Page in Installation Expert.

2. Select <Single-file .EXE (only valid for files inside .MSI)> from the .EXE Options drop-down.

3. Go to Prerequisites Page in Installation Expert.

4. Click the Add button and select >Prerequisite.

5. The Prerequisite Details dialog appears. Browse for the .EXE in the File Path field.

6. Click OK and compile.



An .EXE will be generated that will run your .EXE before running the main .MSI. This is the recommended method proposed by Microsoft.



Second Method:

1. Go to MSI Script.

2. Add an Execute Program from Installation custom action in the User Interface of MSI Script after CostFinalize.

3. The Execute Program from Installation custom action dialog appears. Fill in the following information:

Custom Action Name: Enter a name.



Executable File: Browse for .EXE.



Command Line Arguments: Enter parameters, if needed.



4. Accept all other defaults and click OK.



Third Method:



1. Go to MSI Script and select All Custom Actions from the Installation Mode drop-down.

2. Add an Execute Program from Installation custom action and follow steps 3-4 from the Second Method instructions.

3. In the Properties tab of the custom action, change the Processing option to <Asynch, No Wait> under the Properties tab.

4. Go to Setup Editor and click Dialogs tab.

5. In the Exit dialog, double-click on the Finish button.

6. Click Events.

7. Add DoAction, with the argument the name of the custom action you added; set the condtion to Not Installed.

8.Click OK.



At the end of the install, when the user clicks Finish, this application will run.

VBScab's picture
04
Dec
2008
0 Votes 0
Login to vote

[removed]

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

EdT's picture
04
Dec
2008
0 Votes 0
Login to vote

Just bear one thing in mind - if you run the install silently (using msiexec with the /qn switch for example), then the UI sequence DOES NOT RUN. Hence your second method and possibly your third method will not work on a silent installation.



If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Dhanya MS's picture
22
Dec
2008
0 Votes 0
Login to vote

The 2 n 3rd option will fail if run as silent. First option will fail if MSI is run n not Exe. Is there any option to handle this for an MSI in silent installation case?

EdT's picture
22
Dec
2008
0 Votes 0
Login to vote

Use a wisescript wrapper to run each MSI in sequence.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Dhanya MS's picture
05
Jan
2009
0 Votes 0
Login to vote

But i have only one msi to call. This msi calls another msi inside... So when this second msi is called, windows installer throws warning telling another installation is in progress.



I dont have much control on the msi that i have to call from my package.Is there any way to handle this?

EdT's picture
05
Jan
2009
0 Votes 0
Login to vote

If you are calling an msi from within another msi, then you must either call it in the UI sequence, or use a nested custom action if installing in the Execute sequence. No other method will work as MSI installs are single threaded and two Execute sequences cannot be run concurrently.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VBScab's picture
05
Jan
2009
0 Votes 0
Login to vote

Therefore, it should follow that you need to run the install on your packaging workstation and copy ALL the MSIs somewhere safe as they get extracted. THEN you build your wrapper, calling each MSI in the same sequence.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.