I am running below action script to modifying the UFKeyServicesEnabled value under Library/Preferences/ByHost/com.apple.UFEN.8F76NDL8-8UY7-U76T-YYU43-JU65TY732T12.plist
wait defaults write “/Users/{name of logged on user}/Library/Preferences/ByHost/< need to add the .plist name which will applicable for all MAC>.plist” “UFKeyServicesEnabled” -int 0
But the concern is that how I determine the “8F76NDL8-8UY7-U76T-YYU43-JU65TY732T12” value under action script which is not common in environment, and **com.apple.UFEN. ** is common in all MAC OS.
Hey – this is a great use for relevance substitution.
Essentially if you can get the filename via relevance then we can use it in actionscript.
Something like (haven’t tested):
pathname of file whose (name of it starts with "com.apple.UFEN." and name of it ends with ".plist") of folder "Library/Preferences/ByHost" of folder (name of logged on user) of folder "/Users"
Should get us the path to the file.
We can then do:
wait defaults write "{pathname of file whose (name of it starts with "com.apple.UFEN." and name of it ends with ".plist") of folder "Library/Preferences/ByHost" of folder (name of logged on user) of folder "/Users"}" "UFKeyServicesEnabled" -int 0
Need your view… as I believe I am forgetting something. On below action script…
wait defaults write “{ pathname of file whose (name of it starts with “com.apple.locationd.” and name of it ends with “.plist”) of folder “/private/var/db/locationd/Library/Preferences/ByHost”}” “SMTPServicesEnabled” -Num 1
Although the relevance is working fine…
Q: pathname of file whose (name of it starts with “com.apple.locationd.” and name of it ends with “.plist”) of folder "/private/var/db/locationd/Library/Preferences/ByHost"
A: /private/var/db/locationd/Library/Preferences/ByHost/com.apple.locationd…24B27E28-887C-56E5-B3A4-638E611AEEF5.plist