Rick Pember
2013-04-24 18:48:35 UTC
Since there was some confusion, this is hopefully a clearer version of
my previous post.
We include the portable version of MikTeX in our software distribution
because we have a report generation tool that uses MikTeX as a back end.
Our users don't actually use MikTeX directly. The report generation tool
is command line only. The MikTeX executables that we use are accessed by
our report generation tool and are used in "batchmode". (BTW, we include
copyright notices, etc., for MikTeX in the distribution.)
What we did is this.
1) we downloaded the 2.9 portable version of MikTeX and installed it.
2) we ran the portable version on a tex file that downloads all the
packages to which our users need access for the report generation tool.
3) we then include the MikTeX distribution folder in our distribution.
Our report generation tool (python) executes the MikTeX executables it
needs to. Because we're using the portable version, no MikTeX
initialization or Windows registry access is needed.
This actually works except for one small feature: MikTeX's pdflatex and
latex need the files texmf.fndb and mpm.fndb (in miktex/data/le) to be
writeable by users, specifically, users with non-admin accounts. If we
make these two files writeable, this approach works without any problems.
(If they aren't writeable, errors like "pdflatex: Windows API error 5:
Access is denied" occur.)
The issue with this approach is that our customers are typically
installing our software, including the MikTeX directory, in Program
Files. Some of our customers have a security requirement that no file
in Program Files can be writeable by users. Also, these are often
multiuser environments.
It does seem from the tests I ran that texmf.fndb and mpm.fndb do not
need to be writeable if all the packages needed are already installed.
Specifically, if all the packages are already available, pdflatex and
latex do not change the contents or the time stamps of texmf.fndb and
mpm.fndb.
My question is: is there some way to re-configure the portable version
MikTeX so that write access to texmf.fndb and mpm.fndb is not needed.
my previous post.
We include the portable version of MikTeX in our software distribution
because we have a report generation tool that uses MikTeX as a back end.
Our users don't actually use MikTeX directly. The report generation tool
is command line only. The MikTeX executables that we use are accessed by
our report generation tool and are used in "batchmode". (BTW, we include
copyright notices, etc., for MikTeX in the distribution.)
What we did is this.
1) we downloaded the 2.9 portable version of MikTeX and installed it.
2) we ran the portable version on a tex file that downloads all the
packages to which our users need access for the report generation tool.
3) we then include the MikTeX distribution folder in our distribution.
Our report generation tool (python) executes the MikTeX executables it
needs to. Because we're using the portable version, no MikTeX
initialization or Windows registry access is needed.
This actually works except for one small feature: MikTeX's pdflatex and
latex need the files texmf.fndb and mpm.fndb (in miktex/data/le) to be
writeable by users, specifically, users with non-admin accounts. If we
make these two files writeable, this approach works without any problems.
(If they aren't writeable, errors like "pdflatex: Windows API error 5:
Access is denied" occur.)
The issue with this approach is that our customers are typically
installing our software, including the MikTeX directory, in Program
Files. Some of our customers have a security requirement that no file
in Program Files can be writeable by users. Also, these are often
multiuser environments.
It does seem from the tests I ran that texmf.fndb and mpm.fndb do not
need to be writeable if all the packages needed are already installed.
Specifically, if all the packages are already available, pdflatex and
latex do not change the contents or the time stamps of texmf.fndb and
mpm.fndb.
My question is: is there some way to re-configure the portable version
MikTeX so that write access to texmf.fndb and mpm.fndb is not needed.