Craig Spooner wrote:
> 
> Scott and Phil,
> 
> Sorry for the delay in thanking you for your help with this.  It
> turned out to be a simple thing (don't they all ;-)  It seems you do
> need the final backslash, and you don't need the "quote & ... &
> quote".  My problem was in limiting the text string to "word 1 to
> -2", which wasn't required for what I was trying to do.  Anyway, you
> definitely CAN pass the registry key info in the form of a variable!
> 
> Thanks again.
> 
> Craig
> 
> >From: Scott Raney <[EMAIL PROTECTED]>
> >Seems to me you're working too hard here: the stuff with the "quote"
> >constants is not required...
> >  Regards,
> >    Scott
> 
> >From: Phil Davis <[EMAIL PROTECTED]>
> >
> >Did you try it without the final backslash (after ...command\")? That
> >can make a difference.
> >Regards,
> >Phil
> >
> >
> >Craig Spooner wrote:
> > >
> > > Greetings all,
> > >
> > > Does anyone know why I can't pass a registry key in the form of a
> > > variable to the queryRegistry function.
> > >
> > > It seems like this should work, but it doesn't:
> > >
> > > put quote & \
> > > "hkey_local_machine\software\classes\http\shell\open\command\" & \
> > > quote into tKey
> > >
> > put queryRegistry(tKey)
> 

Since you're putting the string into a variable, it doesn't need (and
won't work with) the beginning and ending quotes. I tried this and it
worked:

    put "hkey_local_machine\software\classes\http\shell\open\command\"
into tKey
    answer queryRegistry(tKey)

Apparently MC sees the "tKey" container's startpoint and endpoint as the
start and end of the string it contains. If, however, you were using the
container (the "tKey" variable) as part of a command string to be
executed by a "do" command, the quotes would be required:

    put "hkey_local_machine\software\classes\http\shell\open\command\"
into tKey
    put "answer queryRegistry(" & quote & tKey & quote & ")" into
tCommand
    do tCommand

The above example won't work without the quotes.

FWIW. Have fun!
Phil

> Archives: http://www.mail-archive.com/metacard%40lists.best.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
begin:vcard 
n:Davis;Phil
tel;home:(503) 557-5656
tel;work:(503) 986-1215
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Phil Davis
end:vcard

Reply via email to