simple-web-server icon indicating copy to clipboard operation
simple-web-server copied to clipboard

install location (Windows)

Open YZgitter opened this issue 1 month ago • 2 comments

The installer doesn't ask for a location and puts the files in a non-standard path (C:\Users...) instead of inside Program Files.

YZgitter avatar Nov 09 '25 20:11 YZgitter

puts the files in a non-standard path

There is no standard path for windows install locations. Traditionally they are installed in Program Files, though many many apps (eg discord, vscode, element desktop) also install in the users program files. Also see: https://superuser.com/a/1481723

allowToChangeInstallationDirectory

ethanaobrien avatar Nov 09 '25 21:11 ethanaobrien

Right, unfortunately this is the normal/default behavior for Electron apps. But VSCode, for example, does have the option to install in Program Files with the 'System Installer' (or by running the 'User Installer' elevated). Obsidian does too.

https://stackoverflow.com/questions/60170653/electron-app-installation-to-programfiles https://github.com/electron-userland/electron-builder/issues/5871

Honestly IDK how many people want this, but I think you should get a choice. Some installers (Vivaldi browser) let you choose during installation and let you elevate later with admin credentials if necessary.

YZgitter avatar Nov 10 '25 10:11 YZgitter

Thanks for opening this issue and #285. Both are very low priority to me, but I will consider enabling allowToChangeInstallationDirectory for the next version's nsis installer, whenever that may be. I would rather leave it off since it's less common these days for other major applications, but since this is a developer tool, I can get behind the argument that we should give users the choice.

I'm not sure how different install locations might impact #285. I don't use Windows much these days, so if you have any insight into that, please let me know.

terreng avatar Nov 11 '25 19:11 terreng

I'm not sure how different install locations might impact #285. I don't use Windows much these days, so if you have any insight into that, please let me know.

That shouldn't be impacted at all. The installed version should retain the same absolute path for the config files (inside AppData\Roaming), regardless of where the executables are installed. That's how pretty much all installed Windows apps behave nowadays.

#285 is only about the portable version, which should store the config files relative/next to the executable files, so that you can copy the app folder and move it around (to a different computer). Often portable versions work like this "out of the box", with no user interaction. Other times, there's an additional step. An example of the latter is VSCode, which requires the creation of an empty 'data' folder next to code.exe.

Apologies if what I wrote is obvious, just making sure I'm not misunderstood. And if you're asking about any technical challenges of implementing this (with Electron...), I've no idea sorry.

YZgitter avatar Nov 12 '25 16:11 YZgitter

Thanks for sharing this - it's very helpful. I'll leave a comment on the other issue with my thoughts.

terreng avatar Nov 12 '25 20:11 terreng