[WiX-users] Conditionally Install Component if Registry Key Exists

2010-03-04 Thread Brendan Rice
I have a component I need to install only if a registry key exists which means 
an application has been installed.
I need to assign the value of the registry key (it is a directory) to a 
property then use this property to copy files from.
I have the following script so far but get an error The system cannot find the 
file '[MYTESTDIR]fileToCopy.dat'.
Any help would really be appreciated.
Property Id=MYTESTDIR
RegistrySearch Id=NetFramework20
Root=HKLM
Key=SOFTWARE\TEST\VALUE\1.00
Name=MyName
Type=directory /
/Property

Directory Id=TARGETDIR Name=SourceDir
Directory Id=ProgramFilesFolder
Directory Id=TEST Name=Test
Component Id=MyComponent 
Guid=E5FF53DE-1739-42c4-BE37-60F810C9CD69
  ConditionMYTESTDIR/Condition
  File Id=fileToCopy.dat Name=fileToCopy.dat 
Source=[MYTESTDIR]fileToCopy.dat
  CopyFile Id=fileToCopy.datCopy 
DestinationProperty=WEBSERVICEBINFOLDER /
  /File

/Directory
/Directory
/Directory

Feature Id=MyFeature Title=MyFeature Level=1
ComponentRef Id=MyComponent /
/Feature


Brendan Rice

Telephone +44 (0)28 9073 5749

Equiniti ICS Limited
205 Airport Road West, Belfast, BT3 9ED, Northern Ireland
brendan.r...@equiniti-ics.commailto:brendan.r...@equiniti-ics.com
www.equiniti-ics.comhttp://www.equiniti-ics.com/



The information contained in this message is confidential and is intended for 
the addressee(s) only. If you have received this message in error or there are 
any problems, please notify the originator immediately. The unauthorised use, 
disclosure, copying or alteration of this message is strictly forbidden. 
Equiniti ICS will not be liable for direct, special, indirect or consequential 
damages as a result of any virus being passed on, or arising from alteration of 
the contents of this message by a third party.

Equiniti ICS Limited registered office 205 Airport Road West, Belfast, BT3 9ED. 
Registered No NI36763.  
To find out more about Equiniti ICS Limited visit our web site at 
http://www.equiniti-ics.com.



--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Conditionally Install Component if Registry Key Exists

2010-03-04 Thread Brendan Rice
I have a component I need to install only if a registry key exists which means 
an application has been installed.
I need to assign the value of the registry key (it is a directory) to a 
property then use this property to copy files from.
I have the following script so far but get an error The system cannot find the 
file '[MYTESTDIR]fileToCopy.dat'.
Any help would really be appreciated.
Property Id=MYTESTDIR
RegistrySearch Id=NetFramework20
Root=HKLM
Key=SOFTWARE\TEST\VALUE\1.00
Name=MyName
Type=directory /
/Property

Directory Id=TARGETDIR Name=SourceDir
Directory Id=ProgramFilesFolder
Directory Id=TEST Name=Test
Component Id=MyComponent 
Guid=E5FF53DE-1739-42c4-BE37-60F810C9CD69
  ConditionMYTESTDIR/Condition
  File Id=fileToCopy.dat Name=fileToCopy.dat 
Source=[MYTESTDIR]fileToCopy.dat
  CopyFile Id=fileToCopy.datCopy 
DestinationProperty=WEBSERVICEBINFOLDER /
  /File

/Directory
/Directory
/Directory

Feature Id=MyFeature Title=MyFeature Level=1
ComponentRef Id=MyComponent /
/Feature


Brendan Rice

Telephone +44 (0)28 9073 5749

Equiniti ICS Limited
205 Airport Road West, Belfast, BT3 9ED, Northern Ireland
brendan.r...@equiniti-ics.commailto:brendan.r...@equiniti-ics.com
www.equiniti-ics.comhttp://www.equiniti-ics.com/



The information contained in this message is confidential and is intended for 
the addressee(s) only. If you have received this message in error or there are 
any problems, please notify the originator immediately. The unauthorised use, 
disclosure, copying or alteration of this message is strictly forbidden. 
Equiniti ICS will not be liable for direct, special, indirect or consequential 
damages as a result of any virus being passed on, or arising from alteration of 
the contents of this message by a third party.

Equiniti ICS Limited registered office 205 Airport Road West, Belfast, BT3 9ED. 
Registered No NI36763.  
To find out more about Equiniti ICS Limited visit our web site at 
http://www.equiniti-ics.com.



--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Conditionally Install Component if Registry Key Exists

2010-03-04 Thread Bob Arnson
On 3/4/2010 11:32 AM, Brendan Rice wrote:
File Id=fileToCopy.dat Name=fileToCopy.dat 
 Source=[MYTESTDIR]fileToCopy.dat
CopyFile Id=fileToCopy.datCopy 
 DestinationProperty=WEBSERVICEBINFOLDER /
/File


If you want to copy a file that's already installed on the system (as 
opposed to being installed by your package), you can't use a File 
element. It's for installing new files.

-- 
sig://boB
http://joyofsetup.com/


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users