RE: SID Collection

2004-10-28 Thread MJG
That did the trick.  Thanks

M- 

-Original Message-
From: Adam R. Frielink [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 10:42 AM
To: MJG; [EMAIL PROTECTED]
Subject: RE: SID Collection

 

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of MJG
> Sent: Thursday, October 28, 2004 10:33 AM
> To: [EMAIL PROTECTED]
> Subject: RE: SID Collection
> 
> Trying to use a simple setup for TieRegistry.  Although it is readying

> the keys, can't get it to write.
> 
> Any ideas?
> 
> Thanks
> 
> M-
> 
> use strict;
> use Win32 ();
> use Win32::TieRegistry 0.20 ( Delimiter=>"#", ArrayValues=>0 );
> 
> my $pound= $Registry->Delimiter("/");
> 
> my $UserEnv = $ENV{"USERNAME"};
> 
> my $RegVal1 = "*Information";
> my $KeyVal1 = "PreferredServer";
> my $RegVal2 = "0008";
> my $KeyVal2 = "PrintOption";
> my $tempSID = "S-1-5-21-842925246-1343024091-839522115-1003";
> My %Key;
> #--
> 
> $Key =
> $Registry->{"LMachine/System/CurrentControlSet/Services/NWCWor
> kstation/Parameters/Option/".$tempSID}
>  ||  die "Can't read
> LMachine/System/CurrentControlSet/Services/NWCWorkstation/Para
> meters/Opt
> ion/ key: $^E\n";
> 
> # Add key and value Regardless
> $Key->{$KeyVal1 => [ $RegVal1, "REG_SZ" ] };
> $Key->{$KeyVal2 => [ $RegVal2, "REG_DWORD" ] };

Try something like this.  It will create the $tempSID if it doesn't
exist, and set the key values.

$Registry->Delimiter("/");  # Set delimiter to "/".

 
$Registry->{"LMachine/System/CurrentControlSet/Services/NWCWorkstation/P
arameters/Option/"} = {
"$tempSID/" => {
"/$KeyVal1" => [ $RegVal1, "REG_SZ" ],
"/$KeyVal2" => [ $RegVal2, "REG_DWORD" ],
},
}; 



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: SID Collection

2004-10-28 Thread Adam R. Frielink
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of MJG
> Sent: Thursday, October 28, 2004 10:33 AM
> To: [EMAIL PROTECTED]
> Subject: RE: SID Collection
> 
> Trying to use a simple setup for TieRegistry.  Although it is readying
> the keys, can't get it to write.  
> 
> Any ideas?
> 
> Thanks
> 
> M-
> 
> use strict;
> use Win32 ();
> use Win32::TieRegistry 0.20 ( Delimiter=>"#", ArrayValues=>0 );
> 
> my $pound= $Registry->Delimiter("/");
> 
> my $UserEnv = $ENV{"USERNAME"};
> 
> my $RegVal1 = "*Information";
> my $KeyVal1 = "PreferredServer";
> my $RegVal2 = "0008";
> my $KeyVal2 = "PrintOption";
> my $tempSID = "S-1-5-21-842925246-1343024091-839522115-1003";
> My %Key;
> #--
> 
> $Key =
> $Registry->{"LMachine/System/CurrentControlSet/Services/NWCWor
> kstation/Parameters/Option/".$tempSID}
>  ||  die "Can't read
> LMachine/System/CurrentControlSet/Services/NWCWorkstation/Para
> meters/Opt
> ion/ key: $^E\n";
> 
> # Add key and value Regardless
> $Key->{$KeyVal1 => [ $RegVal1, "REG_SZ" ] };
> $Key->{$KeyVal2 => [ $RegVal2, "REG_DWORD" ] };  

Try something like this.  It will create the $tempSID if it doesn't
exist, and set the key values.

$Registry->Delimiter("/");  # Set delimiter to "/".

 
$Registry->{"LMachine/System/CurrentControlSet/Services/NWCWorkstation/P
arameters/Option/"} = {
"$tempSID/" => {
"/$KeyVal1" => [ $RegVal1, "REG_SZ" ],
"/$KeyVal2" => [ $RegVal2, "REG_DWORD" ],
},
}; 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: SID Collection

2004-10-28 Thread MJG
Trying to use a simple setup for TieRegistry.  Although it is readying
the keys, can't get it to write.  

Any ideas?

Thanks

M-

use strict;
use Win32 ();
use Win32::TieRegistry 0.20 ( Delimiter=>"#", ArrayValues=>0 );

my $pound= $Registry->Delimiter("/");

my $UserEnv = $ENV{"USERNAME"};

my $RegVal1 = "*Information";
my $KeyVal1 = "PreferredServer";
my $RegVal2 = "0008";
my $KeyVal2 = "PrintOption";
my $tempSID = "S-1-5-21-842925246-1343024091-839522115-1003";
My %Key;
#--

$Key =
$Registry->{"LMachine/System/CurrentControlSet/Services/NWCWorkstation/P
arameters/Option/".$tempSID}
 ||  die "Can't read
LMachine/System/CurrentControlSet/Services/NWCWorkstation/Parameters/Opt
ion/ key: $^E\n";

# Add key and value Regardless
$Key->{$KeyVal1 => [ $RegVal1, "REG_SZ" ] };
$Key->{$KeyVal2 => [ $RegVal2, "REG_DWORD" ] };  

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: SID Collection

2004-10-28 Thread MJG
Thanks.  Was kind of hoping to avoid WMI on this one and find a module
already done.

M- 

-Original Message-
From: Anderson, Mark (Service Delivery)
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 9:17 AM
To: MJG; [EMAIL PROTECTED]
Subject: RE: SID Collection

WMI
http://www.google.co.uk/microsoft?hl=en&q=WMI+SID+site%3Amsdn.microsoft.
com&
meta=

Kind regards,

Mark Anderson
Service Improvement Project
Ground Floor, 34 Fettes Row
Edinburgh, EH3 6UY
Tel: 07808 826 063


> -Original Message-
> From: MJG [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, October 28, 2004 3:11 PM
> To:   [EMAIL PROTECTED]
> Subject:  SID Collection
> 
> *** WARNING : This message originates from the Internet ***
> 
>  
> What extensions are available for collecting SIDs?
> 
> Thanks
> 
> MJG
> 
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


The Royal Bank of Scotland plc, Registered in Scotland No. 90312.
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB

The Royal Bank of Scotland plc is authorised and regulated by the
Financial Services Authority and represents The Royal Bank of Scotland
Marketing Group. The Bank sells life policies, collective investment
schemes and pension products and advises only on the Marketing Group's
range of these products and on a With-Profit Bond produced by Norwich
Union Life (RBS) Limited.

This e-mail message is confidential and for use by the addressee only.
If the message is received by anyone other than the addressee, please
return the message to the sender by replying to it and then delete the
message from your computer. Internet e-mails are not necessarily secure.
The Royal Bank of Scotland plc does not accept responsibility for
changes made to this message after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the
onward transmission, opening or use of this message and any attachments
will not adversely affect its systems or data. No responsibility is
accepted by The Royal Bank of Scotland plc in this regard and the
recipient should carry out such virus and other checks as it considers
appropriate.




___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: SID Collection

2004-10-28 Thread Anderson, Mark (Service Delivery)
WMI
http://www.google.co.uk/microsoft?hl=en&q=WMI+SID+site%3Amsdn.microsoft.com&;
meta=

Kind regards,

Mark Anderson
Service Improvement Project
Ground Floor, 34 Fettes Row
Edinburgh, EH3 6UY
Tel: 07808 826 063


> -Original Message-
> From: MJG [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, October 28, 2004 3:11 PM
> To:   [EMAIL PROTECTED]
> Subject:  SID Collection
> 
> *** WARNING : This message originates from the Internet ***
> 
>  
> What extensions are available for collecting SIDs?
> 
> Thanks
> 
> MJG
> 
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office: 
36 St Andrew Square, Edinburgh EH2 2YB

The Royal Bank of Scotland plc is authorised and regulated by the Financial Services 
Authority and represents The Royal Bank of Scotland Marketing Group. The Bank sells 
life policies, collective investment schemes and pension products and advises only on 
the Marketing Group's range of these products and on a With-Profit Bond produced by 
Norwich Union Life (RBS) Limited.

This e-mail message is confidential and for use by the addressee only. If the message 
is received by anyone other than the addressee, please return the message to the 
sender by replying to it and then delete the message from your computer. Internet 
e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept 
responsibility for changes made to this message after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, it is 
the responsibility of the recipient to ensure that the onward transmission, opening or 
use of this message and any attachments will not adversely affect its systems or data. 
No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the 
recipient should carry out such virus and other checks as it considers appropriate.

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


SID Collection

2004-10-28 Thread MJG
 
What extensions are available for collecting SIDs?

Thanks

MJG

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs