From http://naturaldocs.org/troubleshooting.html
I get the message “Can’t open perl script NaturalDocs”
What’s happening is that Perl can’t find the Natural Docs script file. This happens when the working directory or “start in” folder isn’t the directory Natural Docs was installed to. If changing that doesn’t work, or if you don’t have the option to set that, edit NaturalDocs.bat and find the line that says “perl NaturalDocs %NaturalDocsParams%”. Change NaturalDocs to include the full path Natural Docs was installed to, such as “C:\Program Files\Natural Docs\NaturalDocs”. You need to include the quotes if there are spaces in the path.
I have NaturalDocs working with Windows. It has a strange behavior (what I consider a bug) in the batch file. You need to be in the same directory as the batch file to get NaturalDocs to work.
I replaced the line
perl NaturalDocs %NaturalDocsParams%
with
perl %~dp0\NaturalDocs %NaturalDocsParams%
and it will work with NaturalDocs installed in any directory.
Using version 1.4
This solution doesn't work if there are command line parameters. The
shiftin the loop changes the%0so that it is incorrect at the point Perl is started.There can be spaces in the
%~dp0while the~operator strips any quotes that%0might have had. Quotes are required to make it work for paths with spaces.The
%~dp0always ends with a backslash. There is no need in repeating it.Actually this whole bat file can be replaced with one line:
Tested in Windows 7, should work fine in others starting from Win2000. I'm not sure if Win98 has got the
%*or%~...operators.