<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Waiting to Install</title><link>http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx</link><description>How to wait for a previous install session to finish instead of failing a concurrent install.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Waiting to Install</title><link>http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx#10313291</link><pubDate>Fri, 01 Jun 2012 10:25:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10313291</guid><dc:creator>Heath Stewart</dc:creator><description>&lt;p&gt;@kashif, sorry, but that is not supported or even possible that I know of. There are WMI classes that may work, but these are not documented and do not seem to represent running instances.&lt;/p&gt;
&lt;p&gt;Why do you need to know what is installing instead of just waiting?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10313291" width="1" height="1"&gt;</description></item><item><title>re: Waiting to Install</title><link>http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx#10254482</link><pubDate>Mon, 09 Jan 2012 08:05:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10254482</guid><dc:creator>kashif</dc:creator><description>&lt;p&gt;I need to know the product code of the product that windows installer is installing before launching my installer. I can check the mutex but it only tells me that Windows installer server is busy or not. Is there a recommended way to find the product code that is currently being installed?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10254482" width="1" height="1"&gt;</description></item><item><title>The Windows Installer Service</title><link>http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx#1241422</link><pubDate>Fri, 08 Dec 2006 21:11:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1241422</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>&lt;p&gt;Some have noticed that the msiexec.exe process seems to run for quite some time after a known installation&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1241422" width="1" height="1"&gt;</description></item><item><title>re: Waiting to Install</title><link>http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx#661640</link><pubDate>Mon, 10 Jul 2006 22:33:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:661640</guid><dc:creator>Heath Stewart</dc:creator><description>Matt, WaitForSingleObject will wait to own the mutex, waiting either till the mutex is signaled or till any expiration interval expires. It then may own the mutex, thus changing the state from signaled to nonsignaled and other threads calling WaitForSingleObject on the mutex will wait. Any other thread trying to own the mutex will fail unless it waits for the mutex in a similar manner. Windows Installer by default will fail with ERROR_INSTALL_ALREADY_RUNNING (1618). This is why a bootstrap application must implement waiting on the mutex.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=661640" width="1" height="1"&gt;</description></item><item><title>re: Waiting to Install</title><link>http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx#661514</link><pubDate>Mon, 10 Jul 2006 19:47:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:661514</guid><dc:creator>Matt Gerrans</dc:creator><description>Hmm... Maybe I'm missing something. &amp;nbsp; Where do you take ownership of the mutex? &amp;nbsp; And as I said before, if you did, wouldn't that prevent the install from working?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=661514" width="1" height="1"&gt;</description></item><item><title>re: Waiting to Install</title><link>http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx#659127</link><pubDate>Fri, 07 Jul 2006 19:04:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:659127</guid><dc:creator>Heath Stewart</dc:creator><description>Matt, you can choose to wait indefinitely or finitely - it's your choice based on your requirements. This is only an example of how to wait for Windows Installer to finish the current server action.&lt;br&gt;&lt;br&gt;If you don't install the package on the thread that opened the mutex, the server action will fail because the thread won't own the mutex. That's the whole point of using a mutex - to block other threads and processes until another thread can own the mutex.&lt;br&gt;&lt;br&gt;Making the thread real-time priority is another design consideration you should make based on requirements. This example certainly doesn't need to assert that it should be the next in line, and giving the thread a higher priority won't necessarily guarantee that it would be anyway.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=659127" width="1" height="1"&gt;</description></item><item><title>re: Waiting to Install</title><link>http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx#658488</link><pubDate>Fri, 07 Jul 2006 04:49:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:658488</guid><dc:creator>Matt Gerrans</dc:creator><description>An enhancement might be to have a time out and failure rather than an INFINITE wait.&lt;br&gt;&lt;br&gt;Even fancier would be popping up a dialog with a cancel button that says we're waiting on another install.&lt;br&gt;&lt;br&gt;Is the &amp;quot;// Install the package on the current thread owning the execution mutex.&amp;quot; comment in your code correct? &amp;nbsp; &amp;nbsp;I don't see where the mutex is opened in this code (and anyway, it would hose msiexec if it were).&lt;br&gt;&lt;br&gt;And finally, it might be helpful to up the thread priority to realtime as soon as we get the mutex, so our install is a little more likely to be the first one to get to the point where msiexec grabs the mutex.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=658488" width="1" height="1"&gt;</description></item><item><title>Common Controls in Windows Installer UI</title><link>http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx#527189</link><pubDate>Wed, 08 Feb 2006 04:50:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:527189</guid><dc:creator>Heath Stewart's Blog</dc:creator><description>How to display new controls with Common Controls 6 in your Windows Installer dialogs with a different bootstrap or external UI handler application.&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=527189" width="1" height="1"&gt;</description></item><item><title>http://blogs.msdn.com/windows_installer_team/archive/2005/11/09/487559.aspx</title><link>http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx#521232</link><pubDate>Wed, 01 Feb 2006 02:40:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:521232</guid><dc:creator>TrackBack</dc:creator><description>&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=521232" width="1" height="1"&gt;</description></item><item><title>re: Waiting to Install</title><link>http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx#516626</link><pubDate>Tue, 24 Jan 2006 07:19:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:516626</guid><dc:creator>Heath Stewart</dc:creator><description>Phil, that's exactly the problem - even if you're waiting for the service to stop (say, polling for acceptance of the stop request or even if the service is running) there exists a race condition. Using the _MSIExecute mutex will guard against such a race condition.&lt;br&gt;&lt;br&gt;Also, the second line of the same pseudo-code to which you refer should also be &amp;quot;bInstallRunning = false&amp;quot;. If the service isn't running, no install is processing. mikeb's comment is correct there.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=516626" width="1" height="1"&gt;</description></item></channel></rss>