I was developing a few themes for Standard and Professional devices (using the Windows Phone Custom Theme Generator tool to get me started) and found that when installing the CAB on Standard devices, I would get the following error:
Normally to fix this error, you would edit the .INF file and add BuildMax=0xE0000000 to the CEDevice section as follows (See here for explanation of BuildMax):
[CEDevice]
VersionMin = 3.0
VersionMax = 100.0
BuildMax=0xE0000000
In this case, I did not have an .INF file since the CAB was generated by the Theme Generator. Doing a Bing search, I found a great tool (Benoit Thonnart's MSCEInf) that helps with the process of creating a .INF file from a CAB file and extracting files from the CAB with the true filenames. Using this tool, I created the .INF file, edited it, and then recreated the CAB file using the .INF file and CABWIZ.EXE. MSCEinf’s feature of extracting the true filename saves a lot of time, saving you the drudgery of renaming the files, as specified in the _setup.xml file, by hand. (When CABWIZ creates the CAB, it converts the filenames to 8.3 names).
Step-by-Step guide:
- Create dedicated destination directory.
- Copy MSCEInfEn to this directory.
- Create .INF file.
- Start MSCEInfEn.EXE
- Open the CAB file
- Click on the icon in upper left, ‘Save INF File rebuilt’ to save .INF file.
- Extract files from CAB, using the true filenames
- Using MSCEInfEn, turn Off ‘Use Folders’
- Click 5th button from left ‘Extract Filenames’ (should see icon with red X through it).
- Using MSCEInfEn, extract files
- Click 4th button from left ‘Extract CAB files with original names in a folder’.
- Click ‘Extract’ and select the destination directory.
- At this point you should have the files of your theme / application and the .INF file in the destination directory.
- Modify .INF file
- Open .INF file saved in Step 1 and add the following line below [CEStrings]
- [CEDevice]
BuildMax=0xE0000000
- Save .INF file
- Rebuild CAB file.
- Start a Command Line. (Start | Run | cmd)
- Change to the destination directory.
- Using CABWIZ.EXE recreate the cab file with the following command:
- Cabwiz <filename>.inf
- You may see a warning regarding AddReg, this can be ignored.
- Test the CAB file.
Thanks,
Mike