Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

GetComponentData


3 replies to this topic

Russkle

Russkle
  • Members
  • 7 posts

Posted 21 February 2001 - 21:04

I am new to ISWI and am having problems. Let me start out by saying I am not a programmer by defualt.  Building our installshield setups has passed to me for various reasons. I need to test for a component's selection so I can put a condition on a dialog box. Here is the situation:
1.) During my install I want an option "configuration" screen to appear if the component is selected.
2.) I know how to display a dalog based off a condition; however, there seems to be no easy way to set a property when a feature is selected.
3.)I am attempting to use the following InstallScript:#include "Isrt.h"

export prototype IVServer_state();

function IVServer_state()
   STRING szComponentSource, szComponent, svResult;
   NUMBER nInfo, nvResult, nvTemp;    
   
begin            

szComponentSource="DATA";
szComponent="ImageVision\\ImageVision Server";
nInfo=COMPONENT_FIELD_SELECTED;
ComponentGetData(szComponentSource, szComponent, nInfo, nvResult, svResult);      
       
if nvResult = 0 then return 0;
else return 1;
endif;
end;

Here are my concerns:
- I can't seem to make this do anything. Ive tried adding:
MessageBox(svResult, INFORMATION)
before the return statements to no avail. (to see if anything was being accomplished)
- How can I set a property within IS from a script?
- Any one have any exmples of GetComponentData?

Any help woul'd be greatly appreciated!


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 February 2001 - 21:32

Have you created an InstallScript custom action that would call this script function - and inserted it in the user interface sequence?

Look up "Conditional Statement Syntax" in MSI help. It explains how to make conditions based on feature selection.


Russkle

Russkle
  • Members
  • 7 posts

Posted 21 February 2001 - 22:09

Oh, my.... I would have never found that on my own. Thank you! I spent about 7 hours on this. Tested and it works!  I can't thank you enough!