--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --%%% %%% --%%% This script tests for the presence of Spotify %%% --%%% %%% --%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function ir_GetSpotifyVersion() local bOK = false; local strVersion; local strFolder = ""; bOK = Registry.DoesKeyExist(HKEY_CURRENT_USER, "Software\\Spotify"); if (bOK) then strFolder = Registry.GetValue(HKEY_CURRENT_USER, "Software\\Spotify", ""); if (Application.GetLastError() ~= 0) or (strFolder == "") then bOK = false; else local verInfo = File.GetVersionInfo(strFolder.."\\spotify.exe"); if(Application.GetLastError() ~= 0) then bOK = false; else return verInfo.ProductVersion end end end if (bOK ~= true) then strVersion = "0.0.0.0"; end return strVersion; end