Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Setup / March 2004

Tip: Looking for answers? Try searching our database.

File Exists Question for Installer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ron Fluegge - 11 Mar 2004 15:41 GMT
I've tried the newsgroups and the only similar post I found had no
responses; so here goes.

I have a deployment project that works fine.  On the initial installation
everything works great.

Now I need to send clients the "next release" or major update on an
installation CD and use the same deployment project installer, but with the
next version of the apps.

However, there are files that the initial application installation installs
that the user may have updated with client data that the "update" should not
"overwrite" such as mdb (Access) files and certain xml files.

As I understand the Launch Conditions editor, it appears to be a go/no-go
situation for the entire installation; not just the one or two files.  I
have tried to locate any examples for FILEEXISTS in the property field, but
there just aren't any.  I've tried building test cases and am failing
miserably; can't get it to work.  I'm probably missing something very
simple, but I'm just not seeing it.

As a workaround, right now I install the same file but with a .bak
extension.  The application each time it runs checks to see if the "real"
file exists and if it does not, then copies the .bak file to the correct
file name.  It works but (1) it runs every time the application starts and
(2) it only can check to see if the file is missing and then "create" the
missing file.  I'd rather not hard code the original file's date/time stamp
in the app, but rather use the installer project to do that.

What I need help with is a condition for the "file" that essentially says if
the file exists on the user's machine and has the original date/time stamp
then just don't overwrite it ... but the installation continues on.

Hopefully, that makes sense.  I have searched MSDN for all of the articles
on "if the file exists" kinda thing and can't find much.  As indicated
above, the only posting on this subject was in this newsgroup and the poster
got no one to respond.

If there are references that you can point me to, I would appreciate it very
much.

Thanks...

Ron
nuha amer - 13 Mar 2004 08:26 GMT
I guess u can add "File search" in the Launch condition editor....then add it as a condition in the properties window of the file that don't want to replace....
The steps are:
open Lauch condition editor from view menu
right click Search target machine and choose Add File search
give it its properties
Notice the property filed on the properties window that displays "FILEEXISTS1"
Go back to the custom actions editor or the file system editor and add "FILEEXISTS1" in the condition field in the properties windows of the specific file

I hope this is what u r asking about...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.