home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 April
/
CMCD0404.ISO
/
Software
/
Demo
/
PCDUO
/
data1.cab
/
LANutil_Client_Common_Files
/
LUHBOOT.BAT
< prev
next >
Wrap
DOS Batch File
|
2003-11-28
|
5KB
|
187 lines
@ECHO OFF
ECHO -------------------------------------------------------------------------------
ECHO * Enterprise v2.01 DOS-Level Inventory Startup
ECHO *
ECHO * Copyright (c) 1992-2003 Vector Networks Limited
REM Last update : SB 07-Mar-03
REM This must run from the Client install directory which contains all of the
REM Client executables (especially the ADISCTRL file).
REM Check that we can find the LUHSETUP program
if exist LUHSETUP.EXE goto imageok
ECHO *
ECHO * ERROR : Unable to find the Client software in the current directory.
ECHO *
goto badhw
:IMAGEOK
REM We have found the image OK. Now we check for any setup batch file, and
REM execute it first if we find it
REM
REM The STARTSR1 batch file will be executed if it is found in the install
REM directory.
if exist STARTSR1.BAT goto DOSR1
goto setupdone
:DOSR1
REM Assume that we are not expected to delete this file automatically
SET LUTIDY=
CALL STARTSR1
REM Now see if we are supposed to wipe that file, now that it's been executed
if %LUTIDY%. == . goto SETUPDONE
DEL STARTSR1.BAT
SET LUTIDY=
:SETUPDONE
ECHO -------------------------------------------------------------------------------
ECHO * Updating Hardware Inventory information. Please wait...
ECHO *
REM We run CPUCHK from here, with debugging enabled if appropriate
REM
REM Note also that CPUCHK is not present on the 32-bit Audit floppy (as it won't fit!)
IF NOT EXIST CPUCHK.EXE GOTO SKIPCP
if "%1%" == "/d" goto cpudbg
CPUCHK
goto SKIPCP
:CPUDBG
CPUCHK -d
:SKIPCP
REM Make sure that there is a hardware inventory .LOG file present. If
REM there isn't, call LUHSETUP to create one before checking the inventory.
REM We must be in the main install directory to run this as we need ADISCTRL
REM in the default directory.
IF EXIST LUHDWCHK.LOG GOTO CHECKHW
REM The LUHSETUP /M option disables the display of unrecognised BIOS codes.
LUHSETUP /M
REM If LUHSETUP worked OK we should have a .LOG file now
IF NOT EXIST LUHDWCHK.LOG GOTO BADHW
:CHECKHW
REM For support of Windows NT we snapshot the output from a VER command
IF NOT "%OS%" == "Windows_NT" GOTO HWNOVER
VER >LUHDWCHK.VER
:HWNOVER
REM Now actually take the hardware inventory snapshot - this updates
REM LUHDWCHK.LOG. The "/N" option enables extra NetWare-specific tests
REM which should not cause any problems on non-NetWare PCs.
REM We can run this under a new command.com and tell it to respond with a Fail
REM to any Abort/Retry/Fail prompts (none should occur, but this makes it
REM safer because this procedure is normally run in a hidden window, so
REM any prompts could cause an effective hang).
REM
REM However, LUHDWCHK has been modified and should not provoke these errors
REM and the very 'safety measure' of running under another COMMAND can
REM provoke the same error if the local PATH references an invalid drive
REM before it lists the Windows directory! So, we now run LUHDWCHK directly
REM and leave the COMMAND /F alternative commented out to be used in cases
REM of poorly written CD drivers
if "%1%" == "/d" goto hdwdbg
REM command /f /c LUHDWCHK /Q
LUHDWCHK /Q
if errorlevel 1 goto BADCHK
goto HDWDONE
:HDWDBG
:BADCHK
REM Run LUHDWCHK (perhaps again) and make a .STP file
LUHDWCHK /S /Q
if errorlevel 1 goto BADHW
if not exist LUHDWCHK.STP goto BADHW
:HDWDONE
REM Now we collect/update DMI data from any DMI-compliant BIOS
REM ** REM-out the following GOTO if you wish to run the DOS-level
REM ** LUSMBIOS program. Enterprise normally uses the LUSMBIOS16
REM ** Windows application instead, but only on Win32 platforms, so if
REM ** you want DMI BIOS interrogation on Win16, this is a way to do it!
goto DMIDONE
if "%1%" == "/d" goto dmidbg
LUSMBIOS /Q
if errorlevel 1 goto BADHW
goto DMIDONE
:DMIDBG
LUSMBIOS
REM if errorlevel 1 goto BADHW
:DMIDONE
REM Now we check for any other procedure to be executed now that we've run the
REM Client software. See the comments for STARTSR1 for more explanation.
if exist STARTSR2.BAT goto DOSR2
goto tweakdone
:DOSR2
REM Assume that we are not expected to delete this file automatically
SET LUTIDY=
CALL STARTSR2
REM Now see if we are supposed to wipe that file, now that it's been executed
if %LUTIDY%. == . goto tweakdone
DEL STARTSR2.BAT
SET LUTIDY=
:TWEAKDONE
ECHO *
ECHO * Enterprise DOS-Level Inventory Startup completed successfully
ECHO -------------------------------------------------------------------------------
goto end
:BADHW
ECHO *
ECHO * The Enterprise DOS-level Hardware Inventory update failed
ECHO *
:ERRMSG
ECHO * Please report this to your Network Manager or Support Staff
ECHO -------------------------------------------------------------------------------
REM If we are running in debug mode, then we presume we are in a visible window
REM and can prompt the user
if "%1" == "" goto END
pause
:END