Re: is it possible (re-)configure the portable version of miktex so that write access to the distribution is not needed?
Richard Pember <[email protected]>
| Newsgroups | gmane.comp.tex.miktex |
|---|---|
| Message-ID | <CAFQKN0FB7tprR-O+94Ytiq6ZOmQPVkDgj7wkDREFZfXzK1TcnA@mail.gmail.com> |
Christian Schenk responded with several suggestions, including: 1) use the basic installer instead of the portable one and specify a separate folder for data. I ran basic-miktex-2.9.4813-x64 --common-install=c:\miktex --common-data=c:\miktex_data --no-registry 2) to move MikTeX, modify miktexstartup.ini in miktex\config to account for the new location (You suggested this as well.): For example ------------------------------------------------------------ ;;; MiKTeX startup information [Paths] ;; common install root CommonInstall=C:\miktex2 ;; common data root CommonData=c:\miktex2_data ------------------------------------------------------------- This approach does what I need. These two steps were the key. On Thu, Apr 25, 2013 at 1:23 AM, Ulrike Fischer <[email protected]> wrote: > 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 > _______________________________________________ > MiKTeX-Users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/miktex-users > ------------------------------------------------------------------------------ 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