|
-
Nov 22nd, 2007, 08:31 AM
#1
Thread Starter
Junior Member
Visual Studio Installer (Vs6)
Hi,
i am having some trouble with the Visual Studio installer. I have an Application(vb6) with a Database and Several other files i packed into a MSI installer which works really good. I tested it on several XP,2k, Vista Machines sofar and its runs pretty smooth everywhere always producing a 100% working installation without any errors.
But one thing i cant understand and i cant even find any infos about it...when i change something in the Apppath the installer will come up again. Example:
I made a backup of the Database and want to restore it...i copy my BackupDB over the original DB-File in apppath and when i start the application the installer will come up and install the original database again. I made an update to the exe and replaced it, when i now start the new version the installer will start automaticly and replace the new version with the original version from the installer pakage. Is there ANY way to get rid of this? I want to make updates whenever i want without the need of a new installer and i want to copy a databse backup without the installer messing everything up after the restore.
I have the problem on XP sp1,sp2 and Win2k.
Maybe somone knows whats going on there.
thx
-
Nov 22nd, 2007, 08:41 PM
#2
Re: Visual Studio Installer (Vs6)
Windows Installer is trying to protect the installed files. This is its job.
I'm not sure how to tell it not to protect these files, in particular the EXE. Normally you'd deploy a patch package. You might look at How To Update a Visual Studio Installer Package which isn't about updating your deployment package, but about making an update/patch package.
But I do know that you are not supposed to put any updatable files in App.Path anyway. Something like an MDB file? That's just nuts, and you'll have even more problems with Vista (though it may be virtualizing the problem away for you - or seemingly so until a different user runs your program on the same machine).
Since late in Win95's lifetime this has been considered "wrong" and in each new version of Windows things have tightened up more. In Vista it's pretty locked down unless you've disabled UAC and used other hacks to bypass Vista security.
It comes down to the "special folders" really. Your program should locate and use these via system calls to SHGetFolderPath() and SHGetFolderPathAndSubDir() and similar entrypoints in the Shell32.dll library.
The folder you want is requested via "CSIDLs" (though in Vista these have been deprecated in favor of "KNOWNFOLDERIDs"). Typically you're supposed to put a subfolder structure like \<company name>\<app name> below that, and then drop your updatable data files under there. Thus the use of SHGetFolderPathAndSubDir() in many cases.
There are special folders for per-computer files, per-user-on-this-computer files, and per-user-roaming files. There are both user-visible and user-hidden locations.
I'm pretty sure that even using VSI 1.1 you can designate these special folders as the filesystem location where installation should put a given file. I'd have to play around a bit again, it's been a while. Maybe somebody can point you to a tutorial?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|