Setting environment variables?

C

Chaz

I want to set a permanent environment variable for the currently logged on
user - as far as I can tell this would be done from the Environment Variables
dialog under the Advanced settings of the System control panel.

BUT - I'm a normal user, and can only access the Advanced Settings by
providing Admin credentials. At which point the User variables that can be
set in the dialog are for the admin account that I just authenticated with!

Is there any way I can get round this and set up persistent environment
variables as a non-admin user?
 

My Computer

J

Jimmy Brush

> Is there any way I can get round this and set up persistent environment
> variables as a non-admin user?


Nice bug find! :)

Yes, you can get around this with the setx command.

- Open a command prompt
- Type: setx variable value

Note, that value must be enclosed in quotes if it contains any spaces.

For example,

setx MYDIR "c:\documents and settings\"

For more info on setx, check out:
http://www.ss64.com/nt/setx.html
http://technet2.microsoft.com/WindowsServer/en/Library/9e0748f8-5c67-4dc4-b8dc-11a8481d86331033.mspx
 

My Computer

C

Chaz

"Jimmy Brush" wrote:
> Yes, you can get around this with the setx command.


Doh! Thanks for the pointer.

I hope this kind of bug gets caught over time. I'm sure there are a number
of similar instances where you can't just lock down the entire functionality
of an existing dialog box without breaking something!
 

My Computer

Old Holborn

New Member
How to set environment variables for a non admin user

This is just a Linux fan posting the solution for
an old thread of this forum. Accept my apologies
if it has been already answered in another thread.
Google still links there, and no answer can be
posted as it is too old. :(

The how-to can be found here, as stated in the
'Microsoft Help and Support' site.

Cheers.
 

My Computer

System One

  • Manufacturer/Model
    Custom
    CPU
    Intel Pentium Dual CPU E2180 @ 2x2.00GHz
    Motherboard
    Asus P5B-MX WIFI-AP
    Memory
    4GB (2x SuperTalent T8UB2GC5)
    Graphics Card(s)
    nVidia 8600GT (512MB DDR3)
    Sound Card
    on-board
    Monitor(s) Displays
    Mitsubishi Diamond Plus 93SB
    Screen Resolution
    1280x1024
    Hard Drives
    WDC WD4000AAKS-00TMA0 (400GB) - internal
    WDC WD1001FALS-00J7B0 (1TB) - internal
    WDC WD400JB (40GB) - external (usb NAS)
    PSU
    450W
    Case
    CoolerMaster Elite
    Mouse
    Compaq
    Keyboard
    Compaq
    Internet Speed
    12798/1020 kbit/s
    Other Info
    Modem/Router: Fritz!BOX Fon WLAN 7140 Annex A
Top