Hi Dave, I had checked both your books and the docs for Win32::AdminMisc.
Guess I was focused on 'Registry' and missed the 'SetEnvVar' function. I'll give it a try. Jared On Mon, 27 Sep 2004 21:23:54 -0700, Dave Roth <[EMAIL PROTECTED]> wrote: > Or alternatively you could just use Win32::AdminMisc. :) > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Jared Still > Sent: Sunday, September 26, 2004 3:43 PM > To: sja > Cc: [EMAIL PROTECTED] > Subject: Re: Modifying Environment variables in registry > > Thanks, that clue helped me find a solution. > > use Win32::API; > > use constant HWND_BROADCAST => -1; > use constant WM_SETTINGCHANGE => 0x1a; > > my $SendMessage = new Win32::API("user32", "SendMessage", > 'NNNP', 'N') > or die "Couldn't create SendMessage: $!\n"; > my $RetVal = > $SendMessage->Call(HWND_BROADCAST,WM_SETTINGCHANGE,0,'Environment'); > > Thanks again, > > Jared > > On Sun, 26 Sep 2004 23:15:14 +0100, Jared Still <[EMAIL PROTECTED]> > wrote: > > I tried using Win32::OLE::NLS::SendSettingChange, but that doesn't > > seem to do the trick either, though it does send a WM_SETTINGCHANGE > > messsage. > > > > > > > > Thanks, > > > > Jared > > > > On Sun, 26 Sep 2004 04:13:08 -0400, sja <[EMAIL PROTECTED]> wrote: > > > You need to send a broadcast to "everybody" that the registry has > > > changed. > > > I've seen the example around before, but don't have one. > > > Hope that helps a little in your endevors. > > > > > > > > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On Behalf > > > > Of Jared Still > > > Sent: Friday, September 24, 2004 6:14 PM > > > To: [EMAIL PROTECTED] > > > Subject: Modifying Environment variables in registry > > > > > > Hello, > > > > > > I have a short script to manipulate the path in Windows via > > > Win32::TieRegistry. > > > > > > After running the script I can verify via regedit that the changes > > > are indeed in the correct place in the registry. > > > > > > When I run cmd.exe though, the old PATH remains. > > > > > > By merely v the PATH variable in "System Properties" > > > and clicking OK, I can run cmd.exe and see the new PATH variable. > > > > > > Does someone know what needs to be done to force the next invocation > > > > of CMD.EXE to recognize the new path settings? > > > > > > Thanks > > > > > > -- > > > Jared Still > > > Certifiable Oracle DBA and Part Time Perl Evangelist > > > _______________________________________________ > > > Perl-Win32-Admin mailing list > > > [EMAIL PROTECTED] > > > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > > > > > > > > > -- > > Jared Still > > Certifiable Oracle DBA and Part Time Perl Evangelist > > > > -- > Jared Still > Certifiable Oracle DBA and Part Time Perl Evangelist > > > _______________________________________________ > Perl-Win32-Admin mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > -- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
