Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Vista UAC pops up a new Command window and my environment variable islost

Reply
Thread Tools Display Modes

Vista UAC pops up a new Command window and my environment variable islost

 
 
Bo
Guest
Posts: n/a

 
      01-13-2009
Vista UAC pops up a new Command window and my environment variable is
lost. The following is my test log:
---------- test log ---
C:\>Set MYENVIRONMENT=1
C:\>xxx.exe (Run as administrator for UAC)
it will pop up a new Command window to run it and my previous
envrionment variable "MYENVIRONMENT" is lost in the new Command
window.
--------------------------

Is there any way to get my previous envrionment variable
"MYENVIRONMENT" in the new pop up Command window?

Any suggestion/comment are appreciated and welcome! Thank you!
 
Reply With Quote
 
 
 
 
Eric Bursley
Guest
Posts: n/a

 
      01-13-2009
have you tried setting the environment variable within Windows settings?
System Properties, advanced tab, environment variables



--
Eric Bursley
PMP, MCSE, RHCE
"Bo" <> wrote in message
news:d5e0f32b-1feb-4e45-84d3-...
> Vista UAC pops up a new Command window and my environment variable is
> lost. The following is my test log:
> ---------- test log ---
> C:\>Set MYENVIRONMENT=1
> C:\>xxx.exe (Run as administrator for UAC)
> it will pop up a new Command window to run it and my previous
> envrionment variable "MYENVIRONMENT" is lost in the new Command
> window.
> --------------------------
>
> Is there any way to get my previous envrionment variable
> "MYENVIRONMENT" in the new pop up Command window?
>
> Any suggestion/comment are appreciated and welcome! Thank you!


 
Reply With Quote
 
Zaphod Beeblebrox
Guest
Posts: n/a

 
      01-13-2009

"Bo" <> wrote in message
news:d5e0f32b-1feb-4e45-84d3-...
> Vista UAC pops up a new Command window and my environment variable is
> lost. The following is my test log:
> ---------- test log ---
> C:\>Set MYENVIRONMENT=1
> C:\>xxx.exe (Run as administrator for UAC)
> it will pop up a new Command window to run it and my previous
> envrionment variable "MYENVIRONMENT" is lost in the new Command
> window.
> --------------------------
>
> Is there any way to get my previous envrionment variable
> "MYENVIRONMENT" in the new pop up Command window?
>
> Any suggestion/comment are appreciated and welcome! Thank you!


Run CMD.EXE as administrator, then set the environment variable and run
your exe. You could also set the environment variable globally through
Windows (System properties, advanced, environment variables) but that
makes it harder to set on the fly, which it appears might be what you
want to do.

--
Zaphod

No matter where you go, there you are!


 
Reply With Quote
 
+Bob+
Guest
Posts: n/a

 
      01-13-2009
On Tue, 13 Jan 2009 03:02:41 -0800 (PST), Bo <>
wrote:

>Vista UAC pops up a new Command window and my environment variable is
>lost. The following is my test log:
>---------- test log ---
>C:\>Set MYENVIRONMENT=1
>C:\>xxx.exe (Run as administrator for UAC)
>it will pop up a new Command window to run it and my previous
>envrionment variable "MYENVIRONMENT" is lost in the new Command
>window.
>--------------------------
>
>Is there any way to get my previous envrionment variable
>"MYENVIRONMENT" in the new pop up Command window?
>
>Any suggestion/comment are appreciated and welcome! Thank you!


You could put it in a system startup file so that it is defined all
the time.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shutdown window pops up when selecting search Matt Windows Vista General Discussion 3 10-23-2008 06:19 AM
Path Environment Variable - Vista 64-bit FlyingHorse Windows Vista General Discussion 0 11-19-2007 10:37 PM
unable to log in to the window vista environment unusual window activation Windows Vista General Discussion 1 10-03-2007 06:06 PM
Windows Vista forgets my PATH environment variable on reboot Jon Davis Windows Vista General Discussion 9 09-13-2007 04:00 PM
A window pops up whenever I push Shift, Alt or Ctrl Tom90deg Windows Vista Hardware 1 05-04-2007 04:00 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59