(Translated by https://www.hiragana.jp/)
Christian Schenk : MiKTeX How To
The Wayback Machine - https://web.archive.org/web/20051210041006/http://dojo.miktex.org:80/blogs/christian_schenk/archive/category/1003.aspx

MiKTeX How To (RSS)

Starting mgs.exe at the DOS-Prompt

Every once in a while I receive the following request: "Please, make mgs.exe runnable at the DOS-prompt". You should know that mgs.exe is a special version of Ghostscript, meant to be called internally by MiKTeX applications (such as Yap). If you start mgs.exe at the DOS-prompt, the following will happen:

> mgs
MiKTeX GPL Ghostscript 8.15: Can't find initialization file gs_init.ps.

That's because mgs.exe doesn't use the original registry keys and environment variables. For example, mgs.exe queries MIKTEX_GS_LIB instead of GS_LIB. You can start mgs.exe at the DOS-prompt if you set MIKTEX_GS_LIB as follows:

MIKTEX_GS_LIB=C:\texmf\ghostscript\base;C:\texmf\fonts