1

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..

0

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

for example

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

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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