I have a WMI script that queries msiexec so I dont recieve ERROR_INSTALL_ALREADY_RUNNING 1618 An installation is already in progress.

The only problem with this is that the service can be running but idle for 5 to minutes, ideally I would just stop the service but I want to run the script in the user context.

Is there any way of querying the status of msiexec?

0 Comments   [ + ] Show Comments


Please log in to comment

Community Chosen Answer

I *think* what you're asking is whether or not you can see if MSIExec is running as a stand-alone (in what one might call 'client mode') as opposed to running as a service? I'm not sure if WMI has a mechanism for divining which user is running an EXE - as a service, MSIExec will be run by the 'System' user, of course, whereas when an install runs, there will the System user's instance and the logged-on user's instance. Do I recall from my mind's darker recesses that you can query a processes owner? Check that out...

EDIT Here you go, found this http://www.microsoft.com/technet/scriptcenter/guide/sas_prc_fywf.mspx?mfr=true
Answered 01/30/2008 by: VBScab
Red Belt

Please log in to comment
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


Excellent, shall have a look at that.

Answered 01/30/2008 by: Tone
Second Degree Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity