Function CheckForScreens()
	Dim fso, msg, objFSO, objFolder,colFiles,counted,temp, Installdir
	Installdir=Session.Property("APPDIR")&"Settings\Screens"
	Set fso = CreateObject("Scripting.FileSystemObject")
	counted=0
	WriteToLog("CheckForScreens: Looking for "&Installdir)
	If (fso.FolderExists(Installdir)) Then
		WriteToLog("CheckForScreens: Found existing screens folder, checking contents..")
		Set objFSO = CreateObject("Scripting.FileSystemObject")
		Set objFolder = objFSO.GetFolder(Installdir)
		Set colFiles = objFolder.Files
		For Each objFile in colFiles
			WriteToLog("CheckForScreens: found "&objFile.Name)
			' only count XML files, as these are the ones we're interested in
			If UCase(Right(objFile.Name,3))="XML" then
				counted=counted+1
			End if
		Next
		WriteToLog("CheckForScreens: found "&Cstr(counted)&" XML screens")
		if counted > 0 then
			WriteToLog("CheckForScreens: returned=0")
			Session.Property("APERTA_DEFAULTSCREENSEMPTY")="0"
		else
			WriteToLog("CheckForScreens: returned=1")
			Session.Property("APERTA_DEFAULTSCREENSEMPTY")="1"
		end if
	Else
		WriteToLog("CheckForScreens: returned=1")
		Session.Property("APERTA_DEFAULTSCREENSEMPTY")="1"
	End If
	If Session.Property("APERTA_DEFAULTSCREENSEMPTY")="1" Then
		' set the default screen feature to ON
		Session.FeatureRequestState("DefaultScreens") = msiInstallStateLocal
	else
		' set it off
		Session.FeatureRequestState("DefaultScreens") = msiInstallStateAbsent
	End if
End Function