Very Stupid Bug in Windows Mobile

by no2chem 19. April 2009 23:30

I just wasted 4 hours due to a rather stupid bug in Windows Mobile (and maybe Windows CE). For future reference, in case anyone else has the same problem.

Any subkey of:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn]
cannot be deleted once created and the device is restarted.

This will call cause all sorts of havoc, including causing CAB uninstalls to fail. The reason for this, you see is if you look at the very subtle text for DeleteKey in MSDN:

”An application cannot call this function for a key that an application currently has open.”

Hmm, now let’s see.. what application has HKLM\Drivers\BuiltIn always open? …Device.exe! Oh hmm,  so we can’t exactly tell device.exe to close the key… we can’t close device.exe … and we can’t even do anything to the registry before device.exe loads… looks like we’re pretty much screwed.

but wait… Maybe we can get a handle from device.exe… We can, with OpenDeviceKey, but we can’t do anything with it since we need the handle to HKLM\Drivers\Builtin, not the subkey.

So, unless you want your key on the device for a very long time, you should install your driver as a service, activate it manually… which kind of defeats the purpose of a driver…

Alternatively, you can just delete the values… but you’ll have to leave the empty key.. doesn’t seem like the right way to go either… Besides, if you put it in a cab, the cab will be forever uninstallable, as wceload.exe will just give up when it can’t delete the key. But don’t let me get started on wceload.exe and unload.exe… You’ll just get some stupid cryptic error message that your uninstall was unsuccessful.

So come on Microsoft – please add DeleteDevice or something… what if some malicious program were to exploit this? Also, please fix wceload, it… really needs an upgrade.

Tags:

Comments


March 7. 2009 22:45 | Reply
Cobaltikus
So someone could write a small program to write tons of crap to HKLM\Drivers\BuiltIn and overload the registry leaving only the option of a hard reset.

That would suck.

Is this still true in 6.5?


United States TADOW 
March 9. 2009 12:21 | Reply
TADOW
YEA "MS" & SPRINT ISNT REALLY TRYNA BOOST THERE SALES I MEAN THEY JUST LETTING APPLE KICK THEM IN THE ASS HEAVY LIKE WITH THE APPS AN THIS DAM TOUCH PRO FOR SPRINT IS THE WORST DEVICE WATERED DOWN I SEEN I REALLY WANT A GSM TOUCH HD OR TOUCH PRO 2 ATLEAST I WOULD BE GETTING LEXUS INSTEAD OF A TOYOTA....AS FAR AS I SEE IT ITS UP TO GUUS LIKE YOU TO MAKE THESE PHONES BETTER I WOULD DONATE BUT THERES NO REASON TO WIRE 5 TO 10 BUCKS FOR A CAB OR A REGISTRY HACK....I WOULD LIKE TO SEE SOMETHING REALLY INTERESTING DONE LIKE ANIMATED BACKGROUNDS FOR INSTANT....BETTER GRAPHICS...AN A REAL GPS LOCK!!!!!!! ATLEAST FOR THE TOUCH PRO CDMA BUT IT SEEM LIKE THATS TOO MUCH TO ASK FOR WHILE THE IPHONE IS LIKE HAVING A PS3 AN THESE OTHER PHONES IS ATARI ITS SO RIDICULOUS NO HARD FEELINGS BUT I JUST FOLLOW YALL GUYS WORK TO MUCH TO SEE SMALL IMPROVEMENTS ESPECIALLY NUE...YOU BEEN AROUND SINCE I GOT MY FIRST PPC 6700 I BELIEVE THAT WAS A REAL PDA NOT THIS 528 FAKE A HURTS TOUCH PRO CRAP WHICH IS ONLY GOOD FOR SUCKING UP ENERGY.


March 9. 2009 14:20 | Reply
Cobaltikus
What's with all the yelling tadow? Does your iPhone not have any lowercase keys?

Can you control your PS3 with your iPhone?
Can you control a PC with your iPhone?
Can you use Remote Desktop from anywhere and log into your home PC using your iPhone?

The Touch Pro can. What can an iPhone do that the Touch Pro can't?

And even if you were able to answer that, no2 could still trump it all by adding whatever is missing.

Who does the iPhone have, to add missing features? Is there a iNo2 somewhere?

