cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
davide77
Level 5

XCopyFiles function and add cost to feature

Hi, I need to use XCopyFiles and I wish I could add cost of files and/or directories that I have to copy to a feature at runtime.
Could I do this?
thank u,
Davide
Labels (1)
0 Kudos
(3) Replies
Happy_Days
Level 7

Check out Installscript functions like FeatureAddCost to achieve this.
0 Kudos
davide77
Level 5

I tried with the following code but it still doesnt work. It show me the same cost of the feature..where I m wronging? Thanks
Davide

function OnBegin()
STRING svResulta;
NUMBER nvResulta,nvResulta1, nvCostLow, nvCostHigh;
begin

GetFileInfo (SRCDIR ^ "CIAO" ^ "net.pdf",FILE_SIZE_LOW,nvResulta,svResulta);
NumToStr (svResulta, nvResulta);
MessageBox ( svResulta , WARNING );
GetFileInfo (SRCDIR ^ "CIAO" ^ "net.pdf",FILE_SIZE_HIGH,nvResulta1,svResulta);

NumToStr (svResulta, nvResulta1);
MessageBox ( svResulta , WARNING );

CalculateAndAddFileCost( nvResulta, nvResulta1, SRCDIR ^ "CIAO" ^ "net.pdf", 0, nvCostHigh, nvCostLow );
FeatureAddCost ( MEDIA, "Minima", SRCDIR ^ "CIAO" ^ "net.pdf", nvResulta,nvResulta1);
FeatureAddCost ( MEDIA, "Minima", TARGETDIR, nvResulta,nvResulta1);
end;
0 Kudos
davide77
Level 5

Can someone help me????....I'm so in a hurry!!!
Thank u in advance,
Davide
0 Kudos