home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: SysTools
/
SysTools.zip
/
pmsysm30.zip
/
install.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-06-21
|
7KB
|
205 lines
/* SYSMON Installation Program */
call RxFuncAdd "SysLoadFuncs","RexxUtil","SysLoadFuncs"
call SysLoadFuncs
Signal On Halt Name HALT
call SysCls
Say " "
Say "pmSysMon installation program ..."
Say " "
Say "DON'T PANIC :"
Say " This script doesn't modify any ini-file, but the"
Say " private pmSysMon.INI :-)"
Say " Also you DON'T have to change your CONFIG.SYS "
Say " ( and I also will not touch it :-)"
Say " "
/* Is everything at its place */
Say "I'm checking if all files are present ..."
Say " "
Result=SysFileTree("MUSIC.DLL", 'Files','F')
If Files.0=0 Then
Do
Say "Can't find FILE : MUSIC.DLL "
Say "This file is needed for soundsupport."
Say "If you don't want sound just continue "
Say "Continue ? ( Default = Y )"
Pull YesNo
If YesNo = "N" Then Signal DONE
End
Result=SysFileTree("SM_HOOK.DLL", 'Files','F')
If Files.0=0 Then
Do
Say "Can't find FILE : SM_HOOK.DLL "
Say "This file is important, so make sure you have unpacked all"
Say "files from the archive."
Signal DONE
End
Result=SysFileTree("PMSYSMON.EXE", 'Files','F')
If Files.0=0 Then
Do
Say "Can't find FILE : pmSysMon.EXE - make sure you unpacked all files ..."
Signal DONE
End
Result=SysFileTree("PMSYSMON.HLP", 'Files','F')
If Files.0=0 Then
Do
Say "Can't find FILE : pmSysMon.HLP - make sure you unpacked all files ..."
Signal DONE
End
Result=SysFileTree("REGISTER.WAV", 'Files','F')
If Files.0=0 Then
Do
Say "Can't find FILE : REGISTER.WAV - make sure you unpacked all files ..."
Signal DONE
End
Result=SysFileTree("READ.ME", 'Files','F')
If Files.0=0 Then
Do
Say "Can't find FILE : READ.ME - make sure you unpacked all files ..."
Say "This file is very important - it tells you how to register :-)"
Signal DONE
End
Result=SysFileTree("ORDER.FRM", 'Files','F')
If Files.0=0 Then
Do
Say "Can't find FILE : ORDER.FRM - make sure you unpacked all files ..."
Say "This file is very important - it tells you how to register :-)"
Signal DONE
End
Say "All neccessary files found ...Ok"
Say " "
Say "Do you want me to copy the files to another directory "
Say " This directory DOESN'T need to be specified in any of your paths"
Say "Your answer (Y/N) ? ( Default = N )"
Pull YesNo
If YesNo="Y" Then
Do
Say " "
Say "Please enter the full path of the desired directory ..."
Pull Directory
Result=SysFileTree(Directory,'Dirs','D')
if Dirs.0=0 Then
Do
If SysMkDir(Directory) then
Do
Say "ERROR : Can't CREATE your desired directory"
Signal DONE
End
End
/* Copying Files*/
Copy "PMSYSMON.EXE" Directory '>NUL'
Copy "PMSYSMON.HLP" Directory '>NUL'
Copy "REGISTER.WAV" Directory '>NUL'
Copy "READ.ME" Directory '>NUL'
Copy "LIESMICH.1ST" Directory '>NUL'
Copy "ORDER.FRM" Directory '>NUL'
Copy "MUSIC.DLL" Directory '>NUL'
Copy "SM_HOOK.DLL" Directory '>NUL'
Copy "WHATS.NEW" Directory '>NUL'
Copy "WASIST.NEU" Directory '>NUL'
Copy "FILE_ID.DIZ" Directory '>NUL'
End
Else
Do
Directory=Directory()
End
Say " "
Say "Do you want me to create a program object ..."
Say "Your answer (Y/N) ? ( Default = Y )"
Pull YesNo
If YesNo="N" Then Signal Finish
Else
Do
Say " "
Say "Do You want the icon to be placed in the STARTUP-folder ?(Default = Y)"
Say " "
Pull YesNo
if YesNo="N" Then
Do
Folder="<WP_DESKTOP>"
Say " "
Say " You still can move this icon into the STARTUP-Folder later !"
End
Else Folder="<WP_START>"
Type="WPProgram"
Title="pmSysMon"
Say " "
mmos2=value('MMBASE',,'OS2ENVIRONMENT')
If mmos2 = "" THEN
Do
Say "I could not detect MMOS2 !"
Say "seems you don't have installed it...(but I'm not perfect)"
Say "If you are shure you have installed MMOS2 say 'Y'"
Say "Your answer (Y/N) ? ( Default = N )"
Pull YesNo
If YesNo = "Y" Then
Do
mmos2="-MMOS2"
End
Else mmos2="-QUIET"
End
Else
Do
Say "I have detected MMOS2 !"
Say "Do you want to disable sound (saves some memory) ?"
Say "Your answer (Y/N) ? ( Default = N )"
Pull YesNo
If YesNo = "Y" Then
Do
mmos2="-QUIET"
End
Else mmos2=""
End
laptop=""
Say " "
Say "One last question :"
Say "Is this computer you are installing pmSysMon on a "
Say "battery driven systen (eg. LAPTOP)"
Say "Your answer (Y/N) ? ( Default = N )"
Pull YesNo
If YesNo = "Y" THEN laptop="-LAPTOP"
Params="EXENAME="Directory"\PMSYSMON.EXE;PARAMETERS="mmos2 laptop";STARTUPDIR="Directory";"
If SysCreateObject(Type,Title,Folder,Params,"ReplaceIfExists") Then
Do
Say " "
Say "pmSysMon Program object created successfully !"
if Folder="<WP_DESKTOP>" Then Say "Don't forget to copy it into your STARTUP-FOLDER if you like it !"
End
Else
Do
Say "Could't create pmSysMon Program object :-( "
Signal DONE
End
End
FINISH:
Say " "
Say " HAVE FUN WITH pmSYSMON "
Say " "
Say " Btw : If you are upgrading from a prior version you can delete"
Say " EMX.DLL - pmSysMon 3.0 doesn't need it anymore !"
Say " Pay attention no other programs depend on it ! "
Signal DONE
HALT:
Say 'Installation terminated !'
Signal DONE
DONE:
Exit