Programming Guides › Programming Guide for C › Agent API › Central Host Configuration › Upgrade an Agent
Upgrade an Agent
To upgrade an existing v4.x agent
- If the host machine where the v4.x agent resides is not currently registered with the Policy Server as a trusted host, run smreghost to register it.
Registration creates an SmHost.conf file on the trusted host and a host configuration object on the Policy Server.
- Call Sm_AgentApi_GetConfig() to initialize the structure Sm_AgentApi_Init_t with the information in SmHost.conf.
- Call Sm_AgentApi_Init() to connect to the Policy Server.
- Call Sm_AgentApi_SetDefaultAgentId() to set the default name of the custom agent.