I have to put an existing file on the target PC. Even if the file exists or not I must replace the existing one with the one in my msi file.
I put this file in a separate component and I check the Permanent checkbox to be not deleted on uninstall.
But I see that the existing file is not replaced on installation ... It is not a read-only file. I check this ...
Can you suggest me a custom action to delete the file if exists on the target PC to be able to copy the new one.
I don't found the right syntax to delete a file with VBScript ...
I put the following code in a vbs file on my hard disk and I create a InstallUISequence=>Begin=>New Attached Custom Action
and in Function name I put Main():
but its not workingFunction Main()
Dim fso, demofile
Set fso = CreateObject("Scripting.FileSystemObject")
demofile = Session.Property("RVDEBUG_INSTALL") + "\\etc\\RVI-ME-USB-Philips.brd"
fso.Delete demofile, true
End Function
I have an error message:
Thanks a lotThere is a problem with this Windows Installer package.
A script required for this install to complete could not be run.
Contact your support personnel or package vendor.
Alexandre