PDA

View Full Version : error with script defined MEDIA components



MarkB_IS
10-16-2003, 12:11 PM
Hi, I'm trying to modify a script based install, with some component selections generated by user selections on dynamic dialogs using;

ComponentSetData( MEDIA, "Exporter", COMPONENT_FIELD_VISIBLE, TRUE, "" );
ComponentSetData( MEDIA, "Exporter", COMPONENT_FIELD_SELECTED, TRUE, "" );

etc.

However, when I try to

nResult = CreateRegistrySet( MEDIA );
svErrorMessage = FormatMessage ( nResult );
SprintfBox ( WARNING, "",
"CreateRegistrySet failed!\n\nError code: %ld\nMessage text: %s",
nResult, svErrorMessage );

it reports an error : -2147024809 "The parameter is incorrect"

Is this because of badly formatted Data, or if a component is unset, would this be reported as an error?
If I have components present in the IS IDE, but do not reference them in the setup.rul, will this cause an erro??

Help!
Mark

The Mad Hatter
10-17-2003, 01:37 AM
Hi,
try calling CreateRegistrySet with an empty string:
CreateRegistrySet( "" );

You want to pass the name of the registry set in the current media to this func or "" (to create all reg sets), not MEDIA

Cheers,
Nicklas

MarkB_IS
10-17-2003, 04:10 AM
Thanks. Unfortunately I've tried this and it gives the same error. I think my MEDIA component list is badly formatted, so I'll have to go through it line by line :-(

also If I dump a string to MessageBox( "media =" + MEDIA, SEVERE); it gives DATA, which I think is corrent.

Do the defined components in the IS IDE, have to be set a value before the call to CreateRegistrySet() can be made?



Originally posted by The Mad Hatter
Hi,
try calling CreateRegistrySet with an empty string:
CreateRegistrySet( "" );

You want to pass the name of the registry set in the current media to this func or "" (to create all reg sets), not MEDIA

Cheers,
Nicklas