Code Purple — The Compaq/HP Booby Trap

UPDATE N+1: For those who don’t want to read all the now very numerous comments, it seems that comment #128 is one of the more popular fixes for Vista/Win7, though many of the other excellent variants listed also work. My advice? Switch to linux, of course…

UPDATE N+2:  Wow.  It’s been six years.  I’ve pretty much stopped blogging (got caught up with life things), and about the only reason I keep this blog going is for a couple of technical posts, this being one of them.  Thanks, HP, for keeping this blog alive with your Code Purple BS!  In any case, this seems to still be a problem even with new versions of Windows.  I don’t know if it’s worth reading my original post — the commenters have all the solutions now., and the comments are of much greater value than the post.  Thanks to all the commenters!

On with the original post…

God blessed us all again this year with the presence of family over the Christmas holiday, but the joy was tempered by some annoyance. My brother-in-law brought his desktop computer down for me to work on. In addition to upgrading some hardware, he complained that the machine had slowed down, was acting funny, etc. Of course he was running Windows XP.

Swapping out the hardware was easy. The damage left by untold viruses/malware was a bit more difficult. I told him that I could try to clean things up as much as I could, but the only way to make sure that he was clean would be to restore the system from scratch. I told him there was always a little effort involved in restoring a system — mostly from having to reinstall all the software he had put on — but it was probably the best way to go. He agreed.

So, I created the restore disks (HP and Compaq computers apparently do not ship with restore disks on board, but instead have a separate partition from which the user must burn the disks). I did a full restore, reformatting the hard drive and reinstalling Windows XP. Everything went like clockwork…

Until I rebooted the machine. Then I got an error that there was a “Configuration error” and that I should call “Customer Care” with “Error Code Purple.” T that point, I could only power off the machine.

What in the world was “Error Code Purple,” I wondered. A quick search on the net revealed that this was a booby trap placed in HP and Compaq computers in which a “tattoo” or numerical signature of the motherboard and hardware configuration is created at the factory and encoded into the restore disks on a particular computer. When you re-install your system, it checks to make sure the system has not been modified. If you have modified your system, the “tattoo” generated by the checking program will be different than the original, and the system will not boot.

In order to fix this, you have to send in your computer to Compaq, or take it so some place like CompUSA or BestBuy where they will modify the “tattoo” so you can run your software on your computer again — until the next time you upgrade memory or swap a card or DVD player.

For a fee, of course.

I will post a couple of fixes for this below. But first — I have to vent. I cannot believe that a company would pull such an anti-consumer action as to booby trap its machines so that you can’t reinstall the OS after changing the hardware configuration unless you pay them a fee. One forum on the net said HP wanted to charge him over a hundred bucks for the privilege. This is obscene.

The funny thing is that I originally assumed it was some stupid thing with Windows XP. I have long been used to finding out idiotic anti-consumer “features” in Windows XP — which is why I run Linux on all of my boxes. I am flabbergasted that a company would decide that Windows is not anti-consumer enough, so they needed to make things even less convenient.

People should not buy HP or Compaq products as long as this policy is in place. This is inexcusable. And it ate up most of an afternoon that I should have been spending with family rather than trying to hack my way into a box before the family left.

So, here’s a couple of fixes for you folk who are burdened with an HP or Compaq computer and end up having to reinstall the OS after making a hardware change.

The underlying problem is that there is a .bat file that calls a python script to check the tattoo upon boot up. If you remove that call, then there is no check and the machine boots up just fine.

The file is:

C:\hp\bin\CheckConfig\cfgchk.bat

UPDATE: A reader whose comments were deleted in my server crash noted that the file should really be:

C:\hp\bin\ConfigCheck\cfgchk.bat

(e.g. switch CheckConfig with ConfigCheck)

