Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo, ich versuche die Metadaten einer Datei zu bearbeiten.

Mein Ansatz war bisher dieser:
 

NuGet Pakete:
Microsoft.WindowsAPICodePack-Shell by Microsoft
Microsoft.WindowsAPICodePack-Core by Microsoft
using Microsoft.WindowsAPICodePack.Shell;
using Microsoft.WindowsAPICodePack.Shell.PropertySystem;

string filePath = @"C:\temp\example.docx";
var file = ShellFile.FromFilePath(filePath);

// Read and Write:

string[] oldAuthors = file.Properties.System.Author.Value;
string oldTitle = file.Properties.System.Title.Value;

file.Properties.System.Author.Value = new string[] { "Author #1", "Author #2" };
file.Properties.System.Title.Value = "Example Title";

// Alternate way to Write:

ShellPropertyWriter propertyWriter =  file.Properties.GetPropertyWriter();
propertyWriter.WriteProperty(SystemProperties.System.Author, new string[] { "Author" });
propertyWriter.Close();

 

leider löst der Code bei mir folgenden Error aus:

Microsoft.WindowsAPICodePack.Shell.PropertySystem.PropertySystemException: "Unable to get writable property store for this property."

Ich konnte keine Lösung zu diesem Problem finden und mir gehen die Ideen aus, wie ich meine Vorstellung umsetzen kann.

Hat jemand eine Idee?

Bearbeitet von TheWorldDrown

Das WindowsAPICodePack-Shell wurde das letzte Mal 2014 geupdated...und wird meines Wissens nicht weitergeführt.

https://www.nuget.org/packages/WindowsAPICodePack-Shell/

Windows 10 kam 2015 auf den Markt. Mich würde es nicht wundern, wenn diese Lösung nicht mehr funktioniert und auch nicht mehr supported wird.

Edit:

Du kannst diese Property nicht verändern:

https://stackoverflow.com/questions/5337683/how-to-set-extended-file-properties/37987288

Hast du das docx mit Word erstellt, oder über das Kontextmenü? Wenn ich eins übers Kontextmenü erstelle, dann kann ich auch keine Props verändern.

Bearbeitet von KeeperOfCoffee

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.