Adding files while making CAB file

  • Thread starter Thread starter Flying Whiz
  • Start date Start date
F

Flying Whiz

I am trying to make CAB file in .Net CF.I want to add my Data source
file name in /Windows (as /windows/xyz.sdf) and a folder with Text
file in Program Files(/Program Files/Fld/xyz.text).I have to add these
two files while making CAB file in CF.How can I do this? Can any one
give me some steps doing this in .NETCF.

Thanks
Whiz
 
I am trying to make CAB file in .Net CF.I want to add my Data source
file name in /Windows (as /windows/xyz.sdf) and a folder with Text
file in Program Files(/Program Files/Fld/xyz.text).I have to add these
two files while making CAB file in CF.How can I do this? Can any one
give me some steps doing this in .NETCF.

In order to have the files installed to a folder other than \Program
Files\<appname>, you need to manually edit the .inf file created by the
cab wizard. You can find this in your source code's {debug,release}/obj
folder, named <appname>.inf.

Scan through the inf file for the files you want and replace %CE1% with
whichever of the following applies:

I could not find the current MSDN reference, but this is from
Google's cache:

Destination Directory Macro Reference

The following table shows the installation macros that you can use for Pocket PC software. Use these macros in the DestinationDirs section of the CabWiz setup .inf file.

Note Windows CE supports other predefined installation macros, such as %CE3% for \Windows\Desktop. However, these are not supported on Pocket PC, and their usage in an .inf file on Pocket PC may have unexpected results.
Macro string Pocket PC directory
%CE1% \Program Files
%CE2% \Windows
%CE4% \Windows\StartUp
%CE5% \My Documents
%CE8% \Program Files\Games
%CE11% \Windows\Start Menu\Programs
%CE14% \Windows\Start Menu\Programs\Games
%CE15% \Windows\Fonts
%CE17% \Windows\Start Menu

BEWARE!!! Every time you use the cab wizard to regenerate your cab files
it will overwrite your appname.inf file with another default one (does
anyone know if Whidbey fixes this??)


Richard.
 
I have the same problem now :(
I'd like to install program file and necessary DLL's in the standard
directory, nut I'd like to place the DataBase itself in de /My Documents/
directory...
I've been playing around a little with the inf file which is used and there
is a section called
[DestinationDirs]

Files.Common=0,%InstallDir%

Shortcuts=0,%CE2%\Start Menu



[Files.Common]

FinalDemo2.exe,,,0

DICT.sdf,,,0

Dictionarytest1.dll,,,0


[SourceDisksNames]

1=,"Common1",,"C:\Documents and Settings\eric\My Documents\Visual Studio
Projects\FinalDemo2\FinalDemo2\obj\Debug\"

2=,"Common2",,"C:\Documents and Settings\eric\My Documents\Visual Studio
Projects\FinalDemo2\FinalDemo2\"

3=,"Common3",,"C:\Documents and Settings\eric\My Documents\Visual Studio
Projects\Dictionarytest1\Dictionarytest1\obj\Debug\"



[DefaultInstall]

CEShortcuts=Shortcuts

CopyFiles=Files.Common



Ok, so at one point I made in the DefaultInstall section an extra string :
CopyFiles=Files.dataBase

Then in SourceDisksNames an extra number=path for the Database

I created an extra section [Files.DataBase]

with DICT.sdf,,,0

and in section [DestinationDirs] I placed an extra Files.dataBase=0,%CE5%
which according to documentation should point to the /My Documents/
directory...

Obviously all this doesnt work :( When i run the modified .bat file that
should create the output .cab files it just wont do anything :(

any ideas ???
 
I would also like to change the Provider="My Company" to my actual company.
But I don't see how this has any effect on the actual CAB file, since when
the Cab file is created it overwrites the inf file.

Perhaps I am trying to do something different than you envision. To install
my program I am simply copying the CAB file to the Pocket PC and clicking on
it.

Is there another method that I can use for an installation--other than
creating a full-blown installation package--that will incorporate the
information in the inf file?

Richard Thombs said:
In order to have the files installed to a folder other than \Program
Files\<appname>, you need to manually edit the .inf file created by the
cab wizard. You can find this in your source code's {debug,release}/obj
folder, named <appname>.inf.

Scan through the inf file for the files you want and replace %CE1% with
whichever of the following applies:

I could not find the current MSDN reference, but this is from
Google's cache:

Destination Directory Macro Reference

The following table shows the installation macros that you can use for
Pocket PC software. Use these macros in the DestinationDirs section of the
CabWiz setup .inf file.
Note Windows CE supports other predefined installation macros, such as
%CE3% for \Windows\Desktop. However, these are not supported on Pocket PC,
and their usage in an .inf file on Pocket PC may have unexpected results.
 
When you modify the INF file *don't* use the "Build CAB Files" menu in
Studio again. Instead use the batch file that's generated with the CABs to
rebuild.

-Chris
 
That was the key. Thanks very much.

Chris Tacke said:
When you modify the INF file *don't* use the "Build CAB Files" menu in
Studio again. Instead use the batch file that's generated with the CABs to
rebuild.

-Chris



clicking
 
Back
Top