check defaults read com.apple.Preview NSQuitAlwaysKeepsWindows set to true to save windows defaults write com.apple.Preview NSQuitAlwaysKeepsWindows -bool true