Why not just install a whole application to ....

Community Forums/General Help/Why not just install a whole application to ....

Blitzplotter(Posted 2014) [#1]
... a directory created within the users My Docs folder?

Whilst this may be considered 'bad practice' it'd negate the need to get around a program not being able to write to its folder within the Program Files/[application_folder]/ directory due to the need to write to the C:\ProgramData\ folder to get around this issue.

Meanwhile - I need a little more debug within my current project ;)


xlsior(Posted 2014) [#2]
The problem with 'bad practice' is that it could theorethically stop working and completely blow up in your face with any new windows release or windows update.

Aside from genuine technical limitations (e.g. no 16-bit programs on 64-bit windows), those kind of shortcuts that go contrary to the MS design guidelines are some of the main reasons that some older software no longer works properly on modern windows installs...


Yasha(Posted 2014) [#3]
Depends entirely on how big and how specialist your application is.

Centralized folders exist to allow multiple users on one machine to share static data. Games in particular regularly exceed the 10GB mark these days; if every user had to have their own copy... well, disk manufacturers would be happy. It's also not just inconvenient, but very impractical, once you start doing that for work and utility programs. It doesn't usually make sense for users to have their own copies of large chunks of the what might be considered functionally part of the OS.

If your application is highly unlikely to be used by multiple users, is very small, or its generated data greatly outweighs the static data, then there's nothing wrong with this. There is no (good) reason it should be considered a bad practice, and it's very common way to install personal programs on *nix systems. (Windows' folder hierarchy and "good practice" can't see each other on a clear day anyway... it's a complete mess; arguably sticking to the home folder is actually the cleanest option.)

Ideally though you shouldn't make any assumptions about where the user wants to put your program. If they actually like Program Files, let them put it there too, unless you have a reason to require it sits in the folder with the files it manipulates.


RemiD(Posted 2014) [#4]
If you have ever bought an old game on gog.com, they install the games in c:/GOG Games/GameName/

maybe it is to be able to write/read directly in each game directory ?


Blitzplotter(Posted 2014) [#5]
All feedback greatfully recieved - This feedback is especially appreciated:

If your application is highly unlikely to be used by multiple users, is very small, or its generated data greatly outweighs the static data, then there's nothing wrong with this.


Hmmm, I've spent roughly 10-30 hours (roughly) faffing around trying to use the best practice with respect to Installing my application. Whilst I don't mind a challenge - negotiating the Windows minefield as an Indie is somewhat of an uphill battle.

I've a pretty comprehensive debug file that now gets written to of the back of some advice from RemiD. Its in the Blitz Showcase if anyone would care to provide me with some feedback on the paths they have on remote systems, I'd appreciate it ;)

Although, I'm exceedingly close to giving in and just using the myDocs folder, or the root of the Homer Drive as gog.com does it.


BlitzSupport(Posted 2014) [#6]
Just ported this system from a PureBasic application -- may be of use here:

Save settings to correct location on Windows


Blitzplotter(Posted 2014) [#7]
Interesting, will investigate later, thanks.


BlitzSupport(Posted 2014) [#8]
You could of course just amend the GetPrefsFile () bits to obtain the folder location and do your own thing from there...