@echo off rem setlocal set javaapp=com.dell.suu.app.SUUMain set homedir=%~dp0 set appname=DellSUU set appcommand=%~nx0 set javapath=%homedir%java\windows\i386\bin set suupath=%homedir%bin\windows set logging=-Djava.util.logging.config.file=suuapp.properties path=%javapath%;%suupath%;%path% set CLASSPATH=%homedir%;%homedir%etc;%homedir%etc/guiproperties;%homedir%lib/DellSUU.jar;%homedir%lib/xercesImpl.jar;%homedir%lib/xml-apis.jar;%homedir%lib/OMCF.jar;%homedir%lib/images.jar REM DISPLAY WELCOME MESSAGE echo ------------------------------------------------ echo Welcome to the Dell OpenManage Server Update Utility. echo Copyright (c) 2003-2009 Dell Inc. All Rights Reserved. more +1 "%homedir%"etc\build-version.txt if y%1_y==y_y set argsgetOS=0 if not y%1_y==y_y set argsgetOS=1 set arg1=_a1 set arg2=_a2 set arg3=_a3 if not p%1_p==p_p set arg1=%1 if not p%2_p==p_p set arg2=%2 if not p%3_p==p_p set arg3=%3 set args=%1 shift :getargs if x%1_x==x_x goto checkOS set args=%args% %1 shift goto getargs :checkOS pushd %homedir% if %argsgetOS%==0 "%suupath%"\getOS.exe -suubatch if %argsgetOS%==1 "%suupath%"\getOS.exe %args% set isCore=%errorlevel% if %isCore%==2 goto :showhelp REM if %isCore%==3 goto :checklocaladmin if %isCore%==0 goto :suu :showhelp java -DdebugEnabled=false -Dapp.name=%appname% -Dapp.home="%homedir%.\\" -Dapp.cmd=%appcommand% %logging% %javaapp% goto :end REM :checklocaladmin REM set args=%args% -uacon :suu if x%arg1%_1==x_a1_1 goto run if %arg1%_1==-g_1 ( if x%arg2%_2==x_a2_2 ( goto runapp ) if x%arg2%_2==x-d_2 ( if x%arg3%_3== x_a3_3 ( goto run ) else ( goto runapp ) ) goto run ) if %arg1%_1==-gui_1 ( if x%arg2%_2==x_a2_2 ( goto runapp ) if x%arg2%_2==x-d_2 ( if x%arg3%_3== x_a3_3 ( goto run ) else ( goto runapp ) ) goto run ) if %arg1%_1==-e_1 ( if x%arg2%_2==x_a2_2 ( goto runapp ) if x%arg2%_2==x-d_2 ( if x%arg3%_3== x_a3_3 ( goto run ) else ( goto runapp ) ) goto run ) if %arg1%_1==-n_1 ( if x%arg2%_2==x_a2_2 ( goto runapp ) if x%arg2%_2==x-d_2 ( if x%arg3%_3== x_a3_3 ( goto run ) else ( goto runapp ) ) goto run ) if %arg1%_1==-u_1 ( if x%arg2%_2==x_a2_2 ( goto runapp ) if x%arg2%_2==x-d_2 ( if x%arg3%_3== x_a3_3 ( goto run ) else ( goto runapp ) ) goto run ) if %arg1%_1==-update_1 ( if x%arg2%_2==x_a2_2 ( goto runapp ) if x%arg2%_2==x-d_2 ( if x%arg3%_3== x_a3_3 ( goto run ) else ( goto runapp ) ) goto run ) if %arg1%_1==-upgradeonly_1 ( if x%arg2%_2==x_a2_2 ( goto runapp ) if x%arg2%_2==x-d_2 ( if x%arg3%_3== x_a3_3 ( goto run ) else ( goto runapp ) ) goto run ) if %arg1%_1==-downgradeonly_1 ( if x%arg2%_2==x_a2_2 ( goto runapp ) if x%arg2%_2==x-d_2 ( if x%arg3%_3== x_a3_3 ( goto run ) else ( goto runapp ) ) goto run ) if %arg1%_1==-d_1 ( if x%arg2%_2==x_a2_2 ( goto run ) else ( if x%arg3%_3==x-g_3 goto runapp if x%arg3%_3==x-gui_3 goto runapp if x%arg3%_3==x-u_3 goto runapp if x%arg3%_3==x-update_3 goto runapp goto run ) ) if %arg1%_1==-directory_1 ( if x%arg2%_2==x_a2_2 ( goto run ) else ( if x%arg3%_3==x-g_3 goto runapp if x%arg3%_3==x-gui_3 goto runapp if x%arg3%_3==x-u_3 goto runapp if x%arg3%_3==x-update_3 goto runapp goto run ) ) goto run :runapp "%suupath%"\NetWorkFinder.exe "%homedir%" set isnetworkpath=%errorlevel% if %isnetworkpath%==0 goto run if %isnetworkpath%==1 goto neterr if %isnetworkpath%==2 goto netrun if %isnetworkpath%==3 goto net_temp :neterr echo Error : Not enough disk space to run SUU! echo You should have at least 50 MB of space available to run SUU. goto end :net_temp goto end :netrun "%suupath%"\CryptoSecureRNG.exe set randomNum=%errorlevel% if %randomNum%==0 goto temperr set stemp=%temp%\%randomNum% goto drun :temperr echo ERROR: Couldn't create temporary directory for copying SUU files. echo Exiting the application.... goto end :drun mkdir %stemp% attrib +r +h %stemp% echo ------------------------------------------------ echo A temporary directory has been created as %stemp% echo Copying SUU files into the temporary directory... copy /v /z "%homedir%"java\windows\i386\suu_jre.zip %stemp% copy /v /z "%homedir%"bin\Windows\suu_jar.zip %stemp% copy /v /z "%homedir%"bin\Windows\BundleApp.exe %stemp% echo ------------------------------------------------ echo Extracting files to run SUU... "%suupath%\unzip.exe" -q %stemp%\suu_jre.zip -d %stemp%\ "%suupath%\unzip.exe" -q %stemp%\suu_jar.zip -d %stemp%\ del %stemp%\suu_jre.zip del %stemp%\suu_jar.zip attrib +r +h %stemp%/*.* /s /d echo Preparing SUU to Launch... set javapath=%stemp%\java\windows\i386\bin set path=%javapath%;%path% set CLASSPATH=%homedir%;%homedir%etc;%homedir%etc/guiproperties;%stemp%\DellSUU.jar;%stemp%\xercesImpl.jar;%stemp%\xml-apis.jar;%stemp%\OMCF.jar;%stemp%\images.jar %javapath%\java -DdebugEnabled=false -Dapp.name=%appname% -Dapp.home="%homedir%.\\" -Dapp.cmd=%appcommand% -Dapp.isnetworkpath=%isnetworkpath% -Dapp.bundleAppTempPath=%stemp% %logging% %javaapp% %args% set suuerrorlevel=%errorlevel% REM Introducing a sleep of 5 sec. Required for Win2KSp4 OS. Refer DF127421. ping 127.0.0.1 -n 1 -w 5000 > NUL rmdir /s /q %stemp% goto end :run java -DdebugEnabled=false -Dapp.name=%appname% -Dapp.home="%homedir%.\\" -Dapp.cmd=%appcommand% %logging% %javaapp% %args% set suuerrorlevel=%errorlevel% :end EXIT /B %suuerrorlevel% popd endlocal