0

I have checked two questions before:

The bank, where I work as a software engineer, does not allow us to download the packages, via MiKTeX, from the mirrors of denylisted sites under the user or admin mode for matter of security. The bank allows allows us only to install a software as a complete, offline and standalone installer (it needs to be an EXE or a MSI).

I thought of getting a TeXLive Collection and TeXLive DVD, but TeXLive Collection only downloads, what the banks forbids, TeXLive DVD is just an ISO and not an EXE.

I am seeking for an alternative to MiKTeX and TeXLive DVD, as a complete software that comes along with all the TeXLive or CTAN packages to installl without downloading from the internet.

Oo'-
  • 269
  • isn't the tug/texlive dvd what you need? the installer and a ctan snapshot so you shouldn't need a remote update. – David Carlisle Nov 22 '21 at 12:41
  • can you use the ubuntu system supplied texlive in the windows subsystem for linux? this wouldn't need any third party site, just apt get from the main ubuntu system repositories. – David Carlisle Nov 22 '21 at 12:46
  • @DavidCarlisle, it was what I needed, but it is still an ISO. I need only an EXE. And WSL is totally disabled and can not be enabled because it is admin mode, and the admin mode is privileged only to the support analysts, managers and superintendent. My computer is very restricted, although the bank disponibilizes a lot of softwares, including VSCode, etc., in their own software central. – Oo'- Nov 22 '21 at 12:52
  • what I meant is can you not get the actual dvd as a physical disk, then there is an exe installer on there. But I guess they don't let you stick dvd's in a non existing dvd slot either. Other possibility would be a texlive docker image but I wouldguess guess docker is out as well.... – David Carlisle Nov 22 '21 at 12:55
  • 1
    can't you create a portable miktex on another computer and then zip it in an self extracting exe? – Ulrike Fischer Nov 22 '21 at 12:57
  • 1
    I was going to suggest same as Ulrike but for texlive, if you install it somewhere all you need is to copy the directory so a self executing zip file would be fine. – David Carlisle Nov 22 '21 at 12:58
  • @DavidCarlisle, wait, are you saying there is an EXE inside the DVD? – Oo'- Nov 22 '21 at 13:07
  • @Ulrike Fischer, I'll check it now and talk about it with the support analyst. – Oo'- Nov 22 '21 at 13:07
  • As for the portable MiKTeX, the support analyst said: "For my part, creating the installation package is the minus. The question is whether or not the software can be used at the bank. It must have be approved by the Information Security Superintendence. What I can do is to create a "report", justifying why the software has not been approved, you submit a risk analysis. If they approve, we'll do." I'll test and send to the support analyst for analysing if it is OK or not. – Oo'- Nov 22 '21 at 13:17
  • I have just tested. I sa the portable MiKTeX downloads the packages from internet and installs on a new folder on another storage device. Remember the bank does not allow to download from internet. – Oo'- Nov 22 '21 at 13:38
  • @GustavoReis sorry but if there were an exe somewhere how would you get it into your computer if you can't get it from the internet? – Ulrike Fischer Nov 22 '21 at 14:09
  • It's ages since I actually used a dvd (they send me one but...) but the standard installer is in there so yes you just stick the dvd in and click on the install exe and it installs off the dvd. – David Carlisle Nov 22 '21 at 14:27
  • @UlrikeFischer, I would be able to able to download, but the bank blocks, and installing requires the admin mode, which is exclusive to support analysts, managers and superintendents. Only the support analyst can download, install and test a software on my computer via his admin mode. If I am satisfied and he approves, he'll add it to the bank software central where any bank collaborator can install on their bank computers. In the bank software central, we have VSCode, Sublime Text, IntelliJ Idea, OpenJDK, Python, Wincompose, etc. – Oo'- Nov 22 '21 at 14:48
  • @DavidCarlisle, I'll check it on my another computer. – Oo'- Nov 22 '21 at 14:49
  • @GustavoReis sure I got this. But the requirement "no download at all from the internet" doesn't make sense. You can use miktex or texlive without internet access without problems, but at some time in the process of getting the software the internet will always be involved. Even if Christian would provide a full exe of miktex -- you would need the internet to get it. And even if you acquire or create a dvd -- someone will have used the internet to download the software and burn it on the dvd. – Ulrike Fischer Nov 22 '21 at 15:01
  • @UlrikeFischer

    You can use miktex or texlive without internet access without problems

    Wait, do you mean I am able to compile and generate via MikTeX or TeXLive without all packages from internet because it comes already with texmf?

    – Oo'- Nov 22 '21 at 15:06
  • Sure, as I and David said: you only need to copy a full working system to your computer. Then you can use it even if you are not online. You won't be able to update it, but as long as that is fine for you, it will work. – Ulrike Fischer Nov 22 '21 at 15:10
  • @UlrikeFischer, as you and Chris have suggested, I've disabled the internet, open the portable MikTeX, I saw it installed a lot of packages (not all packages). I tested via terminal, checking the version of biber, biblatex, bibtex, latex, luatex, pdflatex, xelatex and xetex, all gave the version. Perfection! But not all packages are installed or come along with it... Some packages I want to use, for example, abnt and babel-*, are not installed. The bank will not allow to download these packages from internet. – Oo'- Nov 22 '21 at 17:07
  • 1
    You naturally need to prepare a full portable version on another PC first. Then you can copy everything to your bank PC. – Ulrike Fischer Nov 22 '21 at 17:09

