Listing 1

integer li_rc
string ls_pathname, ls_filename, ls_clsid, ls_default, ls_defaulticon, ls_url, ls_tool, ls_key

ls_clsid = this.object.clsid[1]
ls_key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\9.0\CLSID\' + ls_clsid
ls_default = this.object.default[1]
ls_defaulticon = this.object.defaulticon[1]
ls_url = this.object.url[1]
ls_tool = this.object.tool[1]
//Empty string sets the '(Default)' value
RegistrySet ( ls_key, '', RegString!, ls_default )
RegistrySet ( ls_key, 'DefaultIcon', RegString!, ls_defaulticon )
RegistrySet ( ls_key, 'URL', RegString!, ls_url )
//We create a key, not a value, to indicate the tabpage
RegistrySet ( ls_key, ls_tool, RegString!, '' )
MessageBox ( "Done", "Registry Entry Created" )

Listing 2

//Instance variable
string is_key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\9.0\WizardLibraries'
.
.
.
//Local variables
integer li_rc, li_count, li_index
string ls_pathname, ls_filename, ls_name, ls_library
.
.
.
//Delete the original entries (if any)
li_rc = RegistryDelete ( is_key, '' )
li_count = this.RowCount()
FOR li_index = 1 TO li_count
ls_name = String ( this.object.name[li_index] )
ls_library = this.object.library[li_index]
RegistrySet ( is_key, ls_name, RegString!, ls_library )
NEXT
MessageBox ( "Done", "Registry Entries Created" )