Hi Mark,

if the function succeeds, the %_SB_ERRORCODE% return value is nonzero and contains the number of found items. If you check this before running the uninstall and it returns a value >0 then the pending file operations are from another install / uninstall.

BTW, I have another idea on how to handle your scenario. If you are interested, I can develop and upload a quick demo.