I'm a programmer and am tasked with the following problem for my Windows application, which performs a reset/change of the Apple Safari web-browser preferences, the home-page setting in particular. I'm running Windows 7.

Various resources on the www mention the following file as storing the home-page configuration setting: "C:\Users\USER10\AppData\Roaming\Apple Computer\Preferences\com.apple.Safari.plist"

Also, using ProcessMonitor to monitor file-system writes when manually (in the web-browser configuration/settings screen) changing the home-page configuration setting confirms that this file is being written to.

The routine in the application that is tasked with changing the web-browser home page calls the plutil.exe utility to convert this file to XML format and then back to the original binary format after making the required settings-change to the XML file. The intention here is to programatically change the home-page setting of the web-browser.

The command being run (by the application) is:

C:\Program Files (x86)\Safari\Apple Application Support\plutil.exe -convert xml1 -o C:\temp\com.apple.Safari.plist.xml C:\Users\USER10\AppData\Roaming\Apple Computer\Preferences\com.apple.Safari.plist

However if I delete this file (com.apple.Safari.plist), and then manually (in a CMD prompt) run the plutil command with the same parameters as earlier (although this settings file is now missing) I find that the command works without error, and it writes the xml version of the file with a home-page setting that was previously used (ie. a home-page setting that was not the current setting in the web-browser at the time that the browser was closed and the settings file deleted, but one that was used earlier).

The above described behavior infers that the settings are being stored somewhere else, and that plutil.exe retrieves those settings from another location. Perhaps there is another location on the filesystem where the web-browser settings are being cached?

Thanks in advance for any advice/input.

  • 1
    Which files does plutil.exe access (Process Monitor)? – Bob Jul 23 '12 at 7:37
  • 1
    Are you sure Safari didn't write that plist back out as soon as you deleted it? – Spiff Jul 23 '12 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.