Variable PBSpace,5,74752 ;space needed for .exe modules Variable DocSpace,6,183296 ;space needed for doc files Variable TotSpace,6,317440 ;space needed for all Variable CurrFore,1 ;orig screen colors Variable CurrBack,1 Variable CurrAttr,1 Variable MonoBack,3,7 ;background color Variable ClearMsg,76," " Variable DOW,9 ;date variables Variable Mo,2 Variable Da,2 Variable Yr,4 Variable ClrBack,3,112 Variable MonoTitle,3,112 ;title color Variable ClrTitle,3,116 Variable MonoInfo,3,7 ;information box Variable ClrInfo,3,30 Variable InChar,1 Variable InString,79 Variable PBDrive,1 Variable DocDrive,1 Variable SourceDir,79 ;install modules Variable PBDir,79 ;powerbatch directory Variable DocDir,79 ;documentation directory Variable DiskTot,8 ;Disk size Variable DiskAvail,8 ;free space Variable Work,80 ;work area ?Color CurrFore,CurrBack,CurrAttr ;get current colors ?Date DOW,Mo,Da,Yr Clear ReadYN "Do you have a color monitor? [Y/N] ",InChar Compare InChar,"Y",,,ColorOK SetVar ClrBack,MonoBack ;set colors for mono SetVar ClrTitle,MonoTitle SetVar ClrInfo,MonoInfo Label ColorOK Color ClrBack ;reset default text attribute Clear Color ClrTitle Box1 5,1,75,6,ClrTitle ;draw title box Center "Installation Program",2 Center "POWERBATCH",3 Center "by",4 Center "Computing Systems Design, Inc.",5 WriteAt 6,5,DOW ;day of week GoToXY 64,5 ;date Write Mo Write "/" Write Da Write "/" Write Yr Color ClrInfo Box1 1,8,80,25,ClrInfo ;draw action box Center "´ Press Ctrl-Break To Terminate The Install Process Ã",25 WriteAt 3,9,"There are two groups of files on the PowerBatch installation disk. One" WriteAt 3,10,"group contains the modules necessary to create PowerBatch programs and" WriteAt 3,11,"one group contains documentation, examples, and informational files." WriteAt 3,13,"The modules necessary to create PowerBatch programs MUST be on your DOS" WriteAt 3,14,"search path. The other files you may locate in a directory not on your" WriteAt 3,15,"search path." Label GetSource WriteAt 3,17,"Enter the drive letter where the PowerBatch install modules are located " ReadUpKey InChar Write ":" WriteAt 3,18,"Enter the directory name where the PowerBatch install modules are located" WriteAt 3,19,"Source dir: \" ReadStr InString Concat SourceDir,InChar,":" Length Work,InString Compare Work,0,,,InpOK Concat SourceDir,"\" Label InpOK Concat SourceDir,InString Concat Work,SourceDir,"\POWERMAK.EXE" Upper Work ?FileExist Work,GetPBDir Clear CurrAttr Writeline Work WriteLine "The above specified directory does not contain the PowerBatch programs." WriteLine "Refer to the README.1ST file included with the PowerBatch software. To view" WriteLine "this file enter the following line and press enter" WriteLine " " WriteLine " TYPE README.1ST" Halt Label GetPBDir WriteAt 3,17,ClearMsg WriteAt 3,18,ClearMsg WriteAt 3,19,ClearMsg GotoXY 3,17 Write "Enter the drive letter where you will place the PowerBatch software " ReadUpKey PBDrive Write ":" WriteAt 3,18,"Enter a directory name on the DOS search path to place PowerBatch compiler" WriteAt 3,19,"Dir > \" ReadStr InString Upper InString Concat PBDir,PBDrive,":\" Concat PBDir,InString ?InPath PBDir,,NotInPath ;is this on the path ?DiskSpace PBDir,DiskTot,DiskAvail Compare DiskAvail,PBSpace,PBDirOK,NoPathSpace,PBDirOK Label NotInPath GoToXy 3,23 Write "Directory not on your DOS path...Re-enter" Goto ClrMsg Label NoPathSpace GoToXY 3,23 Write "Insufficient disk space. 73k required" Label ClrMsg Beep 750,8 ;alert user to error Wait 35 ;read the message GoToXY 3,23 Write ClearMsg WriteAt 3,17,ClearMsg WriteAt 3,19,ClearMsg GoTo GetPBDir Label PBDirOK WriteAt 3,17,ClearMsg WriteAt 3,18,ClearMsg WriteAt 3,19,ClearMsg WriteAt 3,17,"Enter the drive letter to receive the PowerBatch information files " ReadUpKey DocDrive Write ":" WriteAt 3,18,"Enter a directory name to receive the PowerBatch information files" WriteAt 3,19,"Dir > \" ReadStr InString Upper InString Concat DocDir,DocDrive,":\" Concat DocDir,InString ?DirExist DocDir,ChkDocSp GoToXY 3,23 ReadYN "Directory does not exist...Shall I create it for you [Y/N] ",InChar Beep 750,8 GoToXY 3,23 Write ClearMsg Compare InChar,"Y",,,MakDocDir WriteAt 3,19,ClearMsg WriteAt 65,17," " GoTo PBDirOK Label MakDocDir MD DocDir ?DirExist DocDir,,NoDir Label ChkDocSp ?DiskSpace DocDrive,DiskTot,DiskAvail Compare DocDrive,PBDrive,,,SameDrive Compare DiskAvail,DocSpace,BeginCopy,NoDocSpace,BeginCopy Label SameDrive Compare DiskAvail,TotSpace,BeginCopy,,BeginCopy WriteAt 3,23,"Insufficient disk space. 316k required." Goto Clear2 Label NoDocSpace WriteAt 3,23,"Insufficient disk space. 179k required." Goto Clear2 label NoDir WriteAt 3,23,"Cannot add " Write DocDir Label Clear2 Beep 750,8 Wait 35 WriteAt 3,23,ClearMsg GoTo PBDirOK Label BeginCopy ClearBox 1,8,80,25,ClrInfo WriteAt 3,9,"Transferring SMLMODEL.MDL to " Write PBDir Concat Work,SourceDir,"SMLMODEL.MDL" COPY Work, PBDir ">nul" Compare DosError,0,CopyError,CopyError WriteAt 3,10,"Transferring POWERMAK.EXE & PBDELETE.EXE to " Write PBDir Concat Work,SourceDir,"*.EXE" COPY Work, PBDir ">nul" Compare DosError,0,CopyError,CopyError WriteAt 3,11,"Transferring POWERBAT.DOC to " Write DocDir Concat Work,SourceDir,"POWERBAT.DOC" COPY Work, DocDir ">nul" Compare DosError,0,CopyError,CopyError WriteAt 3,12,"Transferring Examples to " Write DocDir Concat Work,SourceDir,"*.PWR" COPY Work, DocDir ">nul" Compare DosError,0,CopyError,CopyError Concat Work, SourceDir, "DOSEX1.BAT" COPY Work, DocDir ">nul" Compare DosError,0,CopyError,CopyError WriteAt 3,13,"Transferring information files to " Write DocDir Concat Work,SourceDir,"*.FRM" COPY Work, DocDir ">nul" Compare DosError,0,CopyError,CopyError Concat Work,SourceDir,"REGISTER.EXE" ?FileExist Work,,Finis WriteAt 3,14,"You have purchased a registered copy of PowerBatch..." WriteAt 3,15,"Registering this copy to you." Wait 3 CD SourceDir Register PBDir Label Finis WriteAt 3,14,"This PowerBatch installation (performed by a compiled PowerBatch program)" WriteAt 3,15,"is now complete." Wait 50 Color CurrAttr Clear WriteLine "If you give an evaluation copy of PowerBatch to a friend, it MUST contain all" WriteLine "of the PowerBatch files without modification. The complete list of files in" WriteLine "the evaluation system contains:" WriteLine " 1) README.1ST Initial start-up instructions" WriteLine " 2) PBINSTAL.EXE PowerBatch install program" WriteLine " 3) POWERMAK.EXE PowerBatch compiler" WriteLine " 4) SMLMODEL.MDL PowerBatch routines" WriteLine " 5) POWERBAT.DOC PowerBatch documentation" WriteLine " 6) DOSEX1.BAT Sample DOS batch file" WriteLine " 7) DEMO1.PWR Example PowerBatch Source file" WriteLine " 8) MENU1.PWR Example PowerBatch Source file" WriteLine " 9) MOVE1.PWR Example PowerBatch Source file" WriteLine " 10) MOVE2.PWR Example PowerBatch Source file" WriteLine " 11) BOXDEMO1.PWR Example PowerBatch Source file" WriteLine " 12) PBINSTAL.PWR Source for PowerBatch install" WriteLine " 13) PBCLONE.PWR Source for cloning PowerBatch" WriteLine " 14) MOVESUB.PWR Subroutine used by PBCLONE" WriteLine " 15) DELETEPB.EXE Delete all PowerBatch files" WriteLine " 16) REGISTER.FRM Registration form" WriteLine " 17) INVOICE.FRM Pre-printed invoice for company use" WriteLine " 18) VENDOR.DOC Information for software vendors" WriteLine " 19) SYSOP.DOC Information for BBS SysOps" WriteLine " 20) KEYID.EXE Utility to show key values" Concat Work,SourceDir,"REGISTER.EXE" ?FileExist Work,,NoRegMsg WriteLine "DO NOT FURNISH THE PROGRAM REGISTER.EXE !!!" WriteLine "THIS PROGRAM REGISTERS THE SOFTWARE IN YOUR NAME ONLY !!!" Label NoRegMsg Halt 0 Label CopyError Concat Work,"DOS error code ",DosError Concat Work," occurred during copy. Cannot continue." WriteLine 3,14,Work Beep 800,8,3 WriteLine 3,15,"PowerBatch installation not successful!"