@echo off if "%HOMEDRIV%%HOMEDIR%"=="" goto error rem rem *** If FORCEDRIVE is set, change HOMEDRIV to FORCEDRIVE *** rem if NOT "%FORCEDRIVE%"=="" set HOMEDRIV=%FORCEDRIVE% rem rem *** If the target drive does not exist, change it to C: *** rem if NOT exist %HOMEDRIV%\nul set HOMEDRIV=C: echo Installing to %HOMEDRIV%%HOMEDIR% rem rem *** Continue with the process of creating directories *** rem set update=NO if "%A1%"=="-u" set update=YES rem rem *** See if the person's home directory exists and create it if it doesn't rem if exist %HOMEDRIV%%HOMEDIR%\*.* goto homethere set update=YES echo Making the %HOMEDRIV%%HOMEDIR% directory mkdir %HOMEDRIV%%HOMEDIR% :homethere rem rem *** See if the person's rp subdirectory exists and create it rem if exist %HOMEDRIV%%HOMEDIR%\rp\*.* goto rpthere set update=YES echo Making the %HOMEDRIV%%HOMEDIR%\rp directory mkdir %HOMEDRIV%%HOMEDIR%\rp copy c:\vgl_labs\thispod\wattcp.cfg %HOMEDRIV%%HOMEDIR%\rp :rpthere rem rem *** See if the person's BT subdirectory exists and create it rem if exist %HOMEDRIV%%HOMEDIR%\bt\*.* goto btthere set update=YES echo Making the %HOMEDRIV%%HOMEDIR%\bt directory mkdir %HOMEDRIV%%HOMEDIR%\bt copy c:\vgl_labs\thispod\wattcp.cfg %HOMEDRIV%%HOMEDIR%\bt :btthere rem rem *** Change to the right drive and directory rem %HOMEDRIV% cd %HOMEDIR% rem rem *** Call the update procedure if necessary, otherwise exit rem if NOT "%update%"=="YES" goto end call clearlog.bat call labs2.bat echo "Last Successful Update" > updated time > updated date > updated goto end :error echo. echo CHGTODIR: Environment variable HOMEDIR must be set! echo. :end