View Full Version : Programmatically selecting/deselecting a component

07-30-2003, 11:56 AM
Greetings all,

I have a component that I want to either install or not install based on whether or not a certain subdirectory of TARGETDIR is on the destination machine.

Here's the code:

if (ExistsDir (TARGETDIR + "\Charts") = EXISTS) then
ComponentSelectItem ( "Self-Extracting EXE" , "Extra Files" , FALSE );
ComponentSelectItem ( "Self-Extracting EXE" , "Extra Files" , TRUE );

Yet, it's installing the "Extra Files" component no matter what.

Self-extracting EXE is the name of my media, Extra Files is a component that contains about 8 file groups.

What am I doing wrong????

Thanks a ton

07-30-2003, 02:32 PM
Update - I replaced "Self-Extracting EXE" with the keyword MEDIA and it worked. Don't know why, but hey, I gotta deadline to meet!