Re: is it possible (re-)configure the portable version of miktex so that write access to the distribution is not needed?

Ulrike Fischer <[email protected]>
Newsgroups gmane.comp.tex.miktex
Message-ID <[email protected]>
Am Wed, 24 Apr 2013 11:48:35 -0700 schrieb Rick Pember:

> 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.)

I couldn't reproduce this problem. I downloaded miktex portable on a
stick, made the two fndb non writable and then compiled without
problem a small test file with pdflatex. I check that the files are
really non-writable by triggering the on-the-fly installation: then
I get an error that the database is non-writable. 

But things could be different if the installation is not on a stick
but in program files.


I also tried to change the location of the miktex-maintained roots:

I created a folder localtexmf beside miktex-portable.

I started miktex-portable.cmd and in the menu miktex options and
added localtexmf as new root.

Then I opened miktexstartup.ini in miktex\config and changed the
path section to

[Paths]

;; user TEXMF root directories
UserRoots=..\..\..\localtexmf
UserInstall=..\..\..\localtexmf
UserData=..\..\..\localtexmf

pdflatex then installed new packages installed on the fly in
localtexmf. Perhaps such a configuration works for you too (you can
also try to change the location of other miktex maintained roots
like UserConfig or CommonConfig).

This approach is a bit unstable: If I change miktexstartup before
starting miktex-portable.cmd I don't get the icon in the task bar.
But as your user don't need a menu this perhaps doesn't matter.




-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.