All,
I'm experiencing some weird behavior with Win32::TieRegistry. The code below yields 2
different results when run on Win2K and NT4. On Win2K, when if (($value ==
"changeme")) is evaluated, it's always found to be true as long as $value is non-null.
On NT, when if ( $value == $cn ) {die "Machine already configured properly.\n"} is
evaluated, it's always found to be true as long as $value os non-null. So, on NT, the
script always dies at if ( $value == $cn ) {die "Machine already configured
properly.\n"} without further processing, even though they're NOT equal. What gives?
Has anyone seen this before? Am I missing something here? Your help is much
appreciated.
-Henry
use Win32::TieRegistry;
my $value;
my $cn;
$cn =
$Registry->{"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName\\\\ComputerName"};
#$ENV(COMPUTERNAME);
print "computer name is ".$cn."\n";
$value= $Registry->{"HKEY_LOCAL_MACHINE\\Software\\Citrix\\ICA Client\\\\ClientName"};
if (!($value)) {die "No value found.\n"}
if ( $value == $cn ) {die "Machine already configured properly.\n"}
if (($value == "changeme"))
{
print "previous value ".$value."\n";
$Registry->{"HKEY_LOCAL_MACHINE\\Software\\Citrix\\ICA Client\\\\ClientName"} =
$cn;
$value= $Registry->{"HKEY_LOCAL_MACHINE\\Software\\Citrix\\ICA
Client\\\\ClientName"};
print "new value ".$value."\n";
#die "Citrix client name is not changeme. It is currently set to $value.\n"
}
ޮU��}�vh�����x%��Oz�V�}�٢�X��ǫ�-�^r����칻�&ކ�i��b�����+�J֭y�&�f��f��l���