/build/static/layout/Breadcrumb_cap_w.png

Script to Query MSIEXEC status.

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?

Thanks.

0 Comments   [ + ] Show comments

Answers (2)

Posted by: anonymous_9363 16 years ago
Red Belt
2
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
Posted by: Tone 16 years ago
Second Degree Blue Belt
0
Excellent, shall have a look at that.

Thanks.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