Create flag if user Cancels action

(imported topic written by Steve91)

Hi Chaps,

I’m deploying some new wallpaper & a screensaver to a particular group of users in our company.

I’m targeting them by their login id as we don’t have a list of their machine names i.e. (exists current user whose (name of it as lowercase = “sgreu6” OR name of it as lowercase = “whigh4” OR etc…and I’ll be running this as a policy (it also incorporates relevance to exclude them if they already have the correct wallpaper/screensaver)

As part of the action i’ll provide the users with a message… “blah, blah, if you are not part of this business area click ‘Cancel’ to reject the update”

This all works fine and the action cancels but when the user restarts their PC or logs off and back on it sends the action to them again.

I was hoping there may be a way to create a flag file locally on the machine if the user selects to cancel the action? Basically, perform an action upon cancellation of the main action.

I could then incorporate this in my relevance i.e:

not exists file “newbrand.flg” of system folder AND (exists current user whose (name of it as lowercase = “sgreu6” OR name of it as lowercase = “whigh4” OR etc…

Anyone know if this is possible?

Thanks

Steve

(imported comment written by BenKus)

Hey Steve,

There isn’t really a way to run a separate action if the user cancels… but are you using the “Retry” or “Reapply” behavior in your action? If so, you can disable this these settings and the action will not re-run if the user cancels.

Also, you can shorten your relevance if you want. Here are some examples of how to make the relevance progressively smaller and faster:

q: exists current user whose (name of it as lowercase = “blah1” OR name of it as lowercase = “blah2” OR name of it as lowercase = “blah3”)
A: False

q: exists name whose (it as lowercase = “blah1” OR it as lowercase = “blah2” OR it as lowercase = “blah3”) of current user
A: False

q: exists (it as lowercase) whose (it = “blah1” OR it = “blah2” OR it = “blah3”) of name of current user
A: False

q: (";blah1;blah2;blah3;") contains (";" & name of current user as lowercase & “;”)
A: False

Ben

(imported comment written by Steve91)

Thanks for the reply Ben,

I haven’t got any reapply or retry options selected but it still attempts to run the action again the next time the user logs in on the same machine (after they have cancelled it)

My test releveance and behaviour is below:

(name of operating system as lowercase starts with “win” AND exists file “c:\anplc.coe” AND not exists file “2007brand.flg” of system folder AND exists current user whose (name of it as uppercase = “SWTEST”))

Message

The following message will be displayed before running the action:

Message from Desktop Services

We have identified you as and employee of…blah blah blah…

If you believe this to be incorrect please click ‘Cancel’ otherwise the installation will commence in 5 minutes or immediately if you click ‘Take Action Now’ Thank you for you co-operation.

The user will be able to cancel the action.

The message box will automatically be closed after 5 minutes and the action will be run.

No message will be shown while running this action.

Constraints

This action ends 09/02/2007 16:00:00, client local time.

It will run at any time of day, on any day of the week, only when a user is present.

Execution

If the Fixlet message becomes relevant after this action has successfully executed, the action will not be reapplied.

If the action fails, it will not be retried.

Post-Action

No operations will occur after the action completes

Any other ideas?

Thanks

Steve

(imported comment written by BenKus)

Hmm… It looks to me like you did all this properly and this action should only run once and if a user hits “cancel”, it should be considered a failure. I suppose there might be a bug here… but let’s first check:

  1. Are there other open actions for this same Task?

  2. What is the action status for a computer that clicks cancel?

  3. What is the version number of this agent?

Ben