Hi,
I have an issue which I can't solve.
I need to copy an xml file from a location in the pc to folder: c:\windows\syswow64.
I divided my exe into 3 components and I need the xml to be copied only when one of the components is chosen in the 'ConfigureDlg'.
The xml is not a part of my components. it's a simple file on my pc.
let's say I have 3 components under MainFeature in organization tab:
1.ServiceA
2.ServiceB
3.WebApp
I want the xml to be copied only when I choose ServiceA in 'ConfigureDlg'. let's say the xml name is 'test.xml'.
I did the following:
1. I copied test.xml under the folder of ServiceA in my pc.
2. I created a new custom action with the following settings:
file path: c:\windows\syswow64\cmd.exe
command line: /C COPY /Y "[ServiceA_dir]test.xml" "c:\windows\syswow64" (remark: [ServiceA_dir] is the location where all files of ServiceA exist (including test.xml))
condition: ((&ServiceA= 3) AND NOT (!ServiceA= 3)) AND VersionNT64
When I run the exe I get an error that the copy can't be done. when I see the log, I see the source location is where I actually install the application, for example:
c:\ProgramFiles\Company\ServiceA
ServiceA is not installed at this point so of course the path c:\ProgramFiles\Company\ServiceA does not exist. why does it search there?
The file path is [ServiceA_dir]test.xml and [ServiceA_dir] is the location where all files of ServiceA exist (including test.xml). why does it search in Program files?
Maybe there is another way to copy a file depending on a chosen component in 'ConfigureDlg'?
I try to solve it for 3 days....
Many thanks!!!
FOLLOW US
Get the latest news in Application Packaging