<b><i>Siep Kroonenberg &lt;siepo@cybercomm.nl&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><postmaster@daimi.au.dk>Here is the script in-line:<br><br>' Prepare a Windows system for running TeX Live from dvd.<br>' This involves adding or changing some user environment variables<br>' and placing some files under %USERPROFILE%.<br></postmaster@daimi.au.dk></blockquote>(snip)<br><blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><postmaster@daimi.au.dk><br>' generate files<br><br>Set oFile = oFS.CreateTextFile( sTLmain &amp; "\temp\tl_generate.bat" )<br>oFile.WriteLine( "@echo off" )<br>oFile.WriteLine( "path %path%;" &amp; sTLrootSl &amp; "bin\win32" )<br>oFile.WriteLine( "set TEXMFCNF=" &amp; sTLmain &amp; "\texmf-var\web2c" )<br>oFile.WriteLine( "set TEXMFTEMP=" &amp; sTLmain &amp; "\temp" )<br>oFile.WriteLine( "set TEXMFVAR="
 &amp; sTLmain &amp; "\texmf-var" )<br>oFile.WriteLine( "set TEXMFLOCAL=" &amp; sTLocal )<br>oFile.WriteLine( "set TLroot=" &amp; sTLmain )<br>oFile.WriteLine( "mktexlsr" )<br>oFile.WriteLine( "updmap" )<br>oFile.WriteLine( "fmtutil --byfmt latex" )<br>'oFile.WriteLine( "fmtutil --all" )<br>oFile.WriteLine( "echo Done. Please re-login." )<br></postmaster@daimi.au.dk></blockquote>This script requires a reboot. On some lab Macs I have used,<br>a reboot reset all user settings. I don't know if this is a likely<br>scenario in a Windows lab, and it does not apply to our NT lab<br>so this is an approach I can use for some things.<br><postmaster@daimi.au.dk></postmaster@daimi.au.dk><blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><postmaster@daimi.au.dk>oFile.WriteLine( "pause" )<br>oFile.close<br>oWsh.run """" &amp; sTLmain &amp; "\temp\tl_generate.bat" &amp; """", 1, true<br>'oFS.deletefile( sTLmain &amp;
 "\temp\tl_generate.bat" )<br></postmaster@daimi.au.dk></blockquote><postmaster@daimi.au.dk></postmaster@daimi.au.dk>Your extensive script was very helpful to me in thinking about my own <br> project and as a reference for things I may need to do in Windows in the future.<br> I got some re-writable DVDs and will give it a try this weekend. <br><br>I am including my emacs based solution, for those who might be interested in using <br>it or in commenting on it. While it is not as comprehensive as&nbsp; yours, it does not <br>require a reboot and omits some steps that, as far as I understand, are not necessary <br>in the case of my limited pre-configured dvd. <br><br>I should do the tests for conflicting binaries, but I have not yet learned if I can send <br>commands to Windows and get the results back to emacs for use in a script. <br><postmaster@daimi.au.dk></postmaster@daimi.au.dk><br>I am still working on figuring out how to view output, but I have included my custom
 <br>set variables in case someone can see an obvious problem. In windvi, I get a preview, <br>but on an A4 background. After configuring for a letter default, dviout looks in non-existing<br>directories for fonts, so dviout does not work at all.<br><br>------------------------------------------site-start.el--------------------------------------------------------------------------------<br><span style="font-weight: bold;"></span>;;Startup file for emacs on a DVD including TeX Live configured to run entirely from DVD <br>;;through emacs for North America. <br>(setq TL_DRIVE (substring (getenv "EMACSPATH") 0 2))<br>;;Some elements of PATH are redundant with exec-path. <br>;;There may be a better way to do this. <br>(setenv "PATH" (concat (getenv "PATH") <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ";" TL_DRIVE "\\bin\\win32\\gs\\gs8.54\\bin;" TL_DRIVE "\\bin\\win32" ))<br>(setenv "GS_LIB" (concat TL_DRIVE "\\bin\\win32\\gs\\gs8.54\\lib"
 ))<br>(setenv "PERL5LIB" (concat TL_DRIVE "\\pertl\\lib;" TL_DRIVE "\\perltl\\site\\llib" ))<br>(setenv "TEXMFCNF" (concat TL_DRIVE "\\texmf-var\\web2c" ))<br>(setenv "TEXMFTEMP" (concat (getenv "USERPROFILE") "\\Temp" ))<br>(setenv "TEXMFVAR" (concat TL_DRIVE "\\texmf-var" ))<br>(setenv "TLroot" (concat TL_DRIVE "\\" ))<br>;;add to exec-path<br>(let* ((emacsbin (concat TL_DRIVE "/Emacs/bin"))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (gsbin (concat TL_DRIVE "/bin/win32/gs/gs8.54/bin"))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (tlbin (concat TL_DRIVE "/bin/win32"))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (tlpath (list emacsbin gsbin tlbin))<br>&nbsp; (setq exec-path (append exec-path tlpath)))<br>;;Enable features.<br>(setq reftex-plug-into-AUCTeX t)<br>(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)<br>;;The following part does not quite work.<br>(custom-set-variables<br>&nbsp; ;; custom-set-variables was added by Custom.<br>&nbsp; ;; If you edit it by hand, you could mess it
 up, so be careful.<br>&nbsp; ;; Your init file should contain only one such instance.<br>&nbsp; ;; If there is more than one, they won't work right.<br>&nbsp;'(TeX-output-view-style (quote (("^dvi$" ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$") "%(o?)dvips -t landscape %d -o &amp;&amp; gv %f") ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$" "%(o?)dvips %d -o &amp;&amp; gv %f") ("^dvi$" ("^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "^landscape$") "%(o?)windvi %dS -paper a4r -s 0 %d") ("^dvi$" "^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "%(o?)windvi %dS -paper a4 %d") ("^dvi$" ("^a5\\(?:comb\\|paper\\)$" "^landscape$") "%(o?)windvi %dS -paper a5r -s 0 %d") ("^dvi$" "^a5\\(?:comb\\|paper\\)$" "%(o?)windvi %dS -paper a5 %d") ("^dvi$" "^b5paper$" "%(o?)windvi %dS -paper b5 %d") ("^dvi$" "^letterpaper$" "%(o?)windvi %dS -paper us %d") ("^dvi$" "^legalpaper$" "%(o?)windvi %dS -paper legal %d") ("^dvi$" "^executivepaper$" "%(o?)windvi %dS -paper 7.25x10.5in %d") ("^dvi$" "."
 "%(o?)windvi %dS %d") ("^pdf$" "." "AcroRd32 %s") ("^html?$" "." "netscape %o"))))<br><br>&nbsp;'(TeX-view-style (quote (("^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "%(o?)windvi.exe %dS -paper a4 %d") ("^a5\\(?:comb\\|paper\\)$" "%(o?)windvi.exe %dS -paper a5 %d") ("^b5paper$" "%(o?)windvi.exe %dS -paper b5 %d") ("^letterpaper$" "%(o?)windvi %dS -paper us %d") ("^legalpaper$" "%(o?)windvi %dS -paper legal %d") ("^executivepaper$" "%(o?)windvi %dS -paper 7.25x10.5in %d") ("^landscape$" "%(o?)windvi %dS -paper a4r -s 0 %d") ("." "%(o?)windvi %dS %d"))))<br>)<br>;;Loads AUCTeX related files.<br>;; Load files in `site-start.d' directory. <br>(dolist (file (directory-files <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (concat (file-name-directory load-file-name) "site-start.d") <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t "\\.el\\'")) <br>&nbsp; (load file nil t t))<br>----------------------------------------end
 site-start.el----------------------------------------------------------------<br><p>&#32;

<hr size=1>Expecting? Get great news right away with <a href="http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html">email Auto-Check.</a><br>Try the <a href="http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html">Yahoo! Mail Beta.</a>