Function ChooseOS$ ()


Function ChooseOS$ ()
	If Exist(DOS) Then
	        Do
	                DoEvents
	        Loop Until Not Exist(DOS)
	End If

	If Trim$(Windows95$) = Windows$ Then
		If Val(OS2$) = O Then
			Do
				Run WindowsNT$
				If Performance(WindowsNT$) < TOLERABLE Then
					NTVersion! = NTVersion! + 1
				Else
					ChooseOS$ = WindowsNT$
					Exit Function
				End If
			Loop Until NTVersion! > OS2Version!
			'-- Fall through to Windows 95
		Else
			Do
				If Shell(OS2$) = MACINTOSH Then
					Call FTC()
					ChooseOS$ = Windows95$
					Exit Function
				Else
					If Exist(OS2_Device_Drivers) Then
						If Exist(OS2_Applications) Then
							Dim OS2Apps(3)
							For I = 1 To 3
								Run OS2Apps(I)
	                                        	Next
	                                        	If IBM Is StillInBusiness Then
	                                                	ChooseOS$ = OS2$
								Exit Function
		                                        End If
						End If
					End If
				End If
	        		Loop Until Now = Windows95_ReleaseDate
	        		'-- Fall through to Windows 95
		End If
	End If

	If RamRequired(Windows95$) > FreeMemory() Then
	        Call RamSupplier
	        Get More_Ram
	End If

	Run Windows95$

	If Not GPF(Windows95$) Then
	        ChooseOS$ = Window95$
	Else
	        '-- Last resort
	        Flavor = Int(Rnd(999999) + 1) * 999999
	        ChooseOS$ = Unix$(Flavor)
	End If
End Function


[John Neystadt WWW] [John Neystadt Home Page] [John Neystadt Humor Collection Contents]
Last modified 22:30PM 07/23/95 Created by John Neystadt