--- In [email protected], "i_karaguz" <[EMAIL PROTECTED]> wrote: > > I'd like to set an environment variable and later refer to it in a > path statement. > > Just like "%programfiles&\foo", where 'programfiles' is e.g. 'myvar'. > > Invoking Exec.SetEnv("myvar", ?"c:\test") and typing %myvar% in > Start->Run doesn't work. >
Due to the way Windows works (AFAIK), PowerPro can only affect the environment variables that is sees or that programs it starts see. The environment variables are set from those set by the starting program when the program starts. Only if a program makes special efforts will it see any changes made after it or the program that start it started. I guess that includes the Explorer code that runs the start menu run cmd.
