home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
tmtrk112.zip
/
install.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-05-10
|
2KB
|
85 lines
/* Install.CMD for Time Tracker */
/* Author Trevor Hemsley */
Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
Call SysLoadFuncs
/* trace i */
instdir = "C:\TIMETRAK"
workdir = "C:\timetrak"
say "Welcome to the Time Tracker install routine."
say "I need to copy some program files to your hard disk."
drive_path = "N"
do while drive_path = "N"
say "Enter the full pathname for installation (default "instdir") ?"
pull answer .
if answer = "" then answer = instdir
rx = SysFileTree(answer,rx.,"D")
if rx.0 = 0 then
do
say "Directory "answer" does not exist. Create it Y/N?"
parse upper pull answer1
if answer1 ¬= "Y" then drive_path="N"
else
do
"@MD "answer
rx = SysFileTree(answer,rx.,"D")
if rx.0 ¬= 0 then
do
instdir = answer
workdir = answer
drive_path = "Y"
end
end
end
else
do
workdir = answer
instdir = answer
drive_path = "Y"
end
end
drive_path = "N"
do while drive_path = "N"
say "Enter the full pathname for your log files to be kept (default "workdir") ?"
pull answer .
if answer = "" then answer = workdir
rx = SysFileTree(answer,rx.,"D")
if rx.0 = 0 then
do
say "Directory "answer" does not exist. Create it Y/N?"
parse upper pull answer1
if answer1 ¬= "Y" then drive_path="N"
else
do
"@MD "answer
rx = SysFileTree(answer,rx.,"D")
if rx.0 ¬= 0 then
do
workdir = answer
drive_path = "Y"
end
end
end
else
do
workdir = answer
drive_path = "Y"
end
end
parse upper source os2 command instpath
parse value instpath WITH instpath "\INSTALL.CMD" junk
"@copy "instpath"\pmtmtrak.exe "instdir"\pmtmtrak.exe 1>nul"
"@copy "instpath"\tmtkhelp.hlp "instdir"\tmtkhelp.hlp 1>nul"
"@copy "instpath"\*.cmd "instdir"\*.cmd 1>nul"
rrc = SysCreateObject("WPProgram", "Time Tracker", "<WP_DESKTOP>", "OBJECTID=<TIMETRACKER>;EXENAME="instdir"\PMTMTRAK.EXE;STARTUPDIR="workdir";PARAMETERS=-q")
say "Thank you for installing Time Tracker. If you want to remove it, please "
say "run the UNINST command before deleting the program files."