UPDATE2: A reader (see comment #23 by Nitrazepam) has found a similar solution for Vista, where the offending passages seem to be in the C:\hp\bin\CheckDMI folder. I don’t run Windows on any of my boxes — I stumbled on this thing working on my brother-in-law’s box when it broke — I don’t have any idea about changes associated with Vista. Thanks, Nitrazepam!!!

UPDATE2.5:  See also comment 104.  A couple of people seem to have found this to be even easier.  Thanks, Red Dragon!

UPDATE3: Reader Chris Smiddy (comment 128) suggests an even easer fix for Vista. I don’t run Vista on any of my boxes, so I can’t test it, but it seems too easy not to try… Thanks, Chris!!!

UPDATE4: Claudio (comment 130) notes that this is a “hidden” directory and/or file, so you have to be showing hidden stuff if you are using a Windoze recovery disk.

The solution is to get a boot disk that will allow you to edit the hard drive and clear that file. I just deleted everything in cfgchk.bat and left an empty file with that name.A Windows solution was provided by “Alecstar” at geek.com. The discussion can also be seen on the usenet newsgroup alt.comp.hardware.pc-homebuilt. It is to either get the commercial Windows Preinstallation Evironment, a minimal bootable OS that allows you to run from CD (which, of course, Microsoft will not sell to mere consumers), or make one using BartPE. This will allow you to edit the hard drive directly. Go to the cfgchk.bat file, edit it, save the empty file, and reboot.

I have never been able to successfully build a BartPE disk, mostly because the Windows disks I have never seem to be compatible with the ones BartPE requires — I have too old a version, the wrong service pack, etc. It’s too much of a hassle for me, but if you are a Windows person, go for it.

A much simpler (for me) Linux solution is to get a bootable mini-distro that has Captive-NTFS (which allows writing to NTFS disks) on it, and edit the file that way. Sources on the net wrote that Knoppix had Captive-NTFS in its Utilities, but when I downloaded the most recent stable Knoppix, it was not there. Instead, there was a note that there was an experimental NTFS writable system on the DVD, which I didn’t have time to download. Instead, I found a *wonderful* boot disk called the “Ultimate Boot Disk.” It comes in two forms — Basic and Full. The “Full” version contains a stripped down Knoppix with Captive-NTFS that allowed me to easily access the hard drive and empty cfgchk.bat. NOTE — SEE UPDATE BELOW.

UPDATE6: Captive-NTFS is no longer maintained, and is probably unnecessary. Just about all of the newer distros I’ve looked at can read and write to NTFS drives. LINUX advances on. I know that both SUSE and Mandriva distros do well at reading and writing to NTFS drives, and I assume (but haven’t tested) Ubuntu. So any of the live distros of these should work, such as Mandriva One.

UPDATE7: See Jill’s comment #98 — there have now been a couple folk who have followed her directions using the Ultimate Boot CD. Thanks, Jill!

UPDATE 8:  “helpful” in comment 166 has a solution without a bootable disk, but with an intact recovery partition (for Vista, I presume).  Thanks, “helpful”!

So that’s it — download a boot disk, edit the file, and reboot.

And, as Alecstar noted, never buy a Compaq or HP box again.

389 thoughts on “Code Purple — The Compaq/HP Booby Trap

  1. Thanks so much for this post. The solution in post 104 worked perfectly for me. I ran into this Code Purple error after having to replace a motherboard in an HP Windows 7 machine. The original was a cheap cheap cheap Pegatron that the SATA ports died on. Replaced with a much nicer board and reinstalled only to get Code Purple. Thanks red Dragon for the solution and thanks for keeping this blog up so that people can see the answer!

  2. I tried doing as Chris Smiddy said, but messed up completely.

    I was not sure where to type in “goto cleanup”, so I just guessed and hoped for the best. I saved the file (Though now I can’t find it again, God damnit, despite saving it with the same name as the original file).

    The box saying there’s a configuration problem and code purple is gone, however I still can’t finish installing Windows for some reason. I must have done something wrong.

    I feel like smashing my computer to pieces but I can’t afford a new one..

  3. Нello would you mind sharing which blog plаtform
    уou’re using? I’m lοoking to staгt my οwn blog soοn but I’m having a hard time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for something unique.
    P.Ѕ Арologies for gettіng off-toρic but I hаd tο
    asκ!

  4. This is an awesome blog, this helped me with my purple code shinanigans. F hp for their lying ways, those dirt bags. Anyways thanks 102 and 104 it worked for windows 7

  5. Thank you so much for keeping this BLOG up … my son but a CUSTOM Gaming Machine … only for us to find out later that it is HP inards. If I had known it was based on HP, we would have gone elsewhere. Regardless, thanks for your blog and all of the great comments … editing didn’t work, but renaming appeared to do so! WOOT!

  6. Comment #23 would have worked for me. I saw that file before coming here, so I booted with Linux MINT, and simply renamed the folder. Reboot and it worked with no error. Windows Vista on a HP Pavilion a6200n

  7. How to correct using MSDOS

    When you see the screen for Code Purple error:

    Hit Shift and F10 to bring up MS-DOS prompt
    Type

    cd dir C: then press enter

    type
    dir hp\bin\checkdmi then press enter

    look for two files one is named checkdmi.cmd and the other is checkdmicompare.cmd

    at the command prompt type
    del hp\bin\checkdmi.cmd and press enter

    type
    del hp\bin\checkdmicompare.cmd
    press enter

    problem is fixed

  8. Thanks. I replaced Motherboard with identical (so I beleived) version. Got the purple nasty…
    was restoring back to factory image…
    Did the F10 thing and amended Checkdmi.Cmd script to insert ‘GOTO cleanup’ as first line after the REM statements..

    Nice… :)

  9. after many probs with “nerd” squad,who, i think initiated the prob. I had to use a norton usb to get a command prompt and c:\hp\bin\checkdmi.cmd clear all and enter :cleanup,save,and a standard reboot worked for me to get OS back. I paid the nerds for support which they couldn’t or wouldn’t give. I have an A+ but paid them for a service which they obviously failed at.

  10. Extremely valuable information for “Code Purple” error. If you are running a 64-bit version of Windows, you do not have the “edit” command in prompt. I used Linux Pendrive to get to the file. Adding “goto cleanup” after REM worked great!

    The M2n7b-la pegatron motherboards are prone to failure. I wasn’t able to recognize any SATA devices (the CD-Rom and Harddrive). So after replacing the motherboard, hence the Code Purple.

    Shame on you HP.

  11. Thank you so much! I lost all hope, but my year has started really good.

    @Mark Daniels: try comment 307!

  12. Purple is still alive and kicking around out there. I had him, but thanks to you Billo and to Michael Burlinggame,s solution at #146 on your blog purple is no longer bothering me. Thanks Ever So Much.

  13. Good info … I needed to recover a friends computer and wow never seen anything like that … I renamed the chfchk.bat to chfchk.old and that worked.

  14. All – first off, my wife works for HP and I did not get any better treatment than the rest of you. I too had to call HP tech support, got someone in India who proceeded to tell me I needed to buy another computer – mine is only 4 years old. Looking thru all of the suggestions, #168 worked for me. I just happened to have a USB to SATA cable adapter, so I took out the hard drive, plugged it into my laptop and deleted the “HP” folder. Reinstalled the hard drive into the desktop, turned it on and Vista completed the install – all is good. I hate to hear everyone is having all of these issues considering HP is providing half of our household income.

  15. When the screen comes up that tells you about the code purple, do this:
    Hold shift key and press f10
    Type this below in command prompt with spaces like shown

    chdir C:\hp\bin\CheckDMI

    press enter
    Now, type:

    dir

    press enter

    10. You’ll see a bunch of rubbish text…but the important thing to notice is the file CheckDMI.cmd…this file here is THE SOURCE of your code purple problem. So…to make the file permanently disabled, type:

    rename CheckDMI.cmd CheckDMI

    press enter.

    11. To make sure the file has been successful renamed, type:

    dir

    press enter.

    12. The file should now be changed. Exit out of command prompt and restart your computer. And walaa…

    13. You’re done! Congrats…you just successfully fixed your Code Purple problem. Now you don’t have to waste half a month of shipping your computer back and forth from an HP tech shop to get it “repaired for free”

  16. I got the purple monster after a recovery from partition on a HP pavillion with vista .I called the support number and someone in India named Haboob said my motherboard was bad ,but they would fix it for free.They sent a box and paid for shipping.Sent it out and it was back in 3 days operating . I couldn’t get on the net to research it . Is there something you can do to keep this from happening again ?

  17. wow! comment #125 was right on track. followed it to a tee and it worked perfectly. so glad i decided against dishing out money to hp for their so called help. definitely will not choose a hp product again. learned my lesson this time.

  18. solucion (solution)para(for) Windows 7 = post 368
    unico cambio Checkdmi.cmd x Checkdmi.old
    only change Checkdmi.cmd for Checkdmi.old

  19. Solution #176 worked just wonderfully for us. Thank you so much for providing it.

  20. Pingback: compaq quickrestore system recovery cd | Win Phone Pro

  21. Pingback: Code Purple

  22. God bless internet! I only wish I had found this post before I run the recovery function deleting all of my files… but at least I was able to solve this problem and use my old but still useful HP AIO PC! Thank you all guys.

  23. Thanks to everyone for the post. The motherboard on my HP Elite blew a capacitor (lots of smoke and that lovely electrical burnt smell for days in the house). After replacing the motherboard, I to fell victim to “Code Purple”. Changing all the lines to start with “rem ” in the CheckDMI.cmd did the trick. The best thing to come out of this waste of time, was my frustration lead me to download a copy of the Ubuntu OS. I used Ubuntu to find and edit the files needed to get Windows 7 back up and running. I now have a dual boot machine and will be transitioning away from HP and Windows in the future. Thanks HP for being so restrictive!

  24. Dude omg. I just yelled at the HP People for like 30 minutes lol. This can never disappear. This is the only effective solution(s) ON THE ENTIRE INTERNET!!!!…Thank you so much to everyone who has contributed. Comment #128 and #369 were amazing. Some Variant of all these solutions will def help you.

  25. Pingback: HP’s Code Purple Configuration Error | IT Xpress Fixed It!

  26. My God, my God, don’t even know how to thank you all. I don’t know anything about computers and stuff but I fought two days to repair my PC. Once one problem has been resolved, there was another one just around the corner. Fortunately, the ‘code purple’ was the final one and the solution here was incredibly useful. THANKS!

  27. #369 Thank you. Worked great! I was about to try to torrent another copy of Windows 7, but I did not have to!

  28. I tried most the stuff on the forum and it was either over my head or it did not work for window 7. I got this from a local computer shop and first off it is stupid easy and second it worked.

    With the code purple error on the screen, press shift+f10 (the shift key and the F10 key (at the top of the keyboard) at the same time) to open a little screen called a command prompt. (So, you get a little black screen with white text that says something about your Windows verison first and a little ways down you’ll see “C:\>”. It’s all ready for you to start typing.)
    Type the following line, just as you see it here…

    notepad C:\hp\bin\checkdmi\checkdmi.cmd

    so it will look like this

    C:\>notepad C:\hp\bin\checkdmi\checkdmi.cmd

    Press Enter.

    You will see the text for the file listed in a window using a simple text editor.
    Go to the beginning of the text. Press enter to make a space. Type this…

    goto cleanup

    So, whatever comes after, the first line looks like this…

    goto cleanup

    Save the file and exit notepad and restart your PC. You are good to go.

  29. Nope! none of these worked. HP has aparently locked out the S/f10 loop. at least on my disks set. If I try and use it even before the message, the CMD window closes right away and thier script continues all the way to the error. Then S/f10 ignores me.

  30. Thanks for this. I won’t go into the details other than to say my experience lead me to use Hirens as in #302. This was on a Vista computer so I booted into mini Windows XP on the Hirens boot CD & made the change & presto the computer continued through the initial setup when I rebooted. BTW, what is mystical Christianity?

  31. Well, I try to keep the computer posts separate from the non-computer ones, but one of the things that marks Christianity as different than many of the other major religions is its extremely wide variation in belief and practice.

    That shouldn’t be surprising, since the core beliefs of Christianity are pretty simple — the divinity, death, burial, and resurrection of Christ, the idea of His atonement for sins by sacrifice on the cross, and the offer of salvation. Pretty much everything else is up for grabs. While “orthodox” or traditional Christianity has a somewhat longer list, most things are rather ambiguous. Consider the trinity — the unity yet separateness of God the Father, God the Son, and God the Holy Ghost. That’s a “mystery” in the sense that nobody really knows how it works, or even if we are getting it right. There have been Christians who felt that they were not both different and one — that they were simply avatars of the same God, that they were three separate beings, etc. But the bottom line is that whatever one believes, one is still a Christian.

    One of the things that separates Christian traditions is the idea of “authority,” or who/what one should look to for guidance. In general, there are three broad sources of authority — tradition, scripture, and revelation. Those who put a great weight in tradition note that the early Christians were closer to Christ’s direct teachings; a lot of things were hammered out early on, and we should listen to those conclusions. Those who put a great deal of weight on scripture believe that the Bible should be the basis of belief, and everything else must be weighed against that. Those who place a great deal of authority in revelation believe that we all have a direct link to God and that God speaks directly to us through the Holy Spirit. That voice of God should be our primary guide, tested by what we know of the scripture and tradition.

    The Roman Catholic Church, for instance, places a great deal of weight in the authority of tradition and traditional teaching. Old-line Protestants rejected all that as corrupt, and decided that the Bible should be the overwhelming source of authority. Those who believe in revelation as a primary source of authority are known mostly as charismatics and mystics.

    Charismatics put great faith in the spontaneous experience of God. This is best seen in Pentecostal traditions. These folk often have very emotional services and engage in practices such as speaking in tongues. Mystics place a similar strong belief in the direct experience of God, but also believe that people are too easily mislead; thus, any experience should be vetted against known teachings and traditions. Thus, mystics often have “spiritual advisors” and “mentors” who help them understand their experiences. The Eastern Orthodox Church places a great value in mysticism, and there are specific groups within the Roman Catholic Church that also find it very important.

    The Protestant Reformation was marked in large part by a strong belief in so-called “natural theology,” that God was revealed through natural laws and not through miracles and revelation. This is the idea of “God as clockmaker,” in which God created the universe, set it to follow certain laws, and just let it run. God did not get directly involved in individual affairs. The early Protestants thought all this Catholic belief in miracles and revelation was all theater to keep the ignorant in fear.

    This, in turn lead many of the mainline Protestant denominations to wander down the road of “liberal theology,” which basically stripped the numinous from all aspects of faith. All this Jesus stuff didn’t refer to “real” resurrection, “real” sin, etc. but more reflect common basic values that we all agree on. You see this most obviously in churches such as the United Church of Christ (UCC).

    In a reaction to this, a number of people said that if you are simply going to replace God and Jesus with Jungian archetypes, then why bother? There was a great deal of to and fro, and in the early 1900s, a bunch of academics came up with a set of basic beliefs they felt were necessary to be a “real” Christian. These were published in a series of letters and books, much like the Federalist Papers discussed the thoughts of the Founding Fathers. These published works were called “The Fundamentals,” from which we get the term “fundamentalist” (though it doesn’t mean now what it meant 90 years ago).

    As part of this movement to re-connect with the basics of belief, a number of Protestant groups also started re-examining the concept of revelation, leading to a resurgence of charismatic and mystical faith in Protestantism.

    I am, thus, a Protestant and a mystic, in that I put great value in direct revelation from the voice of the Holy Spirit, but also believe that there should be a great deal of discipline and testing of that revelation. So, in contrast to charismatics, I have a spritual advisor, and train myself to view my experience within the context of particular kinds of teaching.

  32. I’m with you sofar. Tell me more about the last phrase “within the context of particular kinds of teaching” & does the Bible enter into that teaching?

  33. As I said, different traditions have different weights they put on revelation, apostolic authority, and scripture. Thus, fitting a mystical approach to worship within a particular tradition would mean fitting it within the values of that tradition. For instance, were I a Roman Catholic mystic, I would look at my experiences within the long view that Roman Catholics have. Were I an Eastern Orthodox, I would look at it differently.

    Consider, for instance, how the different traditions view “quietism,” a contemplative technique in which one empties the mind and attempts obliteration of the self in order to “invite” God in. The Roman Catholic church doesn’t like it at all. See: http://www.newadvent.org/cathen/12608c.htm However, Quaker mysticism has a strong quietist element, as does “hesychasm” in the Eastern Orthodox tradition. Both Catholic and Protestant mystics look to the Bible for both source material and as a ruler for validation of experience. Protestants have less of a formal history with mysticism, so they tend to rely more on scripture to test experience, while Catholics have other guidelines as well. A sorta-mystical approach to the scripture would be, for instance, Lectio Divina and Gospel(Ignatian) Contemplation. When you get into things like Lectio Divina, the distinction between “mysticism” and “meditation/contemplation” becomes very thin.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>