See Floris Kraak's comments below, he has a much more elegant solution.......
This is the third article in a series describing script improvements that I recommended to a client during a recent engagement where I was advising on a LoadRunner to Performance Center migration.
I recently completed a client assignment where I was asked to help plan an upgrade of HP ALM to allow the integration of ALM and Performance Center. As part of the assignment, I sat down with the performance testers and discussed the implications of moving from LoadRunner to Performance Center.
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.