PDA

View Full Version : Deleting certain registry keys with post-xmlprovisioning


smuppy
5th June 2009, 12:34 PM
I have a few keys I want to delete using xml-provisioning:

<characteristic type="Registry">
<nocharacteristic type="HKLM\Services\SqmUpload"/>
<nocharacteristic type="HKLM\Services\BTAGSVC"/>
<nocharacteristic type="HKLM\Services\BthAsPlugin"/>
</characteristic>

When I built the cab, I checked the _setup.xml and it looks fine, nothing odd there. When trying to install on a fresh device (hardware reset, htc 7500 running wm 6.1) i get "RegTest1 cannot be installed".

I came to the conclusion that these three values are not deleteable using post-xmlprovisioning, but I dont know why and if there is any way to circumvent this:

<nocharacteristic type="HKLM\Services\HTCSENSOR"/>
<nocharacteristic type="HKLM\Services\HTCSENSOR2"/>
<nocharacteristic type="HKLM\Services\Gsensor"/>

The above three values are not producing this error and they also get deleted from the registry correctly.

Does anyone know the cause for this behaviour and maybe even a solution? Can it be that I need to set a DWORD (Flags=4) first so that the services wont load on boot? But I should be able to delete the damn key anyway i think...

I am not a coder so if the solution is a codesnippet in a setup.dll or similar, I'll have to learn C# :)

smuppy
5th June 2009, 12:49 PM
Hmm, found a solution, not an acceptable one though.
First I have to add Flags, value 4, then reboot, THEN delete the keys.
This requires stuff I dont know how to do.
1. reboot the unit
2. run something that provisions the rest of the xml-code and deletes the keys, silently in the background.

Does anyone know how to do this? Can a cab be executed in priviliged mode and does anyone know if it might help doing so?