You have a lot of nerve saying no2chem's work is not worth a donation. If you are unable to benefit from his very generous work then mind your own and go play with your iPhone and leave the Touch Pro threads to people who actually enjoy a truly versatile mobile device.


Germany anon ymous 
March 10. 2009 01:09 | Reply
anon ymous
yeah, you're right! iphone is not good, it's only money-making for nerds! and i am a mac-user, not an apple-hater...! so i'm not very emotional when telling you iphone has some really bad bugs: no a2dp with avrcp - which is f***ing-good and stylish, especially when watching movies in vga on diamond (i have no pro, but diamond is not bad also!) Wink i like it, and remember:
a community that makes a device better is worth much more than a crowd of arrogant style-a**holes...!



May 11. 2009 15:22 | Reply
my blog 2009



The things that will been true much in this site because of the factor that can be the affect the
availability of the posting.Thanks


June 29. 2009 06:25 | Reply
Farmers Branch Real Estate
Well, haven't used Windows CE and only seen it so can't really say about it much but ofcourse being a Windows thing it would be buggy somewhere. Softwares aren't 100% bug-free but I've a question, what approach they take to test out software before releasing? They can get so many testers and test it from every angle. Anyway, the reason I am commenting is because I wanted to say that now pretty soon, Linux Smartphones are also near so anyhow MS will have to compete well to stay in the market with other smartphones already existing. I am just waiting for the time when Linux-based SmartPhone will hit the market, I will try it out once it gets a bit stable.

June 29. 2009 07:20 | Reply
Cobaltikus
You know there is an Android (Linux) OS for the Touch Pro... As far as I know it does not yet support sound at the moment but it seems to be coming along quite nicely.



August 1. 2009 04:50 | Reply
mobile diabetes management
I just couldnt leave your website before saying that I really enjoyed the quality information you offer to your visitors... Will be back often to check up on new stuff you post!


August 2. 2009 04:28 | Reply
payday loans
I leave a lot of comments on a lot of blogs each week - but there is one situation where I rarely leave a comment - even if the post deserves it.Good work


August 9. 2009 11:52 | Reply
How to Fix a Slow Computer
Hi,
I was looking for that solution nearly all day.Can i copy this article into my blog?If you  are agree,we can exchange useful articles in the future?

Best Regards,
Chris


September 9. 2009 15:04 | Reply
Hosting
can i know how to solve the windows mobile contact sorting problem?


September 10. 2009 20:57 | Reply
Mobile Phones
A complete range of Mobile Phones, PDA Smartphones, Notebooks and GPS Solutions from Organiser World! Live stock availability. Featuring brands such as HTC, Nokia, Palm, HP, Sony, Sony Ericsson, Sandisk, Motorola, Asus, TomTom.


September 21. 2009 01:19 | Reply
tiffany jewelry
good


November 12. 2009 15:22 | Reply
reverse cell phone number look up
The things that will been true much in this site because of the factor that can be the affect the
availability of the posting.


December 6. 2009 01:33 | Reply
Franklin
Excellent read, I just passed this onto a colleague who was doing a little research on that. And he actually bought me lunch because I found it for him smile So let me rephrase that.


December 7. 2009 13:54 | Reply
India Phone Card
I think you are really an expert in writing unique blog. I am crazy about your thoughts.


December 12. 2009 08:32 | Reply
comfortable fitting bras
Your blog is one of the best ones. I think it is important to inform us about  different kinds of problems so that we are informed before we come across something. Your time is not lost, it is great that I am not the only person who admires your blogs! Continue in the same way!


January 13. 2010 06:12 | Reply
Dial India
Do you always write this stuff, over you head.. Great article! Tell me more, let it come.. You are master. Laughing


Unlimited Calling Card to India
Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post. Keep up your work…


July 20. 2010 22:38 | Reply
gucci wallet
To tell you the teuth, I was passing around and come across your site. It is wounderful. I mean as a content and design. I added you to my list and decided to spent the rest of the weekend browsing. Well done!!!!


July 23. 2010 23:10 | Reply
cheap anklets
Great post. You really help me a lot.


August 9. 2010 21:42 | Reply
iphone game reviews
windows is always known for having bugs. on the iphone you get apps and games and you can see reviews of them before you buy.


