Page 1 of 1

Backup of files

Posted: Tue Jan 17, 2006 3:19 pm
by jimo
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.

Posted: Tue Jan 17, 2006 3:30 pm
by MichaelNesmith
Call CopyFileA / MoveFileA Win32 APIs using Call DLL Function - both should be in kernel32.dll.

Posted: Tue Jan 17, 2006 3:55 pm
by jimo
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?)

Posted: Tue Jan 17, 2006 4:17 pm
by MichaelNesmith
CreateDirectory needs an additional parameter, according to MSDN?