in reply to actual sys environment variables
thanks to tye, as most of this code is pasted from his example here.#!/usr/bin/perl -w use strict; my $Reg; use Win32::TieRegistry ( TiedRef => \$Reg, ArrayValues => 1, Delimiter => '/', ':REG_' ); # this is the system environment variable area my $SysEnv= $Reg->{"LMachine/System/CurrentControlSet/Control/" . "Session Manager/Environment/"} or die "Can't open Registry key, Session Manager/Environment: $^E +\n"; # create a new value and set it's data $SysEnv->{"/bob"} = "test system"; # # this is the user environment variable area # my $UserEnv= $Reg->{"CUser/Environment/"} # or die "Can't open Registry key, CUser/Environment: $^E\n"; # # create a new value and set it's data # $UserEnv->{"/bob"} = "test user";
~Particle
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: actual sys environment variables
by RayRay459 (Pilgrim) on Jul 05, 2001 at 23:54 UTC |