I am trying to get the local Window Local AppData folder using the agnostic version using Haskell and I am having problems with this. I tried to use the System.Win32.Registry library, and I was able to get the code below (after some trial and error), but I could not figure out how to use regQueryValueExor any other function to get the desired value.
import System.Win32.Types
import System.Win32.Registry
userShellFolders :: IO HKEY
userShellFolders = regOpenKeyEx hKEY_CURRENT_USER "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\" kEY_QUERY_VALUE
I also tried to look at the source code for the function getAppUserDataDirectoryin the System.Directory module, but that didn't help either.
Maybe there is an easier way to do this, which I just miss.
source
share