cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Blueeberry
Level 4

Error -132 FeatureGetCostEx

Hi

I hava a problem with my Install Script... But I don't know why...

This is my Script:

export prototype FreeSpace(HWND)

function FreeSpace(hMSI)

STRING sTargetDir, sCostHigh, sCostLow;
NUMBER nTotalRequiredSpace, nResultValue;
INT nCostHigh, nCostLow;

begin

//Set Variables
sTargetDir = TARGETDIR;

//Creat Directory for FeatureGetCostEx
CreateDir(sTargetDir);

//Look for size of the Feature
nResultValue = FeatureGetCostEx(MEDIA, "", sTargetDir, nCostHigh, nCostLow);

//This is only for look, if command does Success
NumToStr(sCostLow, nCostLow);
NumToStr(sCostHigh, nCostHigh);
MessageBox(sCostHigh + " " + sCostLow, INFORMATION);

end;


When I debugg this Script the Variable nResultValue always is -132, I look in the Helpfile and there is written:

-132
The specified media cannot be found.
The media has been declared, but it not associated with any features. Make sure that script-created features are associated with the media.


What is my failure ????

Please help me and thanks for all replys


regards

Blueeberry
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

What kind of project? FeatureGetCostEx works only for InstallScript and InstallScript MSI projects...
0 Kudos
Blueeberry
Level 4

Hi

I've got a Basic MSI Project... 😮
Is there any way to finde out how great the size of the selected features is ?

regards
Blueeberry
0 Kudos
RobertDickau
Flexera Alumni

It depends where you want the value; if nothing else, there's an MSI function MsiGetFeatureCost that might be of use to you...
0 Kudos