Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Custom action calls MSIEXEC error


2 replies to this topic

binoco

binoco
  • Full Members
  • 8 posts

Posted 25 March 2010 - 09:25

Hello!!

I wrote a script function:
function RemoveMySQL(hMSI)
begin
if(LaunchAppAndWait(WINSYSDIR^"msiexec.exe","/uninstall \"" + INSTALLDIR^"mysql.msi" + "\"",LAAW_OPTION_WAIT)< 0) then
MessageBox ("Unable Remove My SQL.",SEVERE);
abort;
endif;
end;


And then, I add custom action to call above function.
If I add it to UI sequence then it's OK. But if I add it to Exec sequence then it's Error when run.

Error content : another installer is running. waitting for it finish.

In my task manager, it has 2 processes of msiexec.exe.

pls, help me!

Edited by binoco, 25 March 2010 - 09:34.


akerl

akerl
  • Full Members
  • 104 posts

Posted 25 March 2010 - 10:10

It's not possible to start a 2nd installation from the server process (table: InstallExecute Sequence). MSI follows the ACID rules for transactions. To achive the Isolation state, MSI set a mutex and prevent the second installation process.

Andreas Kerl

Inside Windows Installer 4.5
ISBN 3-86645-431-7


VBScab

VBScab
  • Full Members
  • 436 posts

Posted 25 March 2010 - 10:14

You can't have an MSI execute whilst another MSI is executing. Although you will see more than one instance of MSIEXEC.EXE in the process list, the extras are "server" processes.

Long story short: either build a stub executable which detects and uninstalls MySQL or, if the package you're building is for a new version of MySQL, use the Upgrade table. Appropriate positioning of the RemoveExistingProducts action will either completely uninstall previous versions or perform (what you might call) an in-place upgrade.

Search MSDN for details on the Upgrade table and the RemoveExistingProducts action.
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.