# “Shell escape not enabled” error, even though write18 is enabled

I have enabled write18 by telling TeXlipse to call pdfLaTeX using the --enable-write18 option. However, this does not seem to work properly. The code

\documentclass{scrartcl}

\usepackage{tikz}
\usepackage{gnuplottex}

\begin{document}

\verb|\ifeof18|:
\ifeof18
true
\else
false
\fi

\verb|\pdfshellescape|:
\ifnum\pdfshellescape=1
true
\else
false
\fi

\begin{gnuplot}
plot sin(x), cos(x)
\end{gnuplot}

\begin{tikzpicture}
\draw[domain = -pi : pi] plot function{sin(x)};
\end{tikzpicture}

\end{document}

produces the output

so write18 seems to indeed be enabled, however instead of producing plots it gives me the errors

pdflatex.exe> Package gnuplottex Warning: Shell escape not enabled.
pdflatex.exe> (gnuplottex)                You'll need to convert the graphs yourself..

pdflatex.exe> Package gnuplottex Warning: Please convert document-gnuplottex-fig1.gnuplot manually.

What did I do wrong and how can I fix this?

PS: gnuplot is installed and calling it from the command line works fine.

Edit:

I found the following occurences of runsystem in the log file:

runsystem(touch w18-test-20145301175.tex)...executed.

runsystem(rm -f w18-test-20145301175.tex)...executed.

runsystem(gnuplot document.pgf-plot.gnuplot)...executed.
-
What TeX distribution are you running? Try --shell-escape instead of --enable-write-18 that's specific of MiKTeX, while the other one should work on every system. –  egreg May 30 at 16:18
@egreg: I am using MiKTeX and thus switching to --shell-escape didn't do anything. However, I noticed that \ifeof18 is false even without --shell-escape (or --enable-write18) whereas pdfshellescape changes as expected. –  schtreber May 30 at 16:24
You need to pass the option miktex: \usepackage[miktex]{gnuplottex} –  Ulrike Fischer May 30 at 16:26
\ifeof18 is false because the restricted shell escape is active. You should report what's near runsystem in the log file. But Ulrike's suggestion seems good. –  egreg May 30 at 16:28
@Ulrike: That didn't change anything. @egreg: I added the occurences of runsystem in the log file to my question. –  schtreber May 30 at 16:42