1 Answers1

1

I don't know whether using MiKTeX or TeX Live at a bank is legal/regular/not contrary-to-contract. Checking this out (e.g. license-conditions at the side of MiKTeX/TeX Live, e.g. whatsoever conditions at the side of the bank/employer/client/contractor, etc) is up to you. I recommend not to perform illegal/irregular/contrary-to-contract actions. ;-)

Regarding the question whether using TeX is safe you might be interested in the discussion "Are there any dangerous commands in LaTeX?".

In any case, I would first check with the people responsible for computer security and have them confirm in a provable/legally binding manner that it is okay to attempt/to carry out intended installation steps/system changes.


Both with TeX Live and with MiKTeX you can easily create a local mirror of the entire package repository (e.g. on a removable medium like an USB-stick or a (micro)SD-card or an external USB-harddisk) and instead of having the installer downloading from the internet have it use the local mirror (on the removable medium) for installation.

(Local mirrors of package repositories can also be maintained, e.g., in samba-shares instead of using removable media. For installing things under Linux you usually need to mount the samba-share in question. With many Linux platforms you can use cifs for doing this.)

This feature is intended to offer the possibility of downloading only once for installing on several machines instead of repeating all the downloading with each single machine.

For creating the removable medium containing the local mirror you can probably use a machine not under the reigns of the bank.

Then, at the bank's machine where you want the TeX-distributon to be installed, launch the exe-file that makes up the installer from command-line and hereby via the appropriate command-line-options denote the removable medium as the location of the local mirror of the package repository.

If you can't insert/attach a removable medium (in)to the machine where you wish the TeX distribution to be installed, you probably can put both the installer and the folder containing the local mirror of the package repository into a zipped exe-file and after in whatsoever way transferring that to the bank's machine have that unzipped for obtaining both the local mirror and the installer on the bank's machine before running the installer.


In MiKTeX a local mirror of the entire package repository is called a "local package repository".

Both for obtaining a local package repository and for installing from a local package repository you can't use the "MiKTeX Basic Installer".
Instead you need to use the "MiKTeX Setup Utility".

You can obtain the "MiKTeX Setup Utility" at https://miktex.org/download: Just click the register "All downloads" and you will see it in the list.

Info on how to use the "MiKTeX Setup Utility" for obtaining a local package repository for MiKTeX is at https://miktex.org/howto/local-repository.

Info on how to use the "MiKTeX Setup Utility" for installing from a local package repository is at https://docs.miktex.org/manual/miktexsetup.html; see section "Options", "--local-package-repository=dir - Download into (install from) the specified directory".

Info on using a local package repository for deploying MiKTeX at your organization is at Rollout MiKTeX in your organization / https://miktex.org/howto/deploy-miktex. I think you won't need this. :-)


With TeX Live you can create a local mirror of the entire package repository, e.g., using rsync.

