?
Solved

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

Posted on 2003-03-18
5
Medium Priority
?
1,126 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

777 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