PDA

View Full Version : Error -132 FeatureGetCostEx


Blueeberry
07-16-2009, 03:45 AM
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

RobertDickau
07-19-2009, 05:42 PM
What kind of project? FeatureGetCostEx works only for InstallScript and InstallScript MSI projects...

Blueeberry
07-22-2009, 12:59 AM
Hi

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

regards
Blueeberry

RobertDickau
07-22-2009, 07:58 AM
It depends where you want the value; if nothing else, there's an MSI function MsiGetFeatureCost that might be of use to you...