windows variables

Windows 7 Ultimate 64 bit

All of a sudden , in order to run batch command such as taskkill, I need to do the following:

Before I just need to use the line taskkill and not define the full path to the exe file

I assume this is a system variables issue but I cannot see where the problem is
I have tried adding the "c:\windows" and "c:\windows\system32" to my path varuiables under Path but I am unable to append any new text to the Path which is vvery strange in itself
%SystemRoot% and %SystemRoot%\system32 are in the Path text already

Help appreciated please
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.

Joe Winograd, Fellow&MVEDeveloperCommented:
> have tried adding

How did you try to add it? Here's how I do it:

Control Panel
Advanced system settings
Environment variables...

Note that there is a Path variable in both the User section and the System section. The way it works is that the User Path is appended to the System Path, so perhaps you're running into the maximum Path environment variable size of 4095 characters in W7. Regards, Joe
doctorbillTechAuthor Commented:
So what do I do
Can I add it in the User variable section
If so, exactly what do I add
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Check in a cmd prompt whether SystemRoot is set. You can do so by entering set sys, which should show only this variable.
Also, check if Path in the cmd prompt has the %SystemRoot% unexpanded - which is wrong, you should see the complete path there.
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

doctorbillTechAuthor Commented:
If I open a cmd and type set sys I get the following:

If I Type Path I get:
Joe Winograd, Fellow&MVEDeveloperCommented:
Sorry for the delay...walking the dog. But glad to see that Qlemo jumped in. What happens when you enter Path in an elevated command prompt? There are numerous ways to get an elevated prompt. One is Start>All Programs>Accessories then right-click on Command Prompt and select Run as administrator. Regards, Joe
doctorbillTechAuthor Commented:
How does one use "Path" in a cmd prompt
doctorbillTechAuthor Commented:
Joe Winograd, Fellow&MVEDeveloperCommented:
> How does one use "Path" in a cmd prompt

You don't "use" it, per se. Entering "path" in the command prompt shows you its value. When you run a program in a command prompt, such as gm.exe as discussed in this EE article, Windows searches all folders in the Path variable to find the executable (that's why the program mentioned in that article has a check-box to "Update executable search path"). Regards, Joe
Joe Winograd, Fellow&MVEDeveloperCommented:
> Path=(null)

Well, that is really strange! My Path variable in W7 is around 2,000 characters. Here's an EE question with the same issue:

It's from more than six years and is about XP, but perhaps it will help. Regards, Joe
doctorbillTechAuthor Commented:
If I type in "Set" the Path variable set does not show up !!!!!
Joe Winograd, Fellow&MVEDeveloperCommented:
What variables do you see in the command prompt when you enter "set" by itself?
doctorbillTechAuthor Commented:
I have managed to solve thsi with the help of all of you:

It looks as if the last installation of an "advanced acronis system backup" program install a number of variables into the system PATH  which took it over the character limit
I copied all the variables from this path, removed the last few text variables from the path (ie the acronis variables) and copied the variables back into the PATH
Command prompt now shows up the PATH variables in the SET command

I copied the extra Acronis variables into another system path variable set called Acronis

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
doctorbillTechAuthor Commented:
I am very surprised that windows allowed the Path system variables to be exceeded
doctorbillTechAuthor Commented:
Thanks to you all
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Most of the installed programs will not need any PATH entry, but append themselves to it. I regularily remove stuff from PATH for that reason. To make it more simple, I'm defining additional vars like
_PATH_System, _PATH_DB, _PATH_Tools, with corresponding entries, and then put them together as
Besides having a short entry in the system applet, you always can see new paths - they are appended at the end or beginning in plain ;-).
Joe Winograd, Fellow&MVEDeveloperCommented:
You're welcome. And thanks to you for letting us know exactly what the problem was — very helpful! Regards, Joe
doctorbillTechAuthor Commented:
Thanks Joe - just realised that I should have put you as best solution as the probblem was number of characters
Sorry - my mistake
Joe Winograd, Fellow&MVEDeveloperCommented:
Don't worry about it — not a big deal. Regards, Joe
doctorbillTechAuthor Commented:
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
Operating Systems

From novice to tech pro — start learning today.