Tuesday, December 16, 2008

Use the Sysinternals Utilities? The EULA bug dialog you? Then try this…

Ask the Performance Team - Batch Files, Task Scheduler and PSTools – and a EULA?

“… The problem that he was running into was that the task never executed the query when run from Task Scheduler, but they ran fine when executed manually.

In these instances, the immediate assumption is that the problem must be due to permissions.  However, in this instance, the task was running in the context of a service account with administrative privileges.  Thus, the immediate culprit was ruled out.  When reproducing the problem, we noticed that when we ran the batch file manually that both PsService and PsTools have a EULA that has to be accepted before the tool(s) will execute:

The service account currently had no way to “click” the Agree button to allow the task to process.  However, all was not lost.  There were a couple of workarounds that we could use to get past this …

Workaround 1: Via the registry – using the REG ADD command in the custom script to ensure that the EULA was flagged as being accepted

Workaround 2: Use the –accepteula switch when running the tools so that the EULA acceptance is not displayed when the script is launched via Task Scheduler.

…”

This is a tip I know I’ll need. I want to use BGInfo so that all of our ‘workhorse” machines (over 140) have the cool and very useful wallpaper that the utility provides. But I didn’t want my users to have to accept the EULA. Sure they would only have to do it once per machine, but still, it would be lame. Which this tip, I should be able to automate the acceptance and remove one more deployment and usage barrier.

As noted in the post not all the utilities may support the “accepteula” switch. Some may require both. YMMV..

1 comment:

Thomas Lee said...

Great find! Thanks!