Backup of files

Got a problem you cannot solve? Try here.
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Backup of files

Postby jimo » Tue Jan 17, 2006 3:19 pm

Anyone have any thoughts on how to create a copy of files before the Pre-Requiste uninstall runs? You can't use copy/move local files because that requires an apply install action.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Jan 17, 2006 3:30 pm

Call CopyFileA / MoveFileA Win32 APIs using Call DLL Function - both should be in kernel32.dll.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Postby jimo » Tue Jan 17, 2006 3:55 pm

Thanks for the quick response.

This is what I've got;

~InstallAware Clipboard Data~
~Call DLL Function~
~{D0DAB771-1924-4F18-97AB-F6EB5F25C835}~
~kernel32.dll,CopyFileA,bool,LASTERROR,"pointer to string",$APPDIR$\\Miner\\Common\\reports.*,"pointer to string",$APPDIR$\\Backup\\reports.*,$~
~mIDEFunc.dll\\mEXEFunc.dll~
~Call DLL Function~
~{8FC05693-7421-4381-9815-EE44430F14AD}~
~kernel32.dll,CreateDirectoryA,bool,LASTERROR,"pointer to string",$APPDIR$\\Backup,$~
~mIDEFunc.dll\\mEXEFunc.dll~


The directory is not being created in the first dll call so the subsequent copy command fails. Any more thoughts? (Why do they paste in reverse order?)

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Jan 17, 2006 4:17 pm

CreateDirectory needs an additional parameter, according to MSDN?
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 126 guests