On my Windows 7, 64-bit machine MiKTeX lives in C:\Program Files\MiKTeX 2.9. I'd like to move it to D:\Program Files\MiKTeX 2.9. Is there a mostly painless way to do so, or should I just reinstall?
- 603,163
- 235
2 Answers
Maybe it’s too late for the OP, but I want to advise the following procedure:
Make a copy of
C:\Program Files\MiKTeX 2.9let’s say inC:\tempdir.Uninstall your MiKTeX installation.
Do an installation of the basic MiKTeX version and choose the path
D:\Program Files\MiKTeX 2.9.And now the clever trick: On the Command Prompt execute the following
mpm --admin --repository="C:\tempdir" --import-allIf you’ve chosen on installation, that you will use it as the only user, you must leave out the
--adminswitch. More command line options you can find e.g. in How do I update my TeX distribution – MiKTeX from the Command line.As last step you can delete
C:\tempdirand possible remnants ofC:\Program Files\MiKTeX 2.9.
-
1Warning! If some packages are installed as admin and some as user, it could be necessary to join both directories before importing pacakges. It is worth taking a backup first. – faramir Feb 26 '21 at 11:42
Uninstall and reinstall is the best way to move pretty much any installation. There is a lot going on in an installation. The installer is written specifically to (hopefully) get it all done right. Moving it by hand is sometimes possible, but in general it is not worth the risk of missing something subtle.
-
-
I downvoted. It is just a general hearsay truism, or even opinion, non-specific to the question and software at hand. There are countless other places on the web, where this type of answers and advice are already provided, but this site is for more specific answers. – Christoph90 Aug 25 '21 at 11:59