Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: REG_BINARY Registry Data

by AidanLee (Chaplain)
on Jan 03, 2002 at 04:01 UTC ( [id://135859]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: REG_BINARY Registry Data
in thread REG_BINARY Registry Data

Well, I'm not familiar with Win32::TieRegistry, but looking at your snippet I can guess that what you probably want is:
use Win32::TieRegistry; $Registry->Delimiter("/"); $Registry->{"LMachine/SOFTWARE/Microsoft/Windows/CurrentVersion/Networ +k/"}={ "LanMan/" => { "VIRUSSCAN\$/" => { "/Flags" => [ "0x00000102", "REG_DWORD", ] "/Parm1enc" => [ "", "REG_BINARY", ] "/Parm2enc" => [ pack( "c5", map { hex $_ } qw( 1f b0 67 8 +c 79 ) ), "REG_BINARY", ] "/Type" => [ "0x00000000", "REG_DWORD", ] "/Path" => "C:\\", "/Remark" => "Do Not Delete This Share" }, }, };

I'm assuming that those are hex values you've got there. If they're not you'll have to tell me otherwise. I'll also note that I've never seen a hash where each key takes two values, but I'll assume that that is the nature of Win32::TieRegistry, and that you know what you are doing.

Update: I see code tags have been applied in the above post, and things make much more sense. I've modified my code to reflect the change.

Replies are listed 'Best First'.
(tye)Re: REG_BINARY Registry Data
by tye (Sage) on Jan 03, 2002 at 04:30 UTC

    The values are actually anonymous array references. These were turned into hyperlinks because <code> tags weren't (originally) used.

    You can also avoid pack if the value is really hard-coded:

    use Win32::TieRegistry; $Registry->Delimiter("/"); $Registry->{"LMachine/SOFTWARE/Microsoft/Windows/" . "CurrentVersion/Network/"}= { "LanMan/" => { "VIRUSSCAN\$/" => { "/Flags" => [ "0x00000102", "REG_DWORD" ], "/Parm1enc" => [ "", "REG_BINARY" ], "/Parm2enc" => [ "\x1f\xb0\x67\x8c\x79", "REG_BINARY" ], "/Type" => [ "0x00000000", "REG_DWORD" ], "/Path" => "C:\\", "/Remark" => "Do Not Delete This Share" }, }, };

            - tye (but my friends call me "Tye")

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://135859]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-25 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found