Askarya Home    Customers     Support     Contact     About us     Shop   

Friday, September 21, 2007

CAB file installation failure when inf file contains negative registry values

Inf files are used to generate cab files containing files and registry settings which get deployed on the device when cab file is installed.

Problem: If a DWORD Registry value is set to a value greater than 0x7FFFFFFF, the cab file installation fails on the device. This is probably a bug in the cab wizard tool (cabwiz.exe).

For e.g. Installation will fail if following registry entry is specified in the inf file

HKLM,Software\MyApp,MyValue,0x00010001,-1

Here -1 is equal to dword 0xFFFFFFFF which is greater than 0x7FFFFFFF.

Workaround is to use a short int equivalent of the negative number, in this case 65535 and when the value is to be used by device side module, use short int to use this value as -1.

Labels: