CabWiz Errors

by Codewiz51 February 10, 2010 19:45

I had to revisit an old project today. A new requirement meant code modification and rebuilding the install for a smart device (iPaq).

CabWiz.exe generated some errors which made no sense during the rebuild process:

Windows CE CAB Wizard

Warning: Section [RegKeys] has no data
Warning: Section [DefaultInstall] key "AddReg" - there are no section entries to process
Error: CAB file "C:\MyPrjDir\PocketCalcCab\Release\PocketCalcCab.CAB" could not be created

ERROR: The Windows CE CAB Wizard encountered an error.
See the output window for more information.

This error looks awful, but the fix is simple.

Here's the command line that was used by VS 2008:

"d:\vs2009\smartdevices\sdk\sdktools\cabwiz.exe"
"C:\MyProjDir\PocketCalcCab\Release\PocketCalcCab.inf"
      /dest "C:\MyProjDir\PocketCalcCab\Release\" /err CabWiz.log

It turns out that an old version of the cab file existed in the directory "C:\MyProjDir\PocketCalcCab\Release\". The file was marked as read only. Removing the read only attribute corrected the situation.

Here's the cabwiz.ex output after correcting the problem:

Starting pre-build validation for project 'PocketCalcCab' ------ 
------ Pre-build validation for project 'PocketCalcCab' completed ------
------ Build started: Project: PocketCalcCab, Configuration: Release ------
Building file 'C:\MyProjDir\PocketCalcCab\Release\PocketCalcCab.cab'...

The steps to fix the problem are simple:

  1. Check to see if a CAB file already exists in the output directory of the cabinet maker project.
  2. If a CAB file exists, check to see if it is read only.
  3. If it is read only, delete it or remove the read only attribute
  4. If that fails, make sure you have full permissions to the output directory where VS 2008 wants to place the CAB file.

Microsoft should really clean up the cabwiz.exe error messages.

Comments are closed

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen | Modified by Mooglegiant


Disclaimer

This blog represents my personal hobby, observations and views. It does not represent the views of my employer, clients, especially my wife, children, in-laws, clergy, the dog, the cats or my daughter's horse. In fact, I am not even sure it represents my views when I take the time to reread postings.

All comments are moderated for content.

© Copyright 2008-2010