0

I need to move a few files to the profile, since these files should be manipulated without admin priviliges, while installing the application per machine. When I just move the specific files, it breaks all the relative paths of my code, especially in the HTML files. I have been searching for a way to create symlinks inside the profile folder, that are treated as a folder by the application, which doesn't seem to be possible.

So can I just move the complete resources folder including the ASAR archive to the profile and then point the application to it?

neolith
  • 699
  • 1
  • 11
  • 20
  • Are you moving these files with NSIS in the installer? – Anders Nov 13 '19 at 14:53
  • No, I am moving them with the fs module on first run, since they need to be moved to the current user's profile. – neolith Nov 13 '19 at 14:59
  • Why is the question tagged with NSIS then? – Anders Nov 13 '19 at 16:04
  • Because I am building with nsis and was hoping that it would provide a neat automatic solution to this – neolith Nov 13 '19 at 16:22
  • It does not (and cannot), applications themselves are supposed to **copy** the "template" files to the profile the first time a user runs it. Per-machine installers can't touch HKCU nor the users profile. – Anders Nov 13 '19 at 16:31
  • It is not so much about the copying part. I just need Electron to point to the profile directory and treat it as if it was lying in the program directory. Something like a symlink that is created during the installation and points to an alias like %USERPROFILE%. Unfortunately symlinks seem to be able to point to already existing folders only. – neolith Nov 13 '19 at 16:48
  • Symlinks can't point to environment variables AFAIK. – Anders Nov 13 '19 at 18:46
  • No, they can't. Guess they are pointers to a specific address in the filesystem. – neolith Nov 13 '19 at 18:52

0 Answers0