#!/usr/bin/perl #------------------------------------------------ # Fun with Windows 2000 Registry #------------------------------------------------ use strict; my $Registry; use Win32::TieRegistry ( TiedRef => \$Registry, Delimiter => "/", ArrayValues => 1, SplitMultis => 1, AllowLoad => 1, AllowSave => 1, qw( REG_SZ REG_EXPAND_SZ REG_DWORD REG_BINARY REG_MULTI_SZ KEY_READ KEY_WRITE EY_ALL_ACCESS ), ); my $Environment = $Registry->{"LMachine/System/CurrentControlSet/Control/Session Manager/Environment"} or die "Can't find the Cuurent Session Environment: $^E\n"; my $okay = $Environment->SetValue( "CRAP1", '%CDS_INST_DIR%\tools\bin', 2);