Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space MSMBASE and version 8.0

...

      • When the Macrium Agent service starts up
      • When any file in the C:\Program Files\Macrium\Agent\Scripts folder changes
      • When any value is written to the HKEY_LOCAL_MACHINE\SOFTWARE\Macrium\CMCAgent\UserScripts registry key
      • When a device is added or removed from the system (to assist in scripts that depend on USB disk presence or laptop docking station connection)
      • When the IP addresses for the computer change (to assist in scripts that depend on VPN or WiFi changes)
      • Every 30 minutes

Script activity is logged in the cC:\programdata\Macrium\SiteManager\AgentUserScript.log file

...

      • User description - any text outputted to standard out (e.g. with the 'echo' command) will be shown in Site Manager in the "User Description" column of the Computers table
      • Operating Mode - the return code of the script determines the user-set operating mode of the agent. The following
Script Return ValueOperating ModeDescription
0NormalThe Agent is running normally and all scheduled backups are being run
-1Ignoring scheduled backups

The Agent should not run backups. When this error code is returned, Site Manager will defer all scheduled backups for the agent until the user script starts

returned

to return normal status again.

When the agent returns to normal status, any missed backups will be executed immediately as if the computer had been offline and 'Defer Missed Backups' was set in the Site Manager schedule.

This can be used for computers

which

that move between networks and should not perform backups if they're connected over VPN or WiFi

Any other valueNormalAny other value is assumed to be an error code in the user script and the script execution is ignored


Viewing Script Results

For debugging purposes, script activity is logged in cC:\programdata\Macrium\SiteManager\AgentUserScript.log on the agent computer.

The results of the script execution can be shown in the Computers table in Site Manager by enabling the "User Description" and "'User Script Message' and 'Operating Mode" ' columns which are hidden by default:

Image RemovedImage Added

These columns will show the script results:

Image RemovedImage Added

This output was produced from the user script below:

...

The Agent service runs the script as a non-privileged process using the Network Service account, regardless of what user the Agent agent service is configured to run as. This is to prevent any possibility of a user script being executed with Administrator privileges.