home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 May
/
W2KPRK.iso
/
apps
/
smartsketch_le
/
data1.cab
/
program_bin
/
regplat.bat
< prev
next >
Wrap
DOS Batch File
|
1999-11-02
|
6KB
|
170 lines
REM Platform registration
if not "%REGISTERDEBUG%"=="DEBUG" set REGISTERDEBUG=
REM ------------------------------------------------------------------------
REM Setup the temp directory
if not exist %temp% set temp=c:\temp
if not exist %temp% set temp=c:\
REM ------------------------------------------------------------------------
REM Determine what the rgt file name is and cleanup any old one.
if "%1"=="" goto DEFAULT
if exist "%temp%\%1" del %temp%\%1
set regfile=%temp%\%1
goto REGISTER
:DEFAULT
if exist "%temp%\ingrreg.rgt" del %temp%\ingrreg.rgt
set regfile=%temp%\ingrreg.rgt
goto REGISTER
REM ------------------------------------------------------------------------
REM Concatenate the Registry files together
:REGISTER
set errfile=%temp%\ingrreg.err
if exist "%platregpath%baseprod.txt" type "%platregpath%baseprod.txt" >> %regfile%
if exist "%platregpath%mstnreg.txt" type "%platregpath%mstnreg.txt" >> %regfile%
if exist "%platregpath%cmtrans.txt" type "%platregpath%cmtrans.txt" >> %regfile%
if exist "%platregpath%acadreg.txt" type "%platregpath%acadreg.txt" >> %regfile%
if exist "%platregpath%cgmreg.txt" type "%platregpath%cgmreg.txt" >> %regfile%
rem if exist "%platregpath%imagcmd.txt" type "%platregpath%imagcmd.txt" >> %regfile%
REM Shared components
if exist "%platregpath%ObjTree.txt" type "%platregpath%ObjTree.txt" > %platregpath%Shared.txt
if exist "%platregpath%basprdsh.txt" type "%platregpath%basprdsh.txt" >> %platregpath%Shared.txt
if exist "%platregpath%cmtrnssh.txt" type "%platregpath%cmtrnssh.txt" >> %platregpath%Shared.txt
if exist "%platregpath%dispatch.txt" type "%platregpath%dispatch.txt" >> %platregpath%Shared.txt
if exist "%platregpath%Shared.txt" type "%platregpath%Shared.txt" >> %regfile%
REM The following components are DEVELOPMENT ONLY
if exist "%platregpath%appdev.txt" type "%platregpath%appdev.txt" >> %regfile%
if exist "%platregpath%devonly.txt" type "%platregpath%devonly.txt" >> %regfile%
if exist "%platregpath%symdev.txt" type "%platregpath%symdev.txt" >> %regfile%
if exist "%appregpath%%APPREGFILE%" type "%appregpath%%APPREGFILE%" >>%regfile%
if not exist "%appregpath%%APPREGFILE%" echo %appregpath%%APPREGFILE% not found >>%errfile%
if exist "%appregpath%%WRAPPERREGFILE%" type "%appregpath%%WRAPPERREGFILE%" >>%regfile%
if not exist "%appregpath%%WRAPPERREGFILE%" echo %appregpath%%WRAPPERREGFILE% not found >>%errfile%
if exist "%appregpath%debug.txt" type "%appregpath%debug.txt" >>%regfile%
REM ------------------------------------------------------------------------
REM Replace variable to make it application specific
Echo Replacing [APPNAME] with %APPNAME% in %regfile%
repl.exe [APPNAME] %APPNAME% %regfile%
if errorlevel 255 goto NOREPL
if errorlevel 1 goto bad_arg
REM do it twice because some lines contain 2 instances of [APPNAME]
repl.exe [APPNAME] %APPNAME% %regfile%
Echo Replacing [APPCLSID] with %APPCLSID% in %regfile%
repl.exe [APPCLSID] %APPCLSID% %regfile%
Echo Replacing [DOCCLSID] with %DOCCLSID% in %regfile%
repl.exe [DOCCLSID] %DOCCLSID% %regfile%
Echo Replacing [APPEXE] with %APPEXE% in %regfile%
repl.exe [APPEXE] %APPEXE% %regfile%
Echo Replacing [DOCEXT] with %DOCEXT% in %regfile%
repl.exe [DOCEXT] %DOCEXT% %regfile%
Echo Replacing [TEMPLATEPATH] with %TEMPLATEPATH% in %regfile%
repl.exe "[TEMPLATEPATH]" "%TEMPLATEPATH%" %regfile%
Echo Replacing [RESOURCEDLLNAME] with %RESOURCEDLLNAME% in %regfile%
repl.exe "[RESOURCEDLLNAME]" "%RESOURCEDLLNAME%" %regfile%
Echo Replacing [SOLUTIONSPATH] with %SOLUTIONSPATH% in %regfile%
repl.exe "[SOLUTIONSPATH]" "%SOLUTIONSPATH%" %regfile%
Echo Replacing [HELPDIR] with %HELPDIR% in %regfile%
repl.exe "[HELPDIR]" "%HELPDIR%" %regfile%
REM ------------------------------------------------------------------------
REM Register OCXs.
if exist %platregpath%regocx.bat call %platregpath%regocx.bat
REM Register the wizards
if exist %WIZARDDIR%regwiz.bat call %WIZARDDIR%regwiz.bat
REM Run REGTOOL to register the rgt file.
echo running regtool on %regfile%
regtool.exe %regfile%
if errorlevel 255 goto NOREGTOOL
REM ------------------------------------------------------------------------
REM Make a copy of the finished rgt file for Windows 95 users.
pushd "%APPPATH%\register"
if not exist win95 md win95
copy %regfile% "%APPPATH%\register\win95"
if exist "%appregpath%regocx.bat" copy "%appregpath%regocx.bat" "%APPPATH%\register\win95"
popd
goto done
REM ------------------------------------------------------------------------
:NOREPL
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo REPL.EXE Not in your PATH -- registration failed
echo See the TOOL SHED at "This Old Software House" homepage
echo at \\foundation\jpub\home\imag\swhouse.htm.
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
pause
goto done
:NOREGTOOL
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo REGTOOL.EXE Not in your PATH -- registration failed
echo See the TOOL SHED at "This Old Software House" homepage
echo at \\foundation\jpub\home\imag\swhouse.htm.
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
pause
goto done
:done
set REGTOOLAPPNAME=
set REGISTERDEBUG=
set APPNAME=
set APPCLSID=
set DOCCLSID=
set APPEXE=
set DOCEXT=
set TEMPLATEPATH=
set APPPATH=
set RESOURCEDLLNAME=
set APPREGFILE=
set WRAPPERREGFILE=
set filepath=
set SOLUTIONSPATH=
set DRAFTPATH=
@echo on