; 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=712 ; INSTALL VERSION NUMBER
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
instdir="\CP-NOTES.TMP" ;Working Directory
;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 working 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 tempgot1
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}~")
logdisk(mydisk) ;Log to temp disk
error(@OFF)
DirMake(instdir) ;Create temp directory
LastError=0
DirChange(disktemp)
if LastError==0 then goto dircont
WinActivate(WriteTitle)
Clipput("%disktemp% seems to be an invalid path/directory")
SendKey("+{INSERT}~")
error(@CANCEL)
goto crash
: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.")
Message(CPI,"The README.1ST file will be displayed%cr%Please read.%cr%Close Notepad when done.")
runzoom("notepad.exe","README.1ST") ;Notepad on licensing policy.
IgnoreInput(@OFF) ;Allow user to close notepad.
WinWaitCls("Notepad - README.1ST") ;Wait till notepad closed.