# I want to compile the opened file with an external tool in Command Prompt. How do I keep the Command Prompt window from closing after the compilation is finished?

1. Go to **Tools | External Tools | Customize Tools…**. Click **New**.
1. In the [External Tool Properties](https://www.emeditor.org/en/dlg_tools_properties_index.html) dialog, Add `C:\Windows\System32\cmd.exe` to the **Command** field.
1. Add `/k ""program path" "$(Path)""` to the **Arguments** field and replace `program path` with the program’s executable file path.

    - The `/k` argument keeps the Command Prompt window open as written [here](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/cmd).
1. Optionally, find a suitable icon for **Icon Path**.
1. Click **OK**. The command is available in the **Tools** toolbar.

The below screenshot shows an example for Node.

![External Tool Properties](/media/2022/10/Screenshot-2022-10-11-171123.webp)
