Environment Variables

Windows 7 Pro

All of a sudden my %windir% is not working
If I type it in a command prompt the system does not find it
If I open Administration tools, all the shortcuts like services, system etc are non functionsl and the shortcuts are not coloured but are default windows icons
I can start , for example, services from a run command (services.msc)
Can someone please help me to see what is stopping the %windir% from being correctly registered on the system
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
Open a command prompt and type "SET" (without the quotes) - review the values.  It's possible something got screwy - say with your path - and you've run out of environment space and thus WINDIR is no longer working.  SET tells you what your variables are set to - all of them - so you can see.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Brian PringleSystems Analyst II, SCM, ERPCommented:
You can add it again.  

1. Go to Start
2. Right-click "Computer" and select "Properties"
3. Click "Advanced System Settings"
4. Select the "Advanced" tab
5. Click the "Environment Variables" button
6. In the "System Variables" (bottom) section, scroll down to "windir" and verify its value.

If the windir entry is missing, you can create a "New" one.
doctorbillTechAuthor Commented:
The SET command shows me that there is no Win dir set up
it should obviously be "c:\Windows"
ie windir=c:\windows

How do I put this back bearing in mind I cannot access the advanced system variables using the advanced system settings from a computer - properties window as %windir% is not working
Bill PrewIT / Software Engineering ConsultantCommented:
Can you post up the output of a SET command at a command prompt?  Perhaps pipe the output to a file and then upload:

set >list.txt

doctorbillTechAuthor Commented:
I used setx in a 64 bit cmd window to fix this

setx windir "c:\windows"
All working now
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.