This project has moved. For the latest updates, please go here.

[Solved] need help copy file to installation directora

Topics: Publishing Issue
Nov 10, 2014 at 6:20 AM
Hello

I try to create a custom update and copy a configuration file (XML) to a subdir of the install directory. Is it only possible to make a local copy (C:\Temp --> C:\Program Files (x86)\$ProgramDir)?
I tried to include the XML-file in the update CAB, but where is this file temporarly extracted, so I can take the temp path as source path?

Is there another way to include a XML-File in a custom update? I have no active Directory, so deploying this file via GPO is not possible.
Coordinator
Nov 11, 2014 at 9:11 AM
Hello,
all additionnals files that you add to the main file are copiedin the same directory than the main file (CustomUpdateEngine.exe in this case).
So, if you need to copy an additional file into another directory, just put the name of this file.
For example:
  • You want to copy Config.xml into C:\Program Files\Broadcom\BACS
  • In the copy file wizard:
    • File field : Config.xml
    • Destination field : C:\Program Files\Broadcom\BACS\Config.xml OR %ProgramFiles%\Broadcom\BACS\Config.xml
  • If you want to rename the file:
    • Destination field : C:\Program Files\Broadcom\BACS\NewName.xml OR %ProgramFiles%\Broadcom\BACS\NewName.xml
If the destination folder doesn't exist, it will be created.
Nov 11, 2014 at 7:08 PM
Hello

That's the way I tried first because I thought it should work this way. Maybe I made another mistake. Is there a difference if the file that should be copied exists in destination directory? Will it be overwritten or could this be the reason?
Coordinator
Nov 11, 2014 at 9:33 PM
Is there a difference if the file that should be copied exists in destination directory? Will it be overwritten or could this be the reason?
Yes, it's a problem. If the file already exists on the destination folder, the file is not overwritten. First, use a 'DeleteFile' action (if the file doesn't exists, nothing will happen) and then use a 'Copyfile' Action.

N.B: Before release v1.3.1411.09, WPP doesn't properly deals with the environment variable %ProgramFiles(x86)%. So, if you have used this environment variable to create the Action : Download the latest release and re-create the Custom update.
Marked as answer by rkauskh on 11/13/2014 at 12:58 PM
Nov 13, 2014 at 8:57 PM
Hello

Thank you, deleting the original file before works. The software is deployed. :-)