This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Install shiled 12 problem,,
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 27, 2010
01:28 PM
FeatureGetCostEx fails to return value for MEDIA
I have an InstallScript only setup in which I am using FeatureGetCostEx.
Below is my code that I am using.
Note that the while loop I added after my attempt to get the cost of all features in MEDIA failed.
The problem is that FeatureGetCostEx is returning zero bytes for all the selected features in MEDIA.
In this same function I also have a runtime MediaSource called FOOMEDIA. I specify szFeature = "". The target is the same as in the previous code example. This returns a valid size in nCostLow, just as I would expect.
I have verified that I am getting a valid feature. I have also verified that each selected feature has a component and files. I have attached a report from the Cab File Viewer utility.
Any ideas why I am not seeing values for this? Thanks.
Below is my code that I am using.
lAllFeatures = CreateNewList(STRINGLIST);
nRetVal = FeatureListItems(MEDIA, TOPOFEATURE, lAllFeatures);
nRetVal = ListGetFirstString(lAllFeatures, sFeature);
sMedia = MEDIA; //verifying that I have MEDIA set correctly
while (nRetVal != END_OF_LIST)
nCostHigh = 0;
nCostLow = 0;
if (FeatureIsItemSelected(MEDIA, sFeature)) then
nRetVal = FeatureGetCostEx(MEDIA, sFeature, pTargetDir, nCostHigh, nCostLow);
CalculateAndAddFileCost(nCostHigh, nCostLow, pTargetDir, 0, nSelectedCostHigh, nSelectedCostLow);
endif;
nRetVal = ListGetNextString(lAllFeatures, sFeature);
endwhile;
ListDestroy(lAllFeatures);
Note that the while loop I added after my attempt to get the cost of all features in MEDIA failed.
The problem is that FeatureGetCostEx is returning zero bytes for all the selected features in MEDIA.
In this same function I also have a runtime MediaSource called FOOMEDIA. I specify szFeature = "". The target is the same as in the previous code example. This returns a valid size in nCostLow, just as I would expect.
I have verified that I am getting a valid feature. I have also verified that each selected feature has a component and files. I have attached a report from the Cab File Viewer utility.
Any ideas why I am not seeing values for this? Thanks.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2010
05:22 AM
Dear Friends
I need some urgent help from you guys...
advance thanks to u..
I am new to installershiled...my problem is i created new installer with my install shiled 12..
after i added all my dlls and all...and i did "batch build" to create new installer file..everything going good..but new installer is coming with "Programfiles folder".in that programfiles folder have all dlls which i include in code,,,now i copied my generated installer file and try to install,,its saying some dll is missing,,
but i copied whole new release folder and try to install,,its installing,,becoz in that folder all dlls is there in program folder,,,now my questions is why new program file is creating with all dlls...i want to use one .msi file to test other system,,its not good to give whole folder to client....pls give me idea why its creating new program files folder will all dlls
thanks in advance
regards
edara
I need some urgent help from you guys...
advance thanks to u..
I am new to installershiled...my problem is i created new installer with my install shiled 12..
after i added all my dlls and all...and i did "batch build" to create new installer file..everything going good..but new installer is coming with "Programfiles folder".in that programfiles folder have all dlls which i include in code,,,now i copied my generated installer file and try to install,,its saying some dll is missing,,
but i copied whole new release folder and try to install,,its installing,,becoz in that folder all dlls is there in program folder,,,now my questions is why new program file is creating with all dlls...i want to use one .msi file to test other system,,its not good to give whole folder to client....pls give me idea why its creating new program files folder will all dlls
thanks in advance
regards
edara
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2010
09:40 AM
The problem comes from my misunderstanding of how this function works. The targetdir argument must be the same value as the component target otherwise since the target of the component is different, then there is no cost to the specified targetdir.
The solution I came up with is to modify TARGETDIR temporarily. I first backup TARGETDIR and then set TARGETDIR to my target I want to test. After I call FeatureGetCostEx then I reset TARGETDIR to the original value. I chose this method because there are a couple of other tests I want to do before changing TARGETDIR.
The solution I came up with is to modify TARGETDIR temporarily. I first backup TARGETDIR and then set TARGETDIR to my target I want to test. After I call FeatureGetCostEx then I reset TARGETDIR to the original value. I chose this method because there are a couple of other tests I want to do before changing TARGETDIR.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)