Automatic Update of BigFix License

Hello,

I’ve been trying to automate the update of Bigfix License via Task Scheduler using the command below but it times out and fails. Has anyone been able to successfully execute the below command in a Task scheduler? When I run it manually in CMD, it works but when used in Task Scheduler, it eventually times out. Does anyone know if the /hideUI switch actually works? With or without the switch, the behavior is same when I run it manually.

.\BESAdmin.exe /syncmastheadandlicense /sitePvkLocation=<path+license.pvk> [/sitePvkPassword=<pvk_password>] [/hideUI]

I just tested it and looks like it worked. I set up the task to run as the same admin user that I used to test interactively.

image

1|Mon, 22 Jul 2024 12:20:55 -0400|INFO|Site Administrator|ADMINTOOL|||127.0.0.1|Admin Tool Start.
1|Mon, 22 Jul 2024 12:20:55 -0400|INFO|Site Administrator|ADMINTOOL|AUTHZ|LOGIN|127.0.0.1|Site Administrator logged in.
1|Mon, 22 Jul 2024 12:20:55 -0400|INFO|Site Administrator|ADMINTOOL||UPDATE|127.0.0.1|Masthead and license already in synch.
1|Mon, 22 Jul 2024 12:20:55 -0400|INFO|Site Administrator|ADMINTOOL|||127.0.0.1|Admin Tool Exit.

Can you share the arguments you have? I still can’t get it to work. I tried it with my account, the system account which both have permissions to the database. I see the below in the log but eventually times out:

1|Mon, 22 Jul 2024 12:47:23 -0400|INFO|Site Administrator|ADMINTOOL|||127.0.0.1|Admin Tool Start.
1|Mon, 22 Jul 2024 12:47:23 -0400|INFO|Site Administrator|ADMINTOOL|AUTHZ|LOGIN|127.0.0.1|Site Administrator logged in.

Never mind. Looks like it did work but because the pop up that appears at the end after the license is updated doesn’t close until a user clicks “OK”, the task doesn’t close until it times out. So looks like the /hideUI doesn’t work.

What version of BigFix are you using? /hideUI seems to work on mine; I’m on 11.0.2

BESAdmin.exe /syncmastheadandlicense /sitePvkLocation="c:\BES\Keys\license.pvk" /sitePvkPassword="My-Password" /hideUI

I’m using 10.0.12. So, the Masthead dialog that opens up at the end doesn’t appear for you?

That’s right, no dialog appears on the screen at all

I am also in 11.0.2 and the dialog doesn’t pop-up

1 Like

Could this be an issue on 10.0.12? As you can see the pop-ups I get when running with the /hideUI switch.


What is -ArgumentList for the command? Can you take it out and try?

Yeah I’m not sure how the quoting rules in PowerShell apply there, given the -ArgumentList especially with the $PVK path containing spaces…I’d try it out without any variables, just literal strings, and it might be easier to just run this in CMD outside of PowerShell. The command line I gave above was for running it in CMD.

I tried it in CMD too; same thing.

I see the same behaviour on 10.0.12. This also used to occur with the ServerkeyTool in ealiers version and the way I worked around it (I was running a backup script that decrypted the signing keys before backing them up) was to insert a delay for 5 or 10 seconds then kill the process. So from a single CMD line you could use something like

.\BESAdmin.exe /syncmastheadandlicense /sitePvkLocation=<path+license.pvk> [/sitePvkPassword=<pvk_password>] [/hideUI] & timeout 10 & taskkill /im besadmin.exe

3 Likes