Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::filesystem and writing to Windows programdata structure
From: Stian Zeljko Vrba (vrba_at_[hidden])
Date: 2017-10-12 09:20:22

If the application doesn't have write permission for a folder at run-time, why do you expect that it has the permission to change the permission on the folder? (Modifying the DACL of an object is also a separate permission.)

From: Boost-users <boost-users-bounces_at_[hidden]> on behalf of Tim Burgess via Boost-users <boost-users_at_[hidden]>
Sent: Thursday, October 12, 2017 11:14:26 AM
To: 'boost-users list'
Cc: Tim Burgess
Subject: [Boost-users] boost::filesystem and writing to Windows programdata structure


I’ve an application that has been working fine under Windows 7, but I’m now fixing up for running on later Windows versions. I’ve been hitting unhandled exceptions when writing to c:\programdata\(my company)\(my app name)\ and understand that this is due to the permissions for such folders being more restrictive on Windows 8, 8.1 and 10.

My research seems to indicate that I can modify my installer to set up my folders with appropriate permissions at install-time, but I’d prefer to use boost::filesystem to check folder/file permissions then change them at run-time, if necessary using appropriate csidl values.

Can anybody offer any advice, please?

Best wishes.

Tim Burgess

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at