Page 1 of 1

Get OS path test

Posted: Tue May 17, 2016 2:28 am
by ADMIN
I need to ensure TU2 is saving its files to an appropriate spot.
Many games save to the user/documents folder or user/appdata

But things are further complicated by older OS's (e.g. XP and Vista) having different locations again.

Can I ask users to test out the small programme below?
It uses a custom DLL to get the current the OS path.
Very interested in the results from those with older OS'es such as WinXP and Vista.

http://madjack.fileburst.com/get_os_path_test.rar

Re: Get OS path test

Posted: Tue May 17, 2016 5:13 am
by Phantaminium
AppData: C:\Users\Nick\AppData\Local
My Docs: C:\Users\Nick\Documents

Press any key to exit.



Windows Vista

Re: Get OS path test

Posted: Tue May 17, 2016 1:29 pm
by Admiral Z
AppData: C:\Users\SupremeAdmiralZ\AppData\Local
My Docs: C:\Users\SupremeAdmiralZ\Documents

Press any key to exit.

---------------------------------

That's what I got on my machine running Windows Vista.

Re: Get OS path test

Posted: Tue May 17, 2016 3:05 pm
by ADMIN
So which do you guys prefer? Documents or appdata for game data?

Re: Get OS path test

Posted: Tue May 17, 2016 3:48 pm
by Admiral Z
Well I never use my Documents folder and I'm used to doing %appdata% in the start menu (because of Minecraft) so Appdata would be my choice... I have a feeling that I'm in the minority though. :P

Re: Get OS path test

Posted: Tue May 17, 2016 5:57 pm
by Max Powerz
I'm with AdmiralZ
%Appdata% is more professional, it's where most newer titles are storing all their volatile data like save states and other files that are modified during runtime.

Also it's great that you want to support older OS's but keep in mind that Microsoft has stopped supporting them and is literally trying to force everybody onto windows 10,
Within the next 1-2 years Microsoft will have forced almost everyone onto their newest OS regardless of whether they want it or not.

Re: Get OS path test

Posted: Wed May 18, 2016 12:19 am
by Phantaminium
I'll regrettably be going of my own will when I make a new computer. I want that DirectX 12...

Re: Get OS path test

Posted: Sat Jun 04, 2016 4:01 am
by bondsc
On Windows 10 x64 build 1511:
AppData: c:\users\simon\AppData\Local (same as %LOCALAPPDATA%)
MyDocs: c:\users\simon\Documents
(and I can confirm that both of these locations are valid)

On XP SP3 x86:
AppData: c:\documents and settings\simon\local settings\application data
MyDocs: c:\documents and settings\simon\My Documents
(and I can confirm that both of these locations are valid)


I would prefer "AppData" to "MyDocs" as most applications (that I use in an Enterprise environment) store their non-persistent data in this location and I hate apps which store settings under documents - a location I believe should just hold documents that I write and not settings.

In my opinion, there are two locations you should consider:

1) %APPDATA%
This maps to "%USERPROFILE%\AppData\Roaming" on Vista and later (e.g. "c:\users\simon\AppData\Roaming")
This maps to "%USERPROFILE%\Application Data" on XP and 2000 (e.g. "c:\users\simon\Application Data")
It exists on ALL Operating Systems and is easily referenced (i.e. just an environment variable to expand - no need for a DLL)
This location is typically reserved for settings which you'd want to persist as you roam between different computers e.g. saved dictionaries, Signatures (in in email program), toolbar settings, saved games, templates etc

2) %LOCALAPPDATA% (what you are referring to as AppData in your test tool)
This maps to "%USERPROFILE%\AppData\Local" on Vista and later (e.g. "c:\users\simon\AppData\Local")
This maps to "%USERPROFILE%\Local Settings\Application Data" on XP and 2000 (e.g. "c:\users\simon\Local Settings\Application Data")
It exists on ALL Operating Systems and isn't so easily referenced (since the environment variable %LOCALAPPDATA% doesn't exist on XP and 2000)
In my programs I tend to read the registry value "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Settings\Local AppData:REG_SZ" to find its location. I know for certain that this registry value exists on every OS from 2000 to Win10 (as I use it a LOT on programs which run on various customer systems)
This location is typically reserved for scratch data, settings which you wouldn't expect to roam between different computers and typically settings which you can afford to lose (e.g. a cache or temporary files or something very computer specific such as a license or a debug log)


Personally I'd prefer %APPDATA% to your use of "AppData" (which is really %LOCALAPPDATA%). But I'd prefer your "AppData" to "MyDocs".

(sorry, long answer, been drinking coffee)