[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ProgSoc] script to change win env var



> -----Original Message-----
> From: John Elliot [mailto:jj5@xxxxxxx]
> Sent: Friday, 30 September 2005 9:14 AM
> To: Nigel Sheridan-Smith
> Subject: Re: [ProgSoc] script to change win env var
> 
> Nigel Sheridan-Smith wrote:
> > This is definitely the only simple way to go about it. There is no API
> > function in Win32 to update environment variables permanently, and I
> suspect
> > if you don't do it through Windows Explorer, then any processes you
> start
> > won't notice the effect until you reboot.
> 
> You can send all processes a message telling them to update their
> environment.
> 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-
> us/sysinfo/base/wm_settingchange.asp
> 
> Pass in HWND_BROADCAST = 0xFFFF as the hwnd, and specify "Environment"
> as the LPARAM.
> 

I was looking at that before as well, but it wasn't obvious if it would do
it for you! How did you know it was "Environment" (a previous, harrowing
experience, I guess)?

Nigel

--
Nigel Sheridan-Smith
PhD research student

Faculty of Engineering
University of Technology, Sydney
Phone: 02 9514 7946
Fax: 02 9514 2435



-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@xxxxxxxxxxxxxxxxxxx
If you are having trouble, ask owner-progsoc@xxxxxxxxxxxxxxxxxx for help.