write "" write "---- Platform Detection Inputs ----" write " OS: %OS" write " OS_VERSION: %OS_VERSION" write " PLATFORM: %PLATFORM" write " WINVER: %WINVER" write "NETWARE_REQUESTER: %NETWARE_REQUESTER" write " SHELL_TYPE: %SHELL_TYPE" write " SHELL_VERSION: %SHELL_VERSION" write " MACHINE: %MACHINE" write " SMACHINE: %SMACHINE" break on ; So that the NW Documentation works properly set nwlanguage="English" ;---------------------------- Load options ---------------------------- ; These are the defaults: temp set pause_at_end="no" temp set phasers_at_end="no" temp set start_nal="yes" temp set nal_type="auto" temp set platform_override="" temp set wland="yes" OPTLOOP: if "%2"=="pause" then temp set pause_at_end="yes" if "%2"=="phasers" then temp set phasers_at_end="yes" if "%2"=="skipnal" then temp set start_nal="no" if "%2"=="nalwindow" then temp set nal_type="window" if "%2"=="skipwland" then temp set wland="no" if "%2"=="PLAT_OS2" then temp set platform_override="%2" if "%2"=="PLAT_DOS" then temp set platform_override="%2" if "%2"=="PLAT_WIN3" then temp set platform_override="%2" ; NT3 with Microsoft or Novell client if "%2"=="PLAT_NT3_NOV" then temp set platform_override="%2" if "%2"=="PLAT_NT3_MS" then temp set platform_override="%2" ; Win32 for NT 4.0+ or Windows 95+ if "%2"=="PLAT_WIN32_NOV" then temp set platform_override="%2" if "%2"=="PLAT_WIN32_MS" then temp set platform_override="%2" shift if "%2"<>"" THEN GOTO OPTLOOP ;---------------------------- Platform & API Detection ---------------------------- write "" write "Detecting platform..." temp set client="unknown" temp set novell_client="no" temp set detected_platform="unknown" temp set win16="no" temp set win32="no" temp set nt3="no" temp set is_os2="no" temp set is_windows="no" ; DOS is: ; OS="MSDOS" ; OR OS="NWDOS" ; Windows 3.x is: ; PLATFORM="WIN" ; Windows 9x is: ; OS="WIN95" ; OR OS="WIN98" ; OR (OS="MSDOS" OR (OS_VERSION="V7.00" OR OS_VERSION="V7.10")) ; Windows NT is: ; OS="WINNT" ; OR OS="V5.00" ; OR (OS="" AND NETWARE_REQUESTER="V1.20" AND SHELL_TYPE="V3.26A") ; Detect Windows 3.x if "%PLATFORM"="WIN" then temp set detected_platform="Windows 3" ; Only client32 supports logging in from Windows 3.x temp set client="Novell Client32 for DOS/Windows" temp set novell_client="yes" temp set is_windows="yes" end ; Detect Windows 9x with the Novell client if OS="WIN95" OR OS="WIN98" then temp set detected_platform="Windows 9x" temp set client="Novell Client32 for 95/98" temp set novell_client="yes" temp set is_windows="yes" end ; Detect Windows NT with the Novell client (OS="WINNT") ; OR Microsoft client on NT4 or 2000 (OS="V5.00") if OS="WINNT" or OS="V5.00" then temp set detected_platform="Windows NT" temp set is_windows="yes" if OS_VERSION<"V4.00" then ; We want to detect Windows NT 3.x because it doesn't support NAL Explorer temp set nt3="yes" end if OS="V5.00" then temp set client="Microsoft Client Service for NetWare" else temp set client="Novell Client for NT" temp set novell_client="yes" end end ; Detect Windows XP with the Microsoft client if OS="" and NETWARE_REQUESTER="V1.20" and SHELL_TYPE="V3.26A" then temp set detected_platform="Windows NT" temp set client="Microsoft Client Service for NetWare" temp set is_windows="yes" end ; Detect Windows 9x with the Microsoft client if OS="MSDOS" and OS_VERSION>="V7.00" then temp set detected_platform="Windows 9x" temp set client="Microsoft Client for Netware Networks assumed (could be MS-DOS 7.x)" temp set is_windows="yes" end ; Detect OS/2 if OS="OS2" then temp set is_os2="yes" if OS_VERSION="v10.30" ; IBM OS/2 v1.3 temp set detected_platform="OS/2 1.x" else temp set detected_platform="OS/2 2.0+" end temp set client="NetWare Requester for OS/2" temp set novell_client="yes" end ; Detect DOS if ="unknown" and OS="MSDOS" or OS="NWDOS" then temp set detected_platform="DOS" ; Detect client. We'll assume its a Novell one (Microsoft didn't make a DOS client) temp set novell_client="yes" if NETWARE_REQUESTER="V32.00" then temp set client="Novell Client32 for DOS/Windows" else if SHELL_VERSION >= "V4.00" temp set client="Novell DOS Requester (VLM)" else temp set client="Workstation Shell (NETX) - assumed" end end end if !="" then write "Platform override!" temp set client="Unknown Novell Client" temp set novell_client="yes" temp set detected_platform="unknown" temp set win16="no" temp set win32="no" temp set nt3="no" temp set is_os2="no" temp set is_windows="no" if ="PLAT_OS2" then temp set is_os2="yes" temp set detected_platform="OS/2 2.0+" end if ="PLAT_DOS" then temp set DETECTED_PLATFORM="DOS" end if ="PLAT_WIN3" then temp set DETECTED_PLATFORM="Windows 3" temp set is_windows="yes" end if ="PLAT_NT3_NOV" then temp set DETECTED_PLATFORM="Windows NT" temp set NT3="yes" temp set is_windows="yes" end if ="PLAT_NT3_MS" then temp set DETECTED_PLATFORM="Windows NT" temp set NT3="yes" temp set NOVELL_CLIENT="no" temp set is_windows="yes" end if ="PLAT_WIN32_NOV" then temp set DETECTED_PLATFORM="Windows NT" temp set is_windows="yes" end if ="PLAT_WIN32_MS" then temp set DETECTED_PLATFORM="Windows NT" temp set NOVELL_CLIENT="no" temp set is_windows="yes" end if !="yes" then temp set CLIENT="Unknown Microsoft Client" end end ; Done with detecting platforms, now set available APIs. if ="Windows 3" then temp set win16="yes" temp set win32="no" end if ="Windows 9x" or ="Windows NT" then temp set win16="yes" temp set win32="yes" end if ="OS/2 2.0+" then temp set win16="yes" temp set win32="no" end if ="DOS" then temp set win16="no" temp set win32="no" end ;---------------------------- WinLAND Agent ---------------------------- ; Don't run WLAND for software installer user. if "%login_name"="swinst" then temp set wland="no" end ; (this is a hardware/software inventory thing from Seagate Software, ; part of the Seagate Desktop Manangement Suite) if ="yes" then write "Running WinLAND Agent..." MAP Z:=VNW411\SYS:\WLAND\AGENTS #Z:DOS_AG.COM ; This installs something into win.ini (on 3.x at least) which will ; result in errors if you start windows without logging in. ; #Z:AG_INST.EXE PATH=\\VNW411\SYS\WLAND\AGENTS ; Better to just run the agent ourselves if we detect we're running ; under windows. if ="yes" then ; This should start the appropriate agent (win_16.exe, win_95.exe, win_nt.exe) ; for us. It seems to have issues being run from the login script under ; Windows 3.x though. @\\VNW411\SYS\WLAND\AGENTS\WIN_AG.EXE end MAP DEL Z: end ;---------------------------- Map Drives ---------------------------- write "Mapping drives..." map display off map errors off ; Map home drive (but not for supervisor or admin) if "%LOGIN_NAME"<>"SUPERVISOR" AND "%LOGIN_NAME"<>"ADMIN" then map R H:=%home_directory end map R S:=vnw411\sys:shared ; ; DOS and Win16 are always mapped as all platforms can run DOS apps and all ; platforms can run Win16 software except DOS but DOS users can just type ; win to fix that problem. ; map R Y:=vnw411\apps1:apps\dos map R X:=vnw411\apps1:apps\win16 map R V:=vnw411\apps1:apps\install\installD map R U:=vnw411\apps1:apps\install\install1 ; ; Map drives for OS/2 Only. ; if ="yes" then ; These are in the default OS/2 login script map L:=%FILE_SERVER\SYS:LOGIN map P:=%FILE_SERVER\SYS:PUBLIC ;Only OS/2 can run OS/2 software map R W:=vnw411\apps1\apps\os2 map R T:=vnw411\apps1\apps\install\installO2 ; Available OS2-exclusive drives: Z end ; ; Map drives for Win32 Only (9x/NT) ; if ="yes" then map R W:=vnw411\apps2:apps\win32 map R T:=vnw411\apps2:apps\install\install32 end ; ; Map drives for DOS/Win16 only (OS/2, 9x, NT excluded) ; ;if ="no" and ="no" then ; This could be for network-booted DOS systems ; ; Drives W and T are currently available for use on ; DOS systems. ;end ; ; Map drives for all DOS and Windows systems ; (that is, not OS/2 which does not support search drives) ; if ="no" then map INS R S1:=Z:=%FILE_SERVER\SYS:PUBLIC ; For network booted DOS machines if ="no" then map INS R S2:=T:=%FILE_SERVER\SYS:PUBLIC\%MACHINE\%OS\%OS_VERSION end end ; ; Map drives for network booted Windows 95 ; ; TODO: Detect somehow if the system is booting over the network (check for a C drive?) ; For now we'll just give these to Windows 9x systems using the MS client as ; currently only netbooted Windows 95 is the only 9x configuration that routinely ; uses the MS client. if ="Windows 9x" and ="no" then ; Map drive for network booting systems map R R:=vnw411\sys:netsys\sbs map R Q:=vnw411\sys:netsys\machines end ; ; Map drives common to all systems - these just get the next free drive letter ; map N:=%FILE_SERVER\SYS: if "%LOGIN_NAME"="SUPERVISOR" OR "%LOGIN_NAME"="ADMIN" then map *1:=%FILE_SERVER\SYS:SYSTEM end ;---------------------------- NAL ---------------------------- ; NAL works on Windows 3.1 and up as well as NT 3.51 and up ; NAL Explorer works on Windows 9x and NT 4.0+ ; In both cases the proper Novell client is required. ; ; This will produce a pair of errors on DOS machines as the login ; command doesn't recognise the @ command. This doesn't look very ; nice but it can be safely ignored. ; if ="yes" then if ="yes" and ="no" and !="DOS" then ; Some form of NAL is supported. if ="window" then @Z:\nal.exe /min else if ="yes" and ="no" then ; On 9x and NT 4.0+ we'll use NAL Explorer write "Starting NAL Explorer..." @Z:\nalexpld.exe else if ="yes" then ; 16bit Windows ot NT 3.x - run NAL minimised write "Starting NAL..." @Z:\nal.exe /min else ; DOS ; We could use the addicon tool to add it to the startup ; program group. But better to let the user start it manually ; so they're not bothered by it trying to start if they haven't ; logged in. write "Skipping NAL: Can not start from DOS" end end end else write "Skipping NAL: not supported on this platform" end else write "Skipping NAL!" end ;---------------------------- Output Results ---------------------------- ; ; Output detection results ; These are output at the end mostly to mask the errors from ; the NAL code above on DOS systems. ; write "--- Platform Detection Results ---" write "Platform: %" write "Win16 Available: %" write "Win32 Available: %" write "NetWare Client: %" write "Is Novell Client: %" write "Is NT 3.x: %" write "Is OS/2: %" write "" write "Good %GREETING_TIME, %FULL_NAME!" LASTLOGINTIME write "" map display on ;map if ="yes" then fire phasers end if ="yes" then pause end