I don't know if there is a rsync-client for Windows or whether you can install rsync under Windows via Windows Subsystem for Linux (WSL). But you probably can boot some computer from a removable medium like USB-stick or (mico)SSD-card or external USB-harddrive or DVD, using a Linux live-system which boots from removable media and which brings along rsync. E.g., Knoppix is such a Linux live-system which can be installed on many kinds of removable media; release 9.1 is based on Debian bullseye with a few packages from Debian/unstable (sid).

Instructions on creating a local mirror of the entire package repository of TeX Live via rsync are at Downloading/mirroring the TeX Live repository / https://tug.org/texlive/acquire-mirror.html.

Instructions on how to have the TeX Live-Installer use the local mirror instead of downloading from the internet are in the The TeX Live Guide—2021 at https://www.tug.org/texlive/doc/texlive-en/texlive-en.html , "section 3.3.1 The -repository option".


Probably you can use the sfx-module of some zipping-tool for creating a self-extracting exe-file which extracts the installer and the local package repository, launches the installer using appropriate command-line-options so that the extracted package repository is used as local package repository. See, e.g., Is it possible to execute a file after extraction from a 7-Zip self-extracting archive (SFX) archive?.

Probably the bank can be convinced to maintain a repository for deployment in the organization and to deliver an sfx-exe-file which extracts and launches the installer with commandline-options for using the bank's deployment-repository.


I just read that you can use the MiKTeX-net-installer with command-line-options like -portable and -package-set=complete for downloading MiKTeX and then creating a portable MiKTeX-installation which contains everything.

Create the portable full MiKTeX-installation on a computer which does not belong the bank.

As the installation is portable, you can copy it by copying the folder that contains it. Copying in turn can be done by using a file-packer like 7-Zip or WinRar for packaging the folder into a self-extracting exe-archive.

This way there is no need for the self-extracting archive to execute whatsoever file after extracting.

You can obtain the "MiKTeX-net-installer" at https://miktex.org/download: Just click the register "All downloads" and you will see it in the list.

I think you can also create a portable full installation, using the Basic-Installer, obeying the instruction of renaming it to miktex-portable.exe as described at https://miktex.org/howto/portable-edition and additionally providing the command-line-option --package-set=complete described at https://docs.miktex.org/manual/setupwiz.html.

You can obtain the "Basic-Installer" at https://miktex.org/download: Just click the register "All downloads" and you will see it in the list.

