0

The title speaks for itself.

To clarify things: so far I've used Ngen in an installer to compile the .exe with all dependencies which gave us a huge speedup, be it at startup or at runtime (at least it feels like so). But now I wanted to create an optimizer which only executes Ngen. This is achieved with InnoSetup. This works fine for all local drives, but not for network drives. I always get the error that The specified file or directory is invalid. Is there a way to execute ngen on executables on network drives?

EaranMaleasi
  • 765
  • 1
  • 9
  • 28
  • Standard explanation is that you use a mapped drive letter instead of a UNC name (i.e. "J:" instead of "\\server\share"). Drive letters are user specific, ngen runs as a service with a different user account so has no idea what J: could be. – Hans Passant Dec 02 '15 at 13:49

1 Answers1

0

Okay, got it. Just run Ngen directly instead of running it via CMD which cannot handle UNC-paths. Didn't think of that while writing my question.
To answer my own question:
Yes. Yes it is, when Ngen is called correctly.

EaranMaleasi
  • 765
  • 1
  • 9
  • 28