Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

vb.net installer:  do not install file if it already exists

Posted on 2003-03-18
5
Medium Priority
?
1,132 Views
Last Modified: 2012-08-13
I am setting up the vb.net installer for my application and I need to know how to set it up so that if a file already exists on the target machine it does not install over it. For instance, my app uses an Access mdb. If the database file already exists I don't want to install over it. I have looked at the Conditional Deployment, but can't figure out how to do this. Any help would be very much appreciated. Thanks!
0
Comment
Question by:myester
  • 2
  • 2
5 Comments
 
LVL 23

Expert Comment

by:naveenkohli
ID: 8160752
Follow these steps..

To add a file launch condition
-------------------------------

In the Launch Conditions Editor, select the Requirements on Target Machine node.

On the Action menu, choose Add File Launch Condition.
Select the Search for File node. In the Properties window, select the FileName property and type the name of the file to search for.

Select the Folder property and type the name of the folder where the search will start. This can be either the bracketed name for a Windows Installer special folder (for example, [ProgramFilesFolder]) or the full path to any folder (for example, C:\Program Files\MyProgram).
Optionally, set the additional properties to specify the depth (levels of folders to search), date, size, and version.

Note   The Property property value matches the Condition property value in the launch condition. If you change the Property property, you must also change the Condition property to match.
Select the Condition node. In the Properties window, select the Message property and type the error message that will be displayed if the file is not found.


This is from VS.Net docs..
(ms-help://MS.VSCC/MS.MSDNVS/vsintro7/html/vxtskaddingfilelaunchcondition.htm)
0
 

Author Comment

by:myester
ID: 8160891
Naveen, I have tried in the past what you suggest above. I am using the condition FILEEXISTS1 but this just stops the installation when the file I specified is found. What I want is for the app to install, but not overwrite the .mdb file if it exits.
0
 

Author Comment

by:myester
ID: 8161339
Naveen, I have tried in the past what you suggest above. I am using the condition FILEEXISTS1 but this just stops the installation when the file I specified is found. What I want is for the app to install, but not overwrite the .mdb file if it exits.
0
 

Expert Comment

by:modulo
ID: 8465955
Dear expert(s),

A request has been made to close this Q in CS:
http://www.experts-exchange.com/Community_Support/Q_20605987.html

Without a response in 72 hrs, a moderator will finalize this question by:

 - Saving this Q as a PAQ and refunding the points to the questionner

When you agree or disagree, please add a comment here.

Thank you.

modulo

Community Support Moderator
Experts Exchange
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 8489667
Saving this Q as a PAQ and refunding the 500 points to the questionner

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Loops Section Overview
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question