Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   .NET Installation / Documentation (http://www.xtremevbtalk.com/-net-installation-documentation/)
-   -   Create installation file including image file and database (http://www.xtremevbtalk.com/-net-installation-documentation/326225-create-installation-file-including-image-file-database.html)

WangCH 07-22-2013 11:52 PM

Create installation file including image file and database
Hi all,
I have a program is coming to an end and would like to make it into a installation file.

My program involves an Access database and a landolt C image folder. The application has to load the images from the landolt C image folder continuously, BTW there are 44 .bmp images in the folder.

Is there anyway to include this folder to the installation file and make sure it is working while running on another computer?

Another thing is the database, I just simply added the DB under the program files folder. The DB is working after installed to other com but I'm not sure whether this is the right way to do it.

Hoping you guys give me some idea.

Thank you guys in advance.

DrPunk 07-23-2013 04:33 AM

You don't really want to install the database to the program files folder. This will cause all manner of issues on Windows 7 or later if not run as administrator.

Basically Window 7 (and later) protects files in various folders (Program Files being one of them) from being changed by a User (all applications in Windows 7 are run as User even if the user is an administrator). What will happen with your program is it will not alter the database in the program files folder. Windows will make a copy of that database and put it in the User's Virtual Store folder (C:\Users\[Username]\AppData\Local\VirtualStore) and then Windows will force your program to use that database even though your program will be connecting to C:\Program Files\etc.

It gets seriously confusing because your program will work. It will do stuff to the database. But when you look at the database in the program files folder it will appear as though it hasn't touched the database.

Also, other users using the program will then have their own Virtual copy of the database and so no one will share the data.

For that reason it's best really to use the CommonApplicationData folder (C:\Program Data on Windows 7, although use Environment.SpecialFolder.CommonApplicationData in order to get the operating system's equivalent, i.e. XP's location is different) and create a folder in there for your application to use. Windows 7 won't protect that folder and all users can share the same data source.

All times are GMT -6. The time now is 06:50 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.