; This is a listing of the Windows Batch file used to install Command Post
; This file is not runable as is. It has been compiled into INSTALL.EXE
; by the PubTech BatchWorks Compiler, to be released in the summer of 1990
instver=714 ; INSTALL VERSION NUMBER
fff1='#CHANGES.TXT' ;Files that should be in scratch dir when de-arced
fff2='#WININI.TXT'
fff3='BROWSER.EXE'
fff4='CMDPOST.CPM'
fff5='CMDPOST.EXE'
fff6='CMDPOST.TXT'
fff7='CMDUSER.CPM'
fff8='CP_BLNK.EXE'
fff9='CP_DLL.EXE'
fff10='CP_DLL3.EXE'
fff11='CP_HELP.CRD'
fff12='CP_INFO.EXE'
fff13='CP_TREE.EXE'
fff14='CP_VIRT.BAT'
fff15='TASKMANR.EXE'
fff16='WININFO.EXE'
fff17='CP_QUEST.CRD'
fff18='LICENSE.TXT'
fffmax=18
IgnoreInput(@TRUE) ;disable keyboard/mouse input
source=DirGet() ;Cet current directory
WriteTitle="Command Post Notes" ;Title for Write Window
ro=@FALSE ;readonly error=FALSE
StartCP=@FALSE ;don't start CP
disktemp=environ("TEMP")
if strlen(disktemp)==0 then disktemp="C:\" ;for HISTORY.TXT if install bombs
a=WinVersion(1) ;Check Windows Version
altshell="PROGMAN.EXE" ;Set default shell
altclass="Progman" ;shell class name (techie stuff)
if a==3 then winver="3XX" ;PIF file suffix for Win 3.0
if a==3 then goto gotver
altshell="MSDOS.EXE" ;Set def shell for Windows 2.x
altclass="Session" ;shell class name
a=strupper(iniread("WIN386","ALTTAB","ZYX")) ;Are we in WIN 2.x 386
if a=="ZYX" then winver="2X2" ;Probably not
if a=="ZYX" then goto gotver
winver="2X3" ;Prolly in WIN 2.x 386
:gotver
cr=strcat(num2char(13),num2char(10)) ;Make a CRLF
tab=num2char(9) ;Make a TAB
CPI="Command Post Installation" ;Default Box title
;Introductory messages
Pause(CPI,"This is the Command Post%cr%installation procedure Ver %instver%.%cr%%cr%This install procedure was%cr%developed using%cr%PubTech« BatchWorks«.")
a=FileLocate(altshell) ;Locate Alternate shell
if a!="" then goto MSOK ;Can we find one???
Message(CPI,"Error: File %altshell% not found in PATH,%cr%cannot use this installation program.")
disktemp=AskLine(CPI,"Enter pathname to scratch directory.%cr%Must have 600K bytes available on disk.%cr%All files in specified directory will be deleted.",disktemp)
disktemp=strtrim(strupper(disktemp))
a=strlen(disktemp)
if a<3 then goto tempgot
if strsub(disktemp,2,1)!=":" then goto tempgot
if a<5 then goto diroops ; not in the root PLEASE
if strsub(disktemp,a,1)=="\" then disktemp=strsub(disktemp,1,a-1)
:tempgot1
mydisk=strsub(disktemp,1,2)
instdir=strsub(disktemp,3,strlen(disktemp)-2)
WinActivate(WriteTitle)
Clipput("Using %disktemp% on %mydisk% as temporary/documentation directory.")
SendKey("+{INSERT}~")
a=FileLocate(altshell)
a=strsub(a,1,strlen(a)-strlen(altshell)-1)
if a==disktemp then goto diroops
logdisk(mydisk) ;Log to temp disk
error(@OFF)
DirMake(instdir) ;Create temp directory
LastError=0
DirChange(disktemp)
if LastError==0 then goto dircont
:diroops
WinActivate(WriteTitle)
a="%disktemp% seems to be an invalid path/directory%cr%for the work area"
Clipput(a)
SendKey("+{INSERT}~")
error(@CANCEL)
Message(CPI,a)
goto trydiragain
:dircont
error(@CANCEL)
WinActivate(WriteTitle) ;Delete files in temp directory
Clipput("Deleting all files in %disktemp%")
SendKey("+{INSERT}~")
Error(@OFF) ;Delete files in temp directory
FileDelete(strcat(disktemp,"\*.*"))
Error(@ON)
dirchange(source) ;Change to source directory
WinActivate(WriteTitle)
Clipput("Copying CP_INST.SFX, a self-extracting compressed file, to %disktemp%.")
clipput("CMDPOST.EXE added to run= line in WIN.INI file.")
WinActivate(WriteTitle)
SendKey("+{INSERT}~")
:runiniok
dirchange(disktemp) ;Back to temp directory.
;Windows 3.0....tell 'em about appendix
if winver=="3XX" then Message(CPI,"Since you have Windows 3.0, please review%cr%the special Windows 3.0 appendix in the%cr%documentation to see how to make%cr%Command Post your primary shell and to%cr%see how to change the taskman.exe file.")
IgnoreInput(@OFF) ;Allow keyboard inputs.
;Install all doned
Message(CPI,"Command Post Installation Complete.%cr%Assorted documentation files may be%cr%found in the %disktemp%\ directory.%cr%%cr%If %disktemp%\ is on a RAM drive,%cr%please copy documentation files%cr%to a permanent drive before rebooting.")
a=iniread("CmdPost","Info","AB2")
if a=="AB2" then message(CPI,"If you have purchased a licensed%cr%copy of Command Post, please%cr%be sure to enter your license%cr%number to avoid the initial%cr%purchase solicitation messages.")