Copy ActionSite.afxm file from client to share

My brain is hurting today. :slight_smile:

We have multi-tenancy. We use an installer script for each tenant. We want keep the ActionSite.afxm up to date in the installer folder, which is in the DSF.

The issue I am having is how to get the path to the client folder. I thought “pathname of client folder” would work but it does not.

I can get it from the registry but I a not sure how to pass that value to the copy command.

value whose (name of it is “EnterpriseClientFolder”) of key “HKLM\SOFTWARE\WOW6432Node\BigFix\EnterpriseClient” of registry

In summary,

This will only be relevant to Primary Domain Controllers.
Copy ActionSite.afxm from client folder to the DFS (\127.0.0.1\netlogon\BFclient\ActionSite.afxm)

I’m afraid I’ve already shut down my server, but if I recall {storage folder of client} should get you there on fairly modern client versions, and if you have really old ones then {parent folder of parent folder of client folder of current site}

Not sure about copying directly to the UNC path though. Even though the LocalSystem account might actually work on a DC (but not for normal clients), the NetLogon share might be read-only? You may have to find the local path to the NetLogon share.

1 Like

For local copy, this might work (obvioulsy replace the destination with your local path…if UNC path fails as mentioned by @JasonWalker )

copy "{value "EnterpriseClientFolder" of key "HKLM\SOFTWARE\WOW6432Node\BigFix\EnterpriseClient" of registry as string | storage folder of client as string}\Actionsite.afxm" "C:\TEMP\Actionsite.afxm"

STATUS: Running action...
Command succeeded copy "C:\Program Files (x86)\BigFix Enterprise\BES Client\\Actionsite.afxm" "C:\TEMP\Actionsite.afxm"

--- Result ---
Evaluation completed successfully!
1 Like

The first option works.
image

The UNC copy works as well, we use it in another fixlet. It has permissions because the loopback address is used and the client runs as local system. Thanks for the help, I will add these to my relevance/action documentation. :slight_smile:

2 Likes