[EMAIL PROTECTED] wrote:
> using the following code to try to set values is failing. the
> commented out set line works, but changes the type. all
> variations i I have tried of the uncommented line have failed.
>
> ###############################code through next like
> this###############################
> #! /usr/bin/perl -w
>
> use strict;
> use Win32::TieRegistry;
> use warnings;
>
> my ($key, $regpth, $okay, $delim);
>
> # declaration of TieReg @ beginning: use Win32::TieRegistry;
> # set delimiter we are using
> print "Setting Delimiter\n";
> $delim = $Registry -> Delimiter('/');
> # set our basepath
> print "Setting registry path short to
> HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/\n";
>
> $regpth="HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services";
>
> #$key="$regpth/SeaNotify/";
>
> print "attempting to set path\n";
> #$okay = $Registry -> {"$key/SeaNotifyFiles"} =
> ["C:\\Documents and Settings\\jperlmutter\.GRANITE_ENG\\My
> Documents\\perl\\test_scripts\\SeaNotify\\temp\.pl",
> REG_MULTI_SZ]; $okay = $Registry ->
> SetValue("SeaNotifyFiles", "C:\\Documents and
> Settings\\jperlmutter\.GRANITE_ENG\\My
> Documents\\perl\\test_scripts\\SeaNotify\\temp\.pl", "REG_MULTI_SZ");
>
> print "result:
> delim\t$delim
> regpth\t$regpth
> key\t$key
> Registry\tRegistry
> okay\t$okay\n\n";
> #########################################end
> code############################
>
>
> This is me playing to find functionality i need for a test
> script that is
> being modified to allow the tester to reset the values temporarily...
> I can save the values fine, i just cant set them at all
None of the attempts displayed in your code match the examples given in
the documentation (I could see 4 ways of setting values). Did they not
work when you tried them?
Just in case you missed them, they are (essentially):
... = [ "val1\0val2\0\0", "REG_MULTI_SZ" ];
... = [ [ "val1", "val2" ], "REG_MULTI_SZ" ];
... ->SetValue("val1\0val2\0\0", "REG_MULTI_SZ");
... ->SetValue([ "val1", "val2" ], "REG_MULTI_SZ");
HTH
--
Brian Raven
-----------------------------------------------------------------------
The information contained in this e-mail is confidential and solely
for the intended addressee(s). Unauthorised reproduction, disclosure,
modification, and/or distribution of this email may be unlawful. If you
have received this email in error, please notify the sender immediately
and delete it from your system. The views expressed in this message
do not necessarily reflect those of LIFFE Holdings Plc or any of its subsidiary
companies.
-----------------------------------------------------------------------
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs