Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I install ILMerge.exe; path is C:\Program Files\Microsoft\ILMerge\ILMerge.exe.

I want to set the command to the Path so I can type ilmerge anywhere to use the application. I googled and tried all the following but none works:

setx -m ilmerge;C:\Program Files\Microsoft\ILMerge\ILMerge.exe
setx -M ilmerge;C:\Program Files\Microsoft\ILMerge\ILMerge.exe
setx -m %PATH%;C:\Program Files\Microsoft\ILMerge\ILMerge.exe
setx /S system /U administrator ilmerge;C:\Program Files\Microsoft\ILMerge\ILMerge.exe

I then tried to add, the GUI's Environment Variables, click New and input the variable "ilmerge" and value "C:\Program Files\Microsoft\ILMerge\ILMerge.exe". But in command prompt and type in ilmerge, still gives me

'ilmerge' is not recognized as an internal or external command, operable program or bath file.

Why something as basic as setting a path that confusing..

share|improve this question
add comment

2 Answers

PATH environment variable must contains path to folders, not files!

for example

setx PATH "C:\Program Files\Microsoft\ILMerge;%PATH%"
share|improve this answer
add comment

For using ILmerge in command line instead of

ilmerge /out:Merged.dll Primary.dll Secondary1.dll Secondary2.dll

you can use

"C:\Program Files\Microsoft\ILMerge\ILMerge.exe" /out:Merged.dll Primary.dll Secondary1.dll Secondary2.dll

By This way you can use ILmerge without having to to change PATH environment variable

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.