Make the installation process more transparent on Windows

Use case or problem

It isn’t obvious that the executable downloaded from https://obsidian.md/ is an installer rather than a portable app. As of 0.11.0, the Obsidian executable downloaded via the Get Obsidian for Windows button installs itself into the AppData folder on Windows automatically without informing users of the installation location or giving them a way to back out should they not want to continue. This has the potential to make the onboarding process for some users confusing or unfavourable.

This is Windows centric, but may be applicable to other operating systems. I suspect the macOS install process involves manually dragging the app into the Applications folder, as per usual, making the install process on Mac more transparent.

Proposed solution

A couple of proposed solutions:

  • Short-term: add ‘Installer’ to the executable name. E.g. ‘Obsidian.0.11.0.Installer.exe’
  • Long-term: include a setup confirmation window in the installation process that let’s users know what’s going on, and lets them cancel if they wish to. E.g.:

Current workaround (optional)

Related feature requests (optional)

13 Likes

Absolutely, this “eat or die” approach is not only extremely rude but also trouble for remotely administered workstations or just ppl who want to have control of what and where (which drive, folder, …) something is installed. This is not nice!

7 Likes

I’m definitely going to second this - I had zero knowledge that the website Obsidian.0.12.15.exe was going to do an immediate install - its not uncommon for people to have two harddrives - a secondary drive for programs/apps, and a significantly smaller OS-only drive (C:).

If every program took this approach of installation to %APPDATA%, the OS drive would quickly be consumed.

Please at least add an args parameter for command-line installation:

obsidian.0.12.15.exe --install-path D:\Apps\Obsidian

3 Likes

Guys I just installed 0.12.19, or rather was forced to, as the downloaded .exe installed itself without asking onto my system drive (small hard disk).
As stated beginning of this year, this is a no-go behaviour -
don´t get me wrong, I love what you´re doing, but this is like stepping into someone´s house without asking and lying into their bed, very unpolite :wink:

1 Like

Dear developers, you lost it at the very first step… Installation on Windows :confused:

I agree with all opinions above.

I uninstalled obsidian immediately after this unacceptable behaviour and will not use until you make requested changes.

But over the past few months,Now the latest version is 0.13.14,When I installed it,Software is still automatically installed to the C://users/aa/AppData/

This prevents me from using obsidian,I can only use other notes instead。

Are there any updates on this? I am unable to install Obsidian since I need to be able to choose the installation directory.

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…

1 Like

Okay, I may have a found a feasable workaround, for those interested:

It seems that a new process with user privileges will have the APPDATA and LOCALAPPDATA variables loaded in its shell from these two registry keys:

HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\AppData

SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Local AppData

I wrote a bat file C:\Users\user\obs_inst.bat that enables Obsidian to be installed in a specified directory from the command line:

@ECHO OFF

SET inst_dir=%1
SET inst_f=%2
SET temp_reg_f=%3

REG SAVE "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" %temp_reg_f% /y
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v AppData /t REG_EXPAND_SZ /d %inst_dir% /f
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Local AppData" /t REG_EXPAND_SZ /d %inst_dir% /f

%inst_f%

REG RESTORE "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" %temp_reg_f%

Lets say you downloaded the Obsidian installer executable as A:\Installers\Obsidian.0.15.9.exe, and you would like to install it in A:\Apps\Obsidian, without it having any weird folder structure. Btw, you would also need to provide a temporary registry backup filename, lets say C:\WinShit\RegBackup.hiv (it doesn’t need to exist yet, but it must have the .hiv extension). Then you can install Obsidian by opening cmd.exe with ADMINISTRATOR privileges, and type the following command:

C:\Users\user\obs_inst.bat A:\Apps\Obsidian A:\Installers\Obsidian.0.15.9.exe C:\WinShit\RegBackup.hiv

Note though, that I am no expert, and messing with registry can be risky, so proceed on your own risk!

Some additional considerations:

[!IPORTANT]
The order of the arguments is not interchangable!

[!INFO]
If any of your paths have spaces, enter the file or path enclosed by double qoutes in the command line, ie "C:\Path with space\RegBackup.hiv".

[!INFO]
Some additional folders might generate inside the A:\Apps\Obsidian folder, like commons, Microsoft, etc. These can be deleted after restarting your PC. The A:\Apps\Obsidian folder should only contain Obsidian folder and Obsidian.update folders.

[!INFO]
A folder named ObsidianLow might be generated in A:\Apps. You can delete it.

[!WARNING]
I have not tested this extensively, and there are no checks for invaid inputs in the bat file, so it might crash after changing your envs, and before restoring them. In that case, open a new cmd.exe terminal with admin priv, and enter REG RESTORE "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" C:\WinShit\RegBackup.hiv

[!WARNING]
Obsidian may or may not work as intended. It runs fine here, but I have not tested it extensively. I’m on my way to bed…

So, I learned a lot about how Windows works, which is good I guess, but not a very user-friendly way to install a modern piece of software…

1 Like

Oh, and the auto-generated shortcuts (Desktop, start-menu) might not work. Just replace them with the good old Send to Desktop (Create Shortcut), from the actual executable…

Looks like Obsidian has us annoyed and they don’t even care…
Does anyone know about any other software like this that is less invasive?

Would you do a video for this, PLEASE!!!
Many of us would really appreciate it!

I didn’t understand how to create a .hiv file or even how you created a .bat file, nor even how it works.

Would it help to use the portable version? No installation required:

https://forum.obsidian.md/t/run-in-portable-mode/915/71

I would if I had the time, unfortunately I don’t.

If you’re not familiar with environment variables, registry or .bat files, I would recommend to just let the installer do it’s thing, then manually copy paste the two obsidian folders from C:\Users\user\AppData\Local to a location of your choosing.

Windows will no longer know where the app is, and the windows link in Apps settings will be broken. You also need to make new shortcuts on your desktop and start menu. Other than that though, it appears to work fine.

Thanks for your interest!

1 Like