Skip to main content

LoadRunner Agent - Service or Process?

During the installation of LoadRunner, if you select "Allow virtual users to run on this machine without user login", the LoadRunner agent will run as a Windows system service called "LoadRunner Agent Service". If you choose "Manually log in to the Load Generator ", the LoadRunner agent will be run as a process named magentproc.exe.

This means you need to start the LoadRunner agent manually each time you reboot the PC/server or you need to put the LoadRunner agent process into a windows startup group and use a tool such as SysInternals Auto Logon to automate the logon process after a load generator reboots. 

Some vUser types will only run if the agent is running as a process (GUI, SAP, Citrix vUsers etc.). This is because they need to run in a user context. Occasionally it may be necessary to switch your load generators from running the LoadRunner Agent (used to generate load during tests) from running as a service to running as a process. Here are the steps that you need to take to switch between these two modes.

After installation, to switch from running the LoadRunner agent as a service to running as a process:
At the (administrative)  command prompt type:

"C:\Program Files (x86)\HP\LoadRunner\LAUNCH_SERVICE\bin\magentservice.exe -remove"
Add this shortcut to the startup folder - "C:\Program Files (x86)\HP\LoadRunner\LAUNCH_SERVICE\bin\magentproc.exe" 

After installation, to switch from running the LoadRunner agent as a process to running as a service:
Remove the LoadRunner Agent Process from the Startup folder.

"C:\Program Files (x86)\HP\LoadRunner\LAUNCH_SERVICE\bin\magentservice.exe -install"

N.B. You need admin rights to do this.

The magentservice.exe file is in the C:\Program Files (x86)\HP\LoadRunner\bin on 64-bit systems and C:\Program Files\HP\LoadRunner\bin folder on 32-bit systems.

Originally published on, reproduced here with permission.

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Enter the characters shown in the image.