Welcome to MSDN Blogs Sign in | Join | Help

ToddHa's WebLog

Musings, notions, thoughts about technology and software.

News

  • Disclaimer
    The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Subtle mistakes are often the worst

EnvironmentVariables

A few weeks ago, I noticed that some of my installs on my laptop started failing. I thought it was odd, but most of the things I install are pre-beta, so I figured that they hadn't yet started to support Windows Server 2008. Some things, out of beta, like Windows Live Writer, don't support 2k8 at all, so my laptop is set up to dual boot between 2k8 and Vista. Strangely enough, the installs were often failing during the very beginning of the setup process. One such install that failed was the Silverlight 2 Beta 1 SDK.

[Un?]Fortunately, it was the first of many installers to actually give me good information and tell me that it couldn't write the installation log to the temp directory. I had plenty of hard drive space, so I took a look at what my environment variables were for TEMP and TMP so I could look at the permissions of that folder.

What I saw (and isn't pictured), is that my user variables were set to:

TEMP=%USERPROFILE%\AppData\Local\Temp;C:\Progra~1\Python25
TMP=%USERPROFILE%\AppData\Local\Temp

Aha! The problem is so obvious now. A few weeks ago I installed Python. Python doesn't add itself to your path, so if you want to have access to it from anywhere, you need to add the Python install directory to your PATH variable. Apparently, I had tried doing this.

Unfortunately, the UI you are presented with could use some ... tweaking. Notice that there are two sets of New, Edit, and Delete buttons, all with different hot keys. If you expect Alt+E to be Edit, you're correct. However, you're incorrect if you think it will edit the item that is selected and focused. When I hit Alt+E, it always edits the selected User variable, regardless of what is focused.

It's a pretty poor UI, but fortunately it's one that most mainstream users won't need to see very often, if ever. And all others (like me) should take more time in editing their environment variables to make sure they are correct!

Posted: Wednesday, April 16, 2008 9:08 AM by toddha
Filed under: , ,
Anonymous comments are disabled
Page view tracker