This has been a real bummer for me aswell after first getting hyped about Obsidian. I understand the intention of making a fully automated “user-friendly” installer, but after having spent hours messing with windows environnments, trying to get it to install where I NEED to install it, the last thing I would call it is “user-friendly”.
As a temporary workaround, I found out it uses the USERPROFILE environment variable, which can be changed to alter the install directory, but annoyingly, it seems that the “AppData” dir-structure is still assumed and seemingly hard-coded in the installer. If you run the installer without access to environment variables, it seems to fetch it from registry, and still manages to find “C:\Users\User\AppData”.
So, in windows powershell (5.0 or later), the commands
[System.Environment]::SetEnvironmentVariable('USERPROFILE', 'A:\Apps')
A:\Installers\Obsidian.0.15.9.exe
Causes Obsidian to install in A:\Apps\AppData\Local\Obsidian\
(even if APPDATA and LOCALAPPDATA points to C:\Users\user\AppData\..
), which I find extremely annoying, since the ‘%USERPROFILE%\AppData\Local’ seems to be hardcoded, which is poor practice IMHO.
Even worse, if you clear every varaible with
foreach ($var in Get-ChildItem env:){[System.Environment]::SetEnvironmentVariable($var.key, '')}
A:\Installers\Obsidian.0.15.9.exe
It somehow manages to find C:\Users\user\AppData
, propably from registry, or by starting its own process outside the calling process. Not sure how to run a process from PowerShell that disables new processes from being created…
I migth try to build obsidian from source instead, but damn, my buzz really went out, so I don’t think I will…
Anyway, if the installer had instead simply used the APPDATA and LOCALAPPDATA variables, and USERPROFILE simply as a fallback, it would at least be possible to control install location from a simple command -line call or two.
Even so, not very user-friendly, and I really hope this is not becomming a trend with modern apps (Windows is doing the same with MS store-downloaded apps)…
Sorry to be so negative about this, but it bothers the hell out of me, and I think I would otherwise really love Obsidian…