Install database folder

  • Thread starter Thread starter Henrik
  • Start date Start date
H

Henrik

I have in my project add a database, but when I made a cab file, and install
it, the database is install in the same folder as the program.

How due I get the database install in the "My Documents" folder?



Henrik

Denmark
 
A doubt you create your DB at your application or you add the DB to
your application at the project with the VS ?

[]s
 
Yes I add the DB to my projekt with the VS, but I can't get it in the right
folder!

Henrik
 
It's an .INF file not .INI file. You can find it in your release
directory/debug of your CAB project. When you look in the .INF check the
section labeled [DestinationDirs].
 
I found it, but the database file was not in the [DestinationDirs]



[DestinationDirs]

Files.Common=0,%InstallDir%

Shortcuts=0,%CE2%\Start Menu

Files.ARMV4=0,%InstallDir%

Files.ARM=0,%InstallDir%

Files.SH3=0,%InstallDir%

Files.MIPS=0,%InstallDir%

Files.X86=0,%InstallDir%

Files.WCE420X86=0,%InstallDir%



I found the file in:



[SourceDisksFiles]

Scubase PPC.exe=1

FISH.BMP=2

PIN.BMP=3

scubase.ico=4

Scubase.sdf=5 - Here is the file

scubase1.ico=6



And in:



[Files.Common]

Scubase PPC.exe,,,0

FISH.BMP,,,0

PIN.BMP,,,0

scubase.ico,,,0

Scubase.sdf,,,0 - Here it is.

scubase1.ico,,,0



Can you help me?
 
Right. All items marked as Files.Common go to %InstallDir%, which is
defined in Strings. I wouldn't have structered my INF quite this way, so
the fix is a bit of a pain to stick with theirs, but it would be like this.
First, remove the reference to the SDF in the Files.Common section. Then
add this:

[Files.Database]
Scubase.sdf,,,0

Now under the [DestinationDirs] section, add the following:

Files.Database=0,"\My Documents"

Of course that should be a localizes string, which is something like %CE2%
for My Documents, but I don't recall it off the top of my head, so I'll let
you Google for the right one.

-Chris
 
I made the change in the inf file, then I open VS and use "Build Cab File"
to make new cab file, but then is the change I made in the inf file gone?
 
The "Build CAB Files" menu overwrites the INF every time. Use the BAT file
that it generates to re-gen the cabs after the first try.

-Chris


Henrik said:
I made the change in the inf file, then I open VS and use "Build Cab File"
to make new cab file, but then is the change I made in the inf file gone?







Right. All items marked as Files.Common go to %InstallDir%, which is
defined in Strings. I wouldn't have structered my INF quite this way, so
the fix is a bit of a pain to stick with theirs, but it would be like
this. First, remove the reference to the SDF in the Files.Common section.
Then add this:

[Files.Database]
Scubase.sdf,,,0

Now under the [DestinationDirs] section, add the following:

Files.Database=0,"\My Documents"

Of course that should be a localizes string, which is something like
%CE2% for My Documents, but I don't recall it off the top of my head, so
I'll let you Google for the right one.

-Chris
 
Where can I find the BAT file?

If it is the dos file BuildCab in the obj\Debug folder, nothing happens if I
push it?

Or is it the Batch Build in VB.Net ?
 
Ensure you run the BuildCab.bat file from within the VS Command Prompt. You
are better off taking a copy of this batch file and placing it somewhere
else so it doesn't get recreated everytime your generate new cab files.
Then within this new file, modify the CabWiz path to your new .INF file.

Cheers
Simon.
 
thanks

Simon Hart said:
Ensure you run the BuildCab.bat file from within the VS Command Prompt.
You are better off taking a copy of this batch file and placing it
somewhere else so it doesn't get recreated everytime your generate new cab
files.
Then within this new file, modify the CabWiz path to your new .INF file.

Cheers
Simon.
 
Back
Top