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!

Eweber
Posts: 5
Joined: Tue Dec 29, 2015 4:43 pm

Search for folders.

Hello, thinking about buying advanced installer but running into a couple problems.

I need to search to see if a subdirectory exists under \inetpub\wwwroot. If the directory exists, I need to rename the directory and it's contents to a backup name before installing new files into that directory. I have seen that I can do this with installaware, but prefer aspects of this product more. Any help would be greatly appreciated.

Eric
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Search for folders.

Hi Eric and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

To search if a folder exists, you can create a search operation in the Search view. Use the [ New Search Wizard ] toolbar button, to set up a new search, following step-by-step directions.

To backup the existing folder, you will need to create a custom action. For example, you can create your custom action as a custom action written in C# or a custom action written in C++. Please take a look on the How to integrate and debug custom actions? article which may be useful to you.

If you will use the DTC C# approach, then you can take advantage of the Directory.Exists Method.

You can also use the Robocopy CMD to copy a folder. For example, you can use something like this:

Code: Select all

ROBOCOPY  <source_folder> <destination_folder> /E
To launch a .bat file, please follow the steps from the How to launch a CMD or BAT file? article.

You can also take a look on the "How to backup and restore files/folders in APPDIR?" thread which debates a similar issue.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”