Empty Trash Question

I have a restart/shut down housekeeping script that ends with a script that calls for “Empty Trash”. But, the original script (below) seems to reset the Trash warning.

tell application "Finder"
	try
		empty trash
	end try
end tell

So, gathering info from a previous post of mine here, I came up with a “Try Empty Trash” script (below).

tell application "Finder"
	try
		tell trash
			set warningState to warns before emptying
			set warns before emptying to false
			empty
			set warns before emptying to warningState
		end tell
	end try
end tell

So my question, is this the best possible way to implement “Try”, and still maintain the Empty Trash warning?

Edit: Well, my idea doesn’t seem to work, the Trash warning is still reset after both a restart and a shut down. So, looking for suggestions on how to solve.

Seem to have stumbled upon a solution, this works (below).

try
	tell application "Finder"
		activate
		empty trash
	end tell
end try