Invalid PLATFORM variable “HPV” or “MCD”


Recently, I’ve had a number of customers contact me asking about these error messages…
[Error Error] Invalid PLATFORM variable “MCD”
[Error Error] Invalid PLATFORM variable “HPV”
I decided to write up a quick post on the cause and resolution for these errors.

If you’re seeing either of these error messages while trying to build a project, I’ll take a stab at guessing the brand of your computer. It’s HP branded, right?

Okay, so it seems that for some reason HP branded machines come with the ‘PLATFORM’ variable set on your system. Newer versions of RAD Studio / Delphi and likely C++ Builder too, use the PLATFORM variable to determine the target platform for compilation. On HP machines they find the values “MCD” or “HPV” and don’t know what to do with these values.

The good news is, there appears to be no consequence to removing the PLATFORM variable which HP added to your system. Maybe the value was added for some purpose that was never actually used, or maybe it’s part of their OEM install process, I’ve no idea, but so far I’ve heard of no consequence to removing it. In addition, if you do remove it, it’s trivial to put back, so there’s no real risk.

The process to remove the variable may differ from one windows version to the next, so you may wish to ask your favorite search engine how to alter the environment variables for your version of windows. Most versions the process is this:

  1. Right click on “My Computer” or “This PC” in your start menu. (Under windows 10, hit the windows button and type “This PC”)
  2. Select properties.
  3. Click on “Advanced System Settings”
  4. Click the “Environment Variables” button
  5. Find the “PLATFORM” variable and click to highlight it.
  6. Click Delete.

Before you do this, make a note of the value of the platform variable, that way you can follow the same instructions upto #5, but then click NEW to add the variable back should you need to.

I hope this gets you up and running.

Thanks for Reading!


3 thoughts on “Invalid PLATFORM variable “HPV” or “MCD””

  1. Pingback: Anonymous

Leave a Comment