PDA

View Full Version : How create a Ini Backup



geppo12
01-26-2003, 10:13 AM
I need to create a *ini file backup during installation. I try it with the following custom action but it doesn't work.

Dim iniFile, oldiniFile, fso
iniFile = Session.property("INSTALLDIR") & "Bookfilter.ini"

Set fso = WScript.CreateObject("Scripting.FileSystemObject")

if (fso.FileExists(iniFile)) then
oldiniFile = Session.property("INSTALLDIR") & "Bookfilter_ini.old"
fso.CopyFile iniFile,oldFile
end if

Session.property("SVILUPPO2") = "c:\sviluppo"
Session.property("SPEEDY") = "c:\speedy"

Chandima
01-27-2003, 01:51 PM
Where are you seqeuncing this Custom Action?

You could simply use the ini Files view to generate two identical ini files with different names.