I need to search for an existing access database that will always be in same place if installed and if there use it instead of the one in the install package. I've create a file search under the Search section. How can I now accomplish what I need? I had originally thought to wait until after the install and then just copy the file over if it existed but then thought about a user who might install to the same folder as the old install.
You mean to never overwrite the file if already exist? If this is what you need then switch to organization page and mark the component associated with the file as "Never Overwrite".
Hmmm, I had replied to this before but my session must have ended or something as it never posted.
Basically there exists an old install of the app we're proposing writing this new install for. The old install always installed to the same location (a folder on the root of the C: drive). One of the files installed is a mdb database. They're asking us with this new install we're building with AI to check for that file and if it exists bring that into the new install location instead of the blank mdb included in the new install. So if an existing database is not found the install will just go ahead as normal. If it is found I want to copy the existing database into the new install target instead of the one in the package. I have created the search param in AI but am not sure how to use it. My first thought was to let the install run normally and then copy the old database over as a post procedure. But then I realized the person might install to the same folder the existing app was installed to. This would probably be rare as we'll default to "Program Files" but still. So I'm thinking to maybe copy the existing database to a temp folder/file and then after install completes copy it over with batch file or something. Unless there's an easier way in AI. Either I'm not sure from reading the documentation how to use the search variable I created in AI to do anything.
This seems like it should do the trick. I've been playing with this and modifying to my need. For testing I have MsgBox statements in the code. When I uninstall the app I see the message pop up also. How can I keep the scripts from running during uninstall?
FOLLOW US
Get the latest news in Application Packaging