August 13. 2010 03:05 | Reply
Best Cell Phones Reviews
Hi, I just wanted to tell you how much I enjoyed reading the contents of your blog. I think that everyone should benefit from reading this blog as it has a lot of useful information that could not be gained so easily without reading your informative posts. Anyway, I'd just like to say thanks for taking to write this valuable post as I'm more than 100% sure that I will not be the only one that should benefit a great deal from this. I'm going to get back to this blog periodically to check and see if there are more such posts written by you. Keep it up mate! I can't wait to see your next posts!


September 9. 2010 05:15 | Reply
xray technician
Aw, this was a really quality post. In theory I'd like to write like this too - taking time and real effort to make a good article... but what can I say... I procrastinate alot and never seem to get something done.


October 2. 2010 13:51 | Reply
jimmy choo
Jimmy Choo's beginnings can be traced back to his workshop in London Borough of Hackney, North London, which he opened in 1986 by renting an old hospital building.


October 18. 2010 23:46 | Reply
wholesale cubic zirconia jewelry
hello!!Great Stuff! Thanks for the good info. Cheers!


December 22. 2010 01:47 | Reply
kona coffees
Good stuff, I was impressed with it.


December 24. 2010 13:46 | Reply
 remove skin tags
I wanted to thank you for this great blog,I will surely be back again to look at some other significant posts that you have in future.


January 8. 2011 06:40 | Reply
LDS Scriptures
A mobile phone application must be user-friendly, useful and secure in order to attract a following and help ensure that the competition does not introduce its' own perfected version of your idea.


January 13. 2011 21:56 | Reply
Property in Nagpur
Really nice read thanks, I have added this to my blog.
thanks again.


January 31. 2011 01:39 | Reply
oil reclamation system
I'd like to connect my new phone to our wifi. Where do I find the key on my old phone?


July 7. 2011 16:47 | Reply
Cheesy
Me not being the biggest Schumacher fan in the world, I was nonetheless pleased to see/read the generally positive comments about his performance in Montreal.


August 6. 2011 03:35 | Reply
Cheap GHD Australia
Thanks for clearing this ou


August 10. 2011 18:18 | Reply
louis vuitton for sale
oil reclamation system
I'd like to connect my new phone to our wifi. Where do I find the key on my old phone?


September 7. 2011 09:10 | Reply
bali
J'adore sans déconner ça envoie Smile ! Mais bon, faut voir ce que ça vaudra une fois entre les mains ..


November 3. 2011 08:15 | Reply
ghd
Dre Headphones to produce an ideal necessities. Torso and also exercises the body, legs direct as well as simultaneous to the back to talk about, you are able to

notice the cool upper leg difficult. , Top-up the tummy, butt as well as upper thighs http://www.drebeats-headphones.com experienced hard on the right, below everyone

of twenty break. Lose weight, and not fat and be skinny, however to a lot more tension plus more fit system, your bloatedness in the volume, the tightening of the

securing! Currently, Xiao Bian bring in some graphic health and fitness weight-loss physical exercise, to help you Bottom level, the United States again, thin biceps,

slim stomach, incomplete weight-loss, the body turns into accommodating!


November 11. 2011 03:03 | Reply
tory burch online outlet
Intriguing article. I know I’m a bit late in posting my comment even so the article ended up being to the point and just the knowledge I became searching for. I can’t say i always accept all you could mentioned nevertheless it was emphatically fascinating!


December 25. 2011 05:25 | Reply
water filter reviews
this blog is awesome. i just love the detailed information and i enjoy reading them.i just want you to

know that we have the most up to date reviews of your favorite electronic gadgets and tools. please

check our site. http://www.bestwaterfilterreviews.com/    


January 18. 2012 06:14 | Reply
Skilled Nursing
Hi there, Great piece of information. It is going to improve my Development services. Thanks for sharing such an informative post and letting me to share my thoughts.

Add comment


(Will show your Gravatar icon)
Type If you can out:

  Country flag

biuquote
  • Comment
  • Preview
Loading



Disclaimer
Windows Mobile is a registered trademark of Microsoft Corporation in the United States and other countries.

Wei Enterprises is not affiliated in any way with Microsoft, HTC, Sprint, or any other wireless carrier/phone manufacturer otherwise mentioned on this site.

Copyright 2012 2009 Wei Enterprises