Approved

Check version of Notepad++ installed vs latest available

  REVIEWED by Sophos 

Followup to the Firefox query, repeating the process for Notepad++.

 

SQL published at https://gist.github.com/andrewmundellsophos/17ea7cd7614fc61c3046e64586c4186b and pasted below:

 

--Tested and working as of 2020-07-17
select
	version as Current,
	(
		select
			substr(
				result,(
					(
						select
							instr(result, 'Current Version ')
						from
							curl
						where
							url = 'https:' || '/' || '/' || 'notepad-plus-plus.org'
					) + 16
				),
				5
			) as Latest
		from
			curl
		where
			url = 'https:' || '/' || '/' || 'notepad-plus-plus.org'
	) as Latest
from
	programs
where
	name like '%notepad++%'
	and version < (
		select
			substr(
				result,(
					(
						select
							instr(result, 'Current Version ')
						from
							curl
						where
							url = 'https:' || '/' || '/' || 'notepad-plus-plus.org'
					) + 21
				),
				6
			) as Latest
		from
			curl
		where
			url = 'https:' || '/' || '/' || 'notepad-plus-plus.org'
	)