This question already has an answer here:

I'm trying to install the elsarticle class manually on MiKTeX 2.9 (Windows) from the .ins file. However, when I type latex .\elsarticle.ins, I get the following:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (MiKTeX 2.9)
entering extended mode
! I can't write on file `elsarticle.log'.
Please type another transcript file name:

When I type any other file name, I keep getting the same error.

marked as duplicate by user170109, Stefan Pinnow, Mico, Zarko, Phelype Oleinik Apr 14 at 21:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • that is a filesystem restriction not a tex one, you either don't have write access to the current folder or the file is being locked by another program – David Carlisle Apr 14 at 17:15
  • If using MiKTeX the packgage installer should have written the file so you should not be trying to fight it check in MiKTeX-console it has been installed and Tasks refresh file name database as admin if you have dual user AND standard user if either. exit MiKTeX-console and reenter to repeat if necessary ALWAYS use console if you can. Never manual install – user170109 Apr 14 at 17:48