"File Copy/Move" operation problem - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

indeser
Posts: 3
Joined: Tue Dec 21, 2010 3:47 pm

"File Copy/Move" operation problem

Hi,

We are having a problem moving files from previous versions of an application.

OBJECTIVES
We want to move a database file from an old location (in program files directory) to a new location (in common application data). We are using a "File Copy/Move" operation to do it. The source directory location is a property based folder and its path is got by a a search (property name: ORIGINAL_DATABASE_PATH).

PROBLEM
We already have previous installations that use the "File Copy/Move" operation to move the files. So in these moment we have some customers with their database located in "Program Files" directory and others with their database located in "Common Application Data" directory. This means that the property ORIGINAL DATABASE_PATH may be equals to the target database location or not.

If we set the "File Copy/Move" operation as a Move operation then the database file is deleted when ORIGINAL DATABASE_PATH equals the target database path. All data is lost in this case.
If we set the "File Copy/Move" operation as a Copy operation then the database file isn't deleted from its original location when ORIGINAL DATABASE_PATH is different to the target database path.

We've seen we may use "Custom Actions">"Standard Actions">"MoveFiles">"Execution Condition" to set a condition to avoid the file move operation when (ORIGINAL_DATABASE_PATH <> MyApplicationDataDirectory_DIR) but this would stop any file movement so in the future we could do other "File Copy/Move" operation with other condition. Isn't it?

It seams a bug of Advanced installer. Any file move operation with the same source and target file path will end up with the file removal. That converts the move operation in a remove operation (very dangerous).

May you help us to solve this issue?

Thanks in advance.

Andrés Berenguer

INDESER
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: "File Copy/Move" operation problem

Hi Andrés,
It seams a bug of Advanced installer. Any file move operation with the same source and target file path will end up with the file removal. That converts the move operation in a remove operation (very dangerous).
Thank for bringing this to our attention, I will forward this issue to the development team.
May you help us to solve this issue?
You can try to condition the file operation's component from the Organization page using the search.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”