%SystemRoot% gone AWOL


Damn... after doing a reboot, I suddenly lost all drive mapping capabilities (using the "net" command) on my Windows 2000 workstation at the office.

I was able to rather quickly find out that a path setting seemed fucked up. I did check my path and environment settings in the control panel, and by verificifation in a command prompt, and it seems the %SystemRoot% variable is not expanded as it should be.

This behaviour is controlled and influenced by a registry setting, that seems to have been changed from REG_EXPAND_SZ to REG_SZ. The only info I don't have right now is where that registry key hides. If I find the correct key, I'll able to manipulate it and fix the problem. What caused it, remains a big question though.

Update : The key controlling how the %SystemRoot% variable is expanded hides in HKLM\System\CurrentControlSet\Control\Session Manager\Environment - Keep in mind that in order to be able to create REG_EXPAND_SZ keys you need to use regedt32 and not regedit.

Update 2 : I was able to succesfully manipulate the key and now have a fully functional system again. Remember to export your registry before editing, unless you either really know what you are doing, or like taking risks. When I dumped the complete registryfile to disk, it was just over 32MB, so you can forget putting it on a floppy. Or you can opt to only export the keys you intend to edit.

Update 3 : I've just learned that the "OpenSSH for Windows" installation I did a while back is to blame for the %SystemRoot% registry key change. The author has posted a patch on his website, and claims the bug will be corrected in a new release. I'm off to check if the company server suffers from the same, and I'll check my home system as well.


*sits crosslegged on the floor and listens intently to today's lesson*

I will learn this stuff! I WILL!

I'd rather have you not learn things like it Ash :)

It's not really the most basic thing to start off with, but in case you need any help, gimme a yell!

Monthly Archives


OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.04

About this Entry

This page contains a single entry by ServMe published on March 11, 2003 1:32 PM.

The Happy-ness continues was the previous entry in this blog.

Mel C - Reason is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.