CompatAdmin How Do I Shim Thee? Let Me Count The Ways…

When you come across issues debugging applications, there are typically several ways to solve them. Today, I'm going to pick on our own stuff and throw a few different shims at it. Interestingly enough, what I'm going to be shimming up will be the tool I use to create shims: Compatibility Administrator. That's right - I'm going to shim up my shim tool.

What's the bug?

Compatibility Administrator
You do not have administrative rights. Some features might be disabled.

Yeah - I don't enjoy warnings like that, and I certainly don't need them every time.

Solution #1: shim up CompatAdmin.exe with RunAsAdmin. That makes the MessageBox go away because it actually is an admin.

What else could we do? Well, we could figure out which functionality need admin rights. Sitting there using the product non-elevated, I counted two broken features. First, I can't right click and disable a shim. Second, I can't install a shim database.

I don't really need to disable things often, and it seemed to me that installing is something that could be factored out. In fact, a quick glance at Process Monitor tells me that installing a shim database already is factored out! CompatAdmin.exe just calls sdbinst.exe. Is it calling it using CreateProcess (which would require ElevateCreateProcess) or ShellExecute(Ex)? ShellExecute. Nice. So, in theory the think I need to do actually should work just fine, except the software is stopping me from doing it!

Compatibility Administrator
You need administrative rights to perform this operation.

A big fat LUA Bug in our own stuff. It stops me from doing something that works because it doesn't believe it does. Nice work. Let's lie to it.

Solution #2: shim up CompatAdmin.exe with ForceAdminAccess. The dialogs go away, and I can still do what I actually want to do - right click install works just fine, and prompts me when I do that. I then end up running less code elevated, and being more secure. I can read existing databases without elevations. What a huge win! (Well, except not being able to turn shims off, which may be interesting from time to time, but for the vast majority of what I do, this is a great solution.)

Are we done yet, or is there another way to skin this problem?

Well, these are messageboxes. We can suppress them one last way.

Solution #3: shim up CompatAdmin.exe with IgnoreMessageBox (parameter You do not have administrative rights. Some features might be disabled.,Compatibility Administrator). We'll get that to stop annoying me! It still shows the MessageBox when I try to install a database (which is not helpful) but if I suppress that one also, then it just does nothing and says nothing, which is arguably not a very good outcome. But at least it's a touch less chatty. I'll chalk this up as the worst solution.

Personally, I've been using ForceAdminAccess lately. But I thought this was a fun app to show the options available, particularly since you need to shim CompatAdmin somehow to make it useful. (Yeah, I know - that's kind of ridiculous and we should fix it. The bug has been open for over a year - I just poked the team again.)

Comments (10)

  1. jeff says:

    Just had a quick question, not sure if you’ll have an answer but the windows website was USELESS. I have a samsung i760 and am looking for a proper link to update my phone to windows mobile 6.1. If you have any idea feel free to shoot me an email @


  2. cjacks says:

    Hi jeff,

    You’ll be looking to talk to the phone manufacturer or your wireless provider. We don’t distribute the updates, they have to come through them.



  3. J P Long says:

    Hi Chris, Tried to load Lotus SmartSuite Release 9.8 x on Dell PC with Vista.  Got error msg.: "Error accessing Sys. Registry".  Any way around that?  Thanks, J P

  4. cjacks says:

    Hi J P,

    I’ve never used the software before, but it’s supported by IBM. See: So, you should be able to contact them with any troubles. I just can’t determine root cause without the software – error messages are created by the software developer, so their helpfulness varies greatly.



  5. abc says:

    please ans to this ques. asap..

  6. abc says:

    Herez a ques:

    what are the required shims for virtualization issue and how these shims remediate the problem???

    Plz ans. asap

  7. cjacks says:

    I do not understand the question.

  8. Mike McManis says:

    Hi Chris,

    I’ve been tasked to use a shim to run a program under a different system locale. Does such a shim exist and may I have it’s name please?

    Thank you so much.

  9. cjacks says:

    The only locale shim we have is RedirectCHHlocaletoCHT which remaps Chinese (HK 0xc04 and MaCao 0x1404) to Chinese (Taiwan).

Skip to main content