Groups | Blog | Home
all groups > visual studio .net setup > march 2006 >

visual studio .net setup : Deployment. Overwriting XML datafiles


RickH
3/23/2006 9:46:33 AM
I have several data files (XML) that need to be installed if not there, but
not installed if they do exist. I install using an MSI based setup in VSTO
2005. Installs are on CD/DVD, not Web.
In the Launch Condition editor, I can search for the existence of the XML
files. Apparently, if found, it sets a variable to TRUE. In the File System
Editor, you can put the variable you created in the Condition property.
Unfortunately, I can't seem to set it to not install the file if true. I
tried putting:
(NOT FUELCONSUMPTIONXMLEXISTS) in the condition property, but it ignores the
NOT.
Any way to easily do this?
Phil Wilson
3/23/2006 11:40:08 AM
Strictly speaking, it doesn't set the property to true, it sets it to the
path of the found file, but nevertheless a condition of (NOT YOURPROPERTY)
should be working. Are you sure the search is working? In the Welcome dialog
properties, put [FUELCONSUMPTIONXMLEXISTS] in front of the text - that will
show the value of the property, the path if it's there. Where are you
searching? Note that TARGETDIR still has its default value when you search,
so you could be searching in one place and installing to another,
overwriting the file.
--
Phil Wilson [MVP Windows Installer]
----
[quoted text, click to view]

RickH
3/23/2006 1:18:02 PM
What value does TARGETDIR have when I do the search? I need it to be where
the installation will be, if new install, won't exist, if old install, file
might exist.
[quoted text, click to view]

Really appreciate the help.
RickH
3/23/2006 1:32:01 PM
RickH
3/23/2006 1:53:02 PM

OK, I got it to return the Path, which is not what the doc inside VSTO 2005
says.
So putting NOT in front of the var in the Condition sertting, does nothing,
RickH
3/23/2006 2:12:01 PM

It works, after I specified the path correctly -- [ProgramFiles]\myFolder
\ is needed

and for the Condition
NOT FILEEXISTS1
is correct.
Thanks for the help.
AddThis Social Bookmark Button