Deploying the agent by script