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
- :
- Re: Crash program when call FeaturesSetData() installshield 2013
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
‎Aug 09, 2013
03:44 AM
Crash program when call FeaturesSetData() installshield 2013
Dear everybody in community,
I have a big issue with installshield premier 2013, details below:
----------
1. Create a new project
2. When i use below code then crash program:
//===========================================================================
//
// File Name: Setup.rul
//
// Description: Blank setup main script file
//
// Comments: Blank setup is an empty setup project. If you want to
// create a new project via. step-by step instructions use the
// Project Assistant.
//
//===========================================================================
// Included header files ----------------------------------------------------
#include "ifx.h"
prototype ShowProgramsOptions(STRING , STRING , STRING , NUMBER );
function OnBegin()
STRING svBuffer;
begin
ShowProgramsOptions("Title", "Message", svBuffer, 1);
MessageBox("test", WARNING);
end;
function ShowProgramsOptions(szTitle, szMsg, svResultPrograms, nStyle)
LIST listPrograms;
STRING svSelected, szMedia;
STRING svFeatureName;
NUMBER nDataSize, nResult;
STRING szData, szBuffer;
STRING szKey;
begin
szMedia = "MyMedia12";
nDataSize = 0;
listPrograms = ListCreate(STRINGLIST);
MEDIA = szMedia;
nDataSize = 100;
szBuffer = "C:\\bbb";
szKey = "Option\\Option1";
nResult= FeatureAddItem(szMedia, szKey, nDataSize, TRUE);
szKey = "Option\\Option1";
nResult= FeatureSetData (szMedia,szKey, FEATURE_FIELD_VISIBLE, TRUE, "");// CRASH PROGRAM HERE
// Set selected option
FeatureListItems(MEDIA, "", listPrograms);
nResult = ListGetFirstString(listPrograms, svSelected);
// For every selected item i install relative feature
while (nResult != END_OF_LIST)
if (FeatureIsItemSelected(MEDIA, "FeatureOpt1")) then
FeatureGetData(MEDIA, svSelected, FEATURE_FIELD_MISC, nResult, svFeatureName);
endif;
nResult = ListGetNextString(listPrograms, svSelected);
endwhile;
ListDestroy(listPrograms);
MEDIA = "DATA"; // Ripristino il media originale.
return 0;
end;
----------
Please help meeeee fix this issue!
I have a big issue with installshield premier 2013, details below:
----------
1. Create a new project
2. When i use below code then crash program:
//===========================================================================
//
// File Name: Setup.rul
//
// Description: Blank setup main script file
//
// Comments: Blank setup is an empty setup project. If you want to
// create a new project via. step-by step instructions use the
// Project Assistant.
//
//===========================================================================
// Included header files ----------------------------------------------------
#include "ifx.h"
prototype ShowProgramsOptions(STRING , STRING , STRING , NUMBER );
function OnBegin()
STRING svBuffer;
begin
ShowProgramsOptions("Title", "Message", svBuffer, 1);
MessageBox("test", WARNING);
end;
function ShowProgramsOptions(szTitle, szMsg, svResultPrograms, nStyle)
LIST listPrograms;
STRING svSelected, szMedia;
STRING svFeatureName;
NUMBER nDataSize, nResult;
STRING szData, szBuffer;
STRING szKey;
begin
szMedia = "MyMedia12";
nDataSize = 0;
listPrograms = ListCreate(STRINGLIST);
MEDIA = szMedia;
nDataSize = 100;
szBuffer = "C:\\bbb";
szKey = "Option\\Option1";
nResult= FeatureAddItem(szMedia, szKey, nDataSize, TRUE);
szKey = "Option\\Option1";
nResult= FeatureSetData (szMedia,szKey, FEATURE_FIELD_VISIBLE, TRUE, "");// CRASH PROGRAM HERE
// Set selected option
FeatureListItems(MEDIA, "", listPrograms);
nResult = ListGetFirstString(listPrograms, svSelected);
// For every selected item i install relative feature
while (nResult != END_OF_LIST)
if (FeatureIsItemSelected(MEDIA, "FeatureOpt1")) then
FeatureGetData(MEDIA, svSelected, FEATURE_FIELD_MISC, nResult, svFeatureName);
endif;
nResult = ListGetNextString(listPrograms, svSelected);
endwhile;
ListDestroy(listPrograms);
MEDIA = "DATA"; // Ripristino il media originale.
return 0;
end;
----------
Please help meeeee fix this issue!
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 09, 2013
06:11 AM
Please review above code then tell me what is wrong?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 09, 2013
08:52 AM
In general, short of badly defined or invoked external DLL calls, InstallScript code shouldn't crash. First things first, have you applied the hotfix from Q213507? If not, please apply it and rebuild. If you already have the hotfix, we can look further.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 10, 2013
05:53 AM
Thank you for your support quick!
I apply your suggestion.
I apply your suggestion.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 12, 2013
03:07 AM
Thanks you so much, software run well!