Wow I thought directly editing the desktop.ini file was a bit hack-ish but then I had a close look:
Add-Type -path "Microsoft.WindowsAPICodePack.dll"
Add-Type -path "Microsoft.WindowsAPICodePack.Shell.dll"
$shellobj = [Microsoft.WindowsAPICodePack.Shell.ShellObject]::FromParsingName($pwd)
$shellobj.Properties.System.Subject.Value = 'TestSubject'
The COM property writer yields an error (invalid cast) when trying to write to a folder's properties - Exception calling "GetPropertyWriter" with "0" argument(s): "Unable to get writable property store for this property."
When doing it from the C# side, you (try to) obtain an
This returns an HRESULT 0x80004002 (E_NOINTERFACE) when you pass GPS_READWRITE (0x2) but only on folders.