[Tex/LaTex] Problem getting preview to work in Auctex on Windows 7

auctexemacsmiktexpreviewwindows

I'm trying to get preview of math formulas to work in AUCTeX. When running M-x preview-buffer on simple test document I get the following error:

Preview-DviPS finished at Wed Dec 28 00:53:14
DviPS sentinel: Searching for program: no such file or directory, GSWIN32C.EXE

However gswin32c.exe does exist in my path. It works from Cygwin and I have also added the path to Emacs exec-path variable. Maybe it is a problem with case? But I couldn't find a way to redefine the program name in emacs.

I'm using Emacs 23.3, AUCTeX 11.86 and MikTeX 2.9 on Windows 7.
I followed these Instructions when installing AUCTeX.

Best Answer

You can specify the executable that preview uses by Preview->Customize->Browse Options->Preview Gs->Preview Gs Command

also

Ensure you use ghostscript 8.71, as later versions have a file interface change that prevents preview from doing file io. See thread below:

http://comments.gmane.org/gmane.emacs.auctex.bugs/1785