1

I've recently shifted back to Windows 7 and am trying to use Renderman's shader compiler. It requires that RMANTREE be set to

C:\Program Files\Pixar]RendermanStudio-3.0.3-maya2012\rmantree

So I had set up my mac terminal to have that as an environment variable and never needed to set it again.

On Windows, I can get it to set RMANTREE but I have to do it in every command prompt. I tried adding it to the system environment variables but if I were then to

echo %RMANTREE%, I only get %RMANTREE% back instead of the correct path.

Probably a stupid question, but any ideas? It would just save a little bit of time, but even a little bit is awesome.

Jin
  • 4,323
  • 27
  • 31

2 Answers2

3

You need to set a persistent User or System-wide environment variable.

To set the variable permanently for your user, use setx from a command prompt:

setx RMANTREE "C:\Program Files\Pixar]RendermanStudio-3.0.3-maya2012\rmantree"

To set the variable permanently for the entire system, add the /m switch:

setx /m RMANTREE "C:\Program Files\Pixar]RendermanStudio-3.0.3-maya2012\rmantree"

You can check if a specific environment variable is sourced by using the set (no "x"):

set RMANTREE

Or check all variables starting with a given letter:

set R

And no, it's not a stupid question.

edit: The change to the variable will show in all future CMD windows; NOT in the current CMD window.

treehead
  • 625
  • 6
  • 8
0

Setting it in System Environment Variables should give you the behaviour you are after.

Make sure you start a new command prompt once set up.

Paul
  • 59,223
  • 18
  • 147
  • 168
  • it's weird...I did those and restarted the system just to make sure. For some reason Windows dumped the entry I made. So I created it again and now it's working fine. Moody computer I guess. Thank you though! – Dhruv Aditya Govil Oct 28 '11 at 04:34
  • No problem, and welcome to the site. Don't forget to either add your own answer and accept it, or accept my answer so this question gets off the unanswered list. – Paul Oct 28 '11 at 04:38