4 ms·
I'll mention two pain points as a former windows developer. I used to develop windows shareware, all the way back to Windows 95. Back then you could write to t
by dukeofdoom 6y ago
I'll mention two pain points as a former windows developer.
I used to develop windows shareware, all the way back to Windows 95. Back then you could write to the installation folder "c:\program files\myapp" and life was simple.
At some point MS figured this was bad security, and you needed to write to the Windows Rigistery (HCKLM / HCKLU) to store your app settings. And write to C:\Users\<username>\AppData\ folder to store your data files.
So all of this resulted in 3 different places you needed to write your data to now. But then it gets even more split because, in some cases you needed to run as an admin during the installation, and your appdata will be stored under the admin account.
Also, at some point c:\progrm files\ was split, and also they added c:\program files (x86), and I believe the c:\program files\ is virtualized. And the Windows registry is also split for local user, and machine settings, and admin settings.
Two issues I ran into:
1. c:\program files\myapp\ I could not trust what I wrote there. I believe its virtualized. So I ran into issues where I would delete a file in my installation folder, and old version would be put back by windows in the background.
2. When a regular user installed my app, and it need to write to HKLM, the app will need to be elevated to admin to be able to do that. This also resulted in another split of settings. Because there are per user settings and per machine settings.
In conclusion, app installation became a confusing mess!
- Macha 6y agoThis divide exists in all OSes now. Linux (XDG): Config: XDG_CONFIG_HOME (~/.config) App: /usr/bin Runtime data: XDG_DATA_HOME (~/.local/share) -- MacOS: (Note: CLI apps often follow the XDG conventions rather than the Mac conventions on OS X) Config: ~/Library/Application Support/ Application: /Applications Runtime data: ~/Library/Application Support
- quotemstr 6y ago> In conclusion, app installation became a confusing mess! No, app installation was a confusing mess and now it's been cleaned up. There's nothing wrong with an app separating user-specific data from system-global data. Running an app as a regular user shouldn't require any writes to HKLM!
- dukeofdoom 6y agoOne of my apps has a dll based plugin system, uses OCX. Requires elevation to install dll files.