This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to Backup Existing Files while Installing Hotfix in Custom Action
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 16, 2011
02:36 AM
How to Backup Existing Files while Installing Hotfix in Custom Action
Hi, i want to backup files in custom action while installing hotfix/patch
I want to do this in managed code custom action using InstallShield.Interop.Msi dll or any other dll. However i dont know how to get the installed files in run time(while installing) in my cutom action.
Does anyone know a function or something else that can get me the installed files(for example the path and thier name or something like that) in run time from Basic msi project?
Thanks!
I want to do this in managed code custom action using InstallShield.Interop.Msi dll or any other dll. However i dont know how to get the installed files in run time(while installing) in my cutom action.
Does anyone know a function or something else that can get me the installed files(for example the path and thier name or something like that) in run time from Basic msi project?
Thanks!
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 14, 2011
01:36 AM
This might be a bit late for you but for anyone else that comes here.
In the InstallScript section create a new function with something like this:
function BackupSQLites(hMSI)
begin
// for 32 bit
XCopyFile ("C:\\Program Files\\YOUR APP\\YOURFILE.txt" , "C:\\Backups", EXCLUDE_SUBDIR);
// for 64 bit
XCopyFile ("C:\\Program Files (x86)\\YOUR APP\\YOURFILE.txt" , "C:\\Backups", EXCLUDE_SUBDIR);
end;
Then in Create a New InstallScript in Custom Actions and Sequences for this.
And then add it into the Sequences->Installation->UserInterface.
I put it before the Welcome windows.
In the InstallScript section create a new function with something like this:
function BackupSQLites(hMSI)
begin
// for 32 bit
XCopyFile ("C:\\Program Files\\YOUR APP\\YOURFILE.txt" , "C:\\Backups", EXCLUDE_SUBDIR);
// for 64 bit
XCopyFile ("C:\\Program Files (x86)\\YOUR APP\\YOURFILE.txt" , "C:\\Backups", EXCLUDE_SUBDIR);
end;
Then in Create a New InstallScript in Custom Actions and Sequences for this.
And then add it into the Sequences->Installation->UserInterface.
I put it before the Welcome windows.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)