Hello, I am new to InstallAware and currently my application is being installed using a different installer. Using InstallAware, after a user selects the folder to install the application to, if that folder already exists, I want to move everything in that folder to a new folder called ApplicationName.old. Can anyone help me figure out how to do this?
Thanks!
Move existing files to a new folder
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Move existing files to a new folder
Dear Viper786,
use the command "Copy/Move Local Files" to copy or move files that are already present on the target system (or installation media) into a new location on the target system.
Regards
use the command "Copy/Move Local Files" to copy or move files that are already present on the target system (or installation media) into a new location on the target system.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Move existing files to a new folder
Thanks for the reply. Do I do something like this?
Source Folder: $TARGETDIR$
Source Files: *.*
Target folder: $TARGETDIR$\newfolder
Target Files: *.*
and select Move Files and check Include Subfolders?
Source Folder: $TARGETDIR$
Source Files: *.*
Target folder: $TARGETDIR$\newfolder
Target Files: *.*
and select Move Files and check Include Subfolders?
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Move existing files to a new folder
yes, you are correct ... but please note that "Include Subfolders" option only works with native engine.
Notes
With the Windows Installer engine, files copied or moved by this command are not removed upon uninstallation. Therefore, if removal of such files is required, accompany each Copy/Move Local Files command with a Delete Files command that is set to undo the copy/move local action.
The Native Engine does not have this limitation and files copied/moved by this command will be uninstalled normally without requiring manual deletion
Regards
Notes
With the Windows Installer engine, files copied or moved by this command are not removed upon uninstallation. Therefore, if removal of such files is required, accompany each Copy/Move Local Files command with a Delete Files command that is set to undo the copy/move local action.
The Native Engine does not have this limitation and files copied/moved by this command will be uninstalled normally without requiring manual deletion
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Move existing files to a new folder
Thanks for the reply. How do I enable the native engine?
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Move existing files to a new folder
Example;
Set Variable NATIVE_ENGINE to TRUE
Copy/Move Local Files ...
Set Variable NATIVE_ENGINE to FALSE
For more information on NATVE ENGINE please refer to included IA documentation.
Regards
Set Variable NATIVE_ENGINE to TRUE
Copy/Move Local Files ...
Set Variable NATIVE_ENGINE to FALSE
For more information on NATVE ENGINE please refer to included IA documentation.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Move existing files to a new folder
Thank you for the reply. This is what it looks like now:
Set Variable NATIVE_ENGINE to TRUE
Move Local Files $TARGETDIR$\*.* to $TARGETDIR$\newfolder\*.* (include subfolders)
Set Variable NATIVE_ENGINE to FALSE
Apply Install (get results into variable SUCCESS)
It moves the files to the new folder, but not the folders. I tried going through the documentation but I can't figure out what I am doing wrong. Can you please help me?
Set Variable NATIVE_ENGINE to TRUE
Move Local Files $TARGETDIR$\*.* to $TARGETDIR$\newfolder\*.* (include subfolders)
Set Variable NATIVE_ENGINE to FALSE
Apply Install (get results into variable SUCCESS)
It moves the files to the new folder, but not the folders. I tried going through the documentation but I can't figure out what I am doing wrong. Can you please help me?
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Move existing files to a new folder
Did you read the NATIVE ENGINE documentation?
This happens because the TARGETDIR is not already available on the target OS when you execute the "Move Local Files" command.
The TARGETDIR is effectively available after Apply Install execution only.
Please have also a look at the following link.
http://www.installaware.com/forum/viewtopic.php?f=2&t=4338
Regards
This happens because the TARGETDIR is not already available on the target OS when you execute the "Move Local Files" command.
The TARGETDIR is effectively available after Apply Install execution only.
Please have also a look at the following link.
http://www.installaware.com/forum/viewtopic.php?f=2&t=4338
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Move existing files to a new folder
Thank you for the reply. Sorry for all my questions, I am very new to InstallAware and building MSIs. Can you recommend what I can do to achieve what I am trying to do? Move all files and folders if the folder exists to a new folder.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Move existing files to a new folder
Yes, copy/move that files only if the folder exist.
Regards
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Move existing files to a new folder
Sorry, I don't think i understood your last reply. I am trying to move files AND folders if the folder already exists but using the file copy/move it is only moving the files because as you said, TARGETDIR is not already available on the target OS. What can I do differently to achieve this?
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Move existing files to a new folder
I mean something as below;
Regards
Code: Select all
Comment: Check if your directory already Exist
Set Variable MYFOLDER_EXIST to FALSE
Does Folder Exist C:\xxxxx (get result into variable MYFOLDER_EXIST)
Comment: .... Install files commands
Apply Install
if Variable SUCCESS Equals COMPLETE
if Variable MYFOLDER_EXIST Equals TRUE
Set Variable NATIVE_ENGINE to TRUE
Copy Local Files \ to Set Variable NATIVE_ENGINE to FALSE
end
end
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: Google [Bot] and 127 guests