PDA

View Full Version : SB2022 and Known Folders



MarkRiffey
03-16-2022, 12:27 PM
Friedrich,

CSIDL was deprecated as of Windows Vista (reference below) but thankfully still works.

Will SB2022 support KnownFolderID? Not sure it will ever matter, but these are the kinds of things one doesn't enjoy learning the hard way:)

Mark


From https://docs.microsoft.com/en-us/windows/win32/shell/csidl

As of Windows Vista, these values have been replaced by KNOWNFOLDERID values. See that topic for a list of the new constants and their corresponding CSIDL values. For convenience, corresponding KNOWNFOLDERID values are also noted here for each CSIDL value.

The CSIDL system is supported under Windows Vista for compatibility reasons. However, new development should use KNOWNFOLDERID values rather than CSIDL values.

linder
03-17-2022, 08:28 AM
Mark,

good point. Yes, SHGetFolderPath is deprecated. Unfortunately, for backwards compatibility, CSIDL is the only mechanism that can be used to power installs from pre-Vista up to Server 2022.

I have added a new "Get KnownFolder Path..." script function to SetupBuilder 2022 to support KNOWNFOLDERID values.

Thank you for your suggestion !!!

Friedrich

MarkRiffey
03-17-2022, 09:51 AM
Awesome, Friedrich. Thank you:)

Mark