can environment variables be globally set via a batch file?

I

iidabashiboy

I would like to have a few links on my W2K desktop, that I can
double-click to set the TEMP and TMP environment variables (thus
avoiding the tedius control panel/system/advanced/...).

A simple batch file will not work, since it only changes the variables
within that shell, which immediately exits. I want the new variables
to take effect globally and stay in effect until I change them.

Is there an easy way to do this?
 
P

Pegasus \(MVP\)

I would like to have a few links on my W2K desktop, that I can
double-click to set the TEMP and TMP environment variables (thus
avoiding the tedius control panel/system/advanced/...).

A simple batch file will not work, since it only changes the variables
within that shell, which immediately exits. I want the new variables
to take effect globally and stay in effect until I change them.

Is there an easy way to do this?

Yes, there is: Use setx.exe from the Windows 2000 Resource
Kit. Note that any variable you set with setx.exe will be
visible in ***new*** process only, not in pre-existing processes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top