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.
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)
Please log in to answer
Posted by:
anonymous_9363
16 years ago
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
EDIT Here you go, found this http://www.microsoft.com/technet/scriptcenter/guide/sas_prc_fywf.mspx?mfr=true
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.