"Pause while"-command results in failed action

(imported topic written by NikolasM)

Hi,

I’ve been trying to create an actionscript to uninstall browser-toolbars, but when using this command:

pause while {exist running application (“chrome.exe”;“firefox.exe”;“iexplore.exe”)}

But the action returns as failed after reporting as running for a while…

Is there a time-limit for the command or something like that? It worked perfectly in the Fixlet Debugger…

Thanks for your input in advance!

(imported comment written by NikolasM)

Does anyone have any information concerning this problem?

Indeed this seems to run for me in the Fixlet Debugger, and I don’t have the full client here at home to check out a real action.

But it occurs to me that while this does work, I think it’s more “correct” to use the plural versions of the inspector, since you may get plural (including 0) results.

pause while {exists running applications (“chrome.exe”;“firefox.exe”;“iexplore.exe”)}

If that doesn’t do it, there may well be an action timeout, but it would shock me; I’ve had hung Java installations and one .NET Framework update, that fail in way that they try to pop up a message to the desktop (which won’t be visible since we’re running as a service). It leaves the Client in a state where the action reports as “Running”, it never gets beyond it or runs other actions; I’ve seen it stuck that way for several days at a time (and I wish I could find a way to get it to give up on a running action after a timeout).

I would not recommend using the Pause While in this way because it will prevent all other actions from running while it is paused.

Also, there is a way to use Pause While, with a timeout.

Parameter "timeout" = "{now}"

pause while { ( now-parameter "timeout" as time ) < 1 * hour AND exists running applications "chrome.exe" }

I haven’t tested this relevance for syntax, but the idea is solid and I use it all the time, but usually for a time out of 5 min or less. I definitely would not use it for more than 1 hour.


A better method is to add this relevance to the Fixlet/Task relevance itself and have it as an open action targeting a group of computers. Then the Fixlet/Task will only run when the programs are closed.

The method I recommend for updating endpoints is to have a baseline with a bunch of stuff in it that should target all computers, or nearly all computers. This baseline contains all of the software that should be installed and updated. You target this baseline to only run when no user is logged in.

Separately from this baseline, you have actions that target all endpoints that already have the software you are updating installed, and only if that software is not running. This will update more likely than the baseline, but in a different way.

Separately from that you can have yet another action that prompts the user to save their work because it is going to close the running application and update it. The trick is you set this action to start 2 weeks in the future so that the majority of your users will never see it and be updated by the above actions.

The next thing to do is have an open action that runs forever and prompts all users to reboot their computers at least once every 14 days give or take. If they haven’t rebooted, then this will force them to.

Tell your users if they don’t want to be bugged by this, then they should reboot their computer at least once a week at the end of the day and just walk away and let the updates roll. WU/WSUS should take care of some of the reboots as well.

1 Like

I was just working this issue with a client, used this same technique to add a timeout to a Pause While (we used 5 minutes and it worked very well)

I would add 2 bits of technique

Use a Continue If after your Pause While with timeout, so you can kill the action if your Pause While hits the timeout.
Parameter "timeout" = "{now}" Pause while { ( now-parameter "timeout" as time ) < 5 * minute AND exists running applications "chrome.exe" } Continue if {not exists running applications "chrome.exe" }

Session relevance to check for computers that might be “stuck” on a Pause While:
(id of it, ids of computers of results whose (status of it = bes action status running) of it) of bes actions whose (state of it = "Open" and exists results whose (status of it = bes action status running) of it and action script of it as lowercase contains "pause while")

3 Likes