Ulrich Diez
  • 28,770
  • The bank doesn't allow only the attachment of USD drive or SSD to the collaborator's bank computer, but allows the collaborator to zip both the installer (MikTeX Utility Setup) and the directory, to deploy them to Google Drive, send the Google Drive share link or send via Google Drive share attachment to the support analyst e-mail. The problem is that, to add to the software central, it needs to be an EXE or a MSI. If you think it's impossible, then I'll suggest the ISS to create the own bank mirror, cloning a university's CTAN mirror, like the bank did the mirrors for PyPi and npmJS. – Oo'- Nov 22 '21 at 15:15
  • @GustavoReis Probably you can use the sfx-module of some zipping-tool for creating a self-extracting exe-file which extracts the installer and the local package repository, launches the installer using appropriate command-line-options so that the extracted package repository is used as local package repository. See, e.g., Is it possible to execute a file after extraction from a 7-Zip self-extracting archive (SFX) archive?. – Ulrich Diez Nov 22 '21 at 15:25
  • @GustavoReis Probably the bank can be convinced to maintain a repository for deployment in the organization and to deliver an exe-file which extracts and launches the installer with commandline-options for using the bank's deployment-repository. – Ulrich Diez Nov 22 '21 at 15:42
  • Will I add both portable MiKTeX and the folder full of bz2, cab and lzmas, using sfx-module, becoming into an EXE? – Oo'- Nov 22 '21 at 18:14
  • If you do not mind, please, can you make a small tutorial of how to use sfx-module for MiKTeX? The answers in the linked question are confused. – Oo'- Nov 22 '21 at 18:26
  • @GustavoReis The last time I used some sfx-module for creating a self-extracting .exe-file is more than 15 years ago, sorry. Back then I uses file-packers WinRar and 7-Zip a lot. Back then they came along with a sfx-module where you could specify what files to execute right after unpacking. – Ulrich Diez Nov 22 '21 at 18:44
  • Too bad. Thank you. – Oo'- Nov 22 '21 at 18:51
  • 1
    @GustavoReis I just read that you can use the MiKTeX-net-installer (setup-21.10-next.exe) with command-line-options like -portable and -package-set=complete for creating a portable MiKTeX-installation which contains everything. As it is portable, you can copy it by copying the folder that contains it. Copying in turn can be done by using a file-packer like 7-zip or WinRar for packaging the folder into a self-extracting exe-archive. .. – Ulrich Diez Nov 22 '21 at 18:52
  • I ran the command .\setup-4.2-x64.exe -portable -package-set=complete, it open the GUI, and created a new folder on C drive called miktext-portable. Did I do anything correct or incorrect? – Oo'- Nov 22 '21 at 19:15
  • @GustavoReis In case everything went correct, the folder miktex-portable should contain the complete MiKTeX-installation., runnable by starting the Windows-command-script miktex-portable in that folder. If things didn't work out, probably renaming the Basic-Installer to miktex-portable.exe and running it with the commandline-option --package-set=complete works out. – Ulrich Diez Nov 22 '21 at 19:19
  • I compressed that folder, selecting 7zip and creating SFX archive, transforming into an EXE, using 7zip. I am waiting to test it. As for your last suggestion, when I ran the command .\miktex-portable --package-set=complete, I received an error: "The operation could not be complete for the following reason: The specific local repository does not exist." – Oo'- Nov 22 '21 at 19:52
  • @GustavoReis Does the folder miktex-portable contain many files and/or some sub-folders with many files and a Windows-command-script which also is named miktex-portable, and does running that script lead to adding the icon for the MiKTeX-console to the Windows-Taskbar? And is the Windows-plattform in use for creating the portable installation the same as the Windoes-platform at the bank, i.e., both 64-bit-windows or both 32bit-Windows? – Ulrich Diez Nov 22 '21 at 20:14
  • @GustavoReis The manual for miktexsetup/setup-4.2-x64.exe I linked in my answer says that the installer needs to be run twice: First run with the download-task, second run with the install-task. – Ulrich Diez Nov 22 '21 at 20:34
  • Yes, the folder miktex-portable does contain, and yes, it does have a Windows-command-script. Yes, the script added the icon to the taskbar. Yes, observe the most of the bank computers use Windows 10 64 bits (in my case), macOS Catalina (for designers and iOS developers) and CentOS 64 bits (rarely). – Oo'- Nov 22 '21 at 20:37
  • @GustavoReis If it does and if previously missing packages like abnt and babel-* are available now, too, then there are good chances that everything went right. In this case I wish you good look with testing on the computers at the bank. :-) If I got MiKTeX's "portable" thing right, with a Windows-10-portable-installation you in any case need a Windows10-machine. I.e. things won't work out on macOS or CentOS. – Ulrich Diez Nov 22 '21 at 20:40
  • 7zip finished compressing the folder as an executable. I have just tested, opening the executable. 7zip asked me to extract where. I am extracting to a test folder. Is it possible to extract without 7zip? – Oo'- Nov 22 '21 at 20:42
  • @GustavoReis I suppose the 7-Zip-message is bulitin into the executable created by 7-Zip for commercial-purposes. So I suppose getting rid of it won't be easy... – Ulrich Diez Nov 22 '21 at 20:44
  • 7zip is already in the bank's software central. But it depends on a collaborator, the collaborator that does not have 7zip installed can get frustrated with the failed installation of MiKTeX. – Oo'- Nov 22 '21 at 20:46
  • @GustavoReis I am not sure if the file-packer 7-zip needs to be installed. If you run the self-extracting executable/the .exe-file you created via 7-Zip, the exe-file should extract without needing 7-Zip being installed but (for commercial purposes) referring to 7-zip. – Ulrich Diez Nov 22 '21 at 20:48
  • I finished the test. I open the MikText GUI from the test folder and I saw abnt and babel-* are installed. Nice! I will test without 7zip. – Oo'- Nov 22 '21 at 20:54
  • I concluded the test. Without 7zip, the executable is already a 7zip self-extracting installer. Nice. Thank you. I'll report to the support analyst and see if he'll approve and add to the software central. – Oo'- Nov 22 '21 at 20:58