home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: SysTools
/
SysTools.zip
/
smbar31.zip
/
SETUP.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
2000-07-29
|
4KB
|
133 lines
/* SmartBar Install */
signal on halt name Exit
call RxFuncAdd SysLoadFuncs, RexxUtil, SysLoadFuncs;
call SysLoadFuncs;
call SysCls
Parse upper Arg Param
say ""
say ""
say "SmartBar 3.1 - Installation"
say ""
say "Select your choise:"
Action=Question(" I)nstall D)einstall Q)uit","I","D","Q")
select
when Action = "D" then do
rc1=SysDestroyObject( '<ID_SMARTBAR_PROGRAM>' )
rc2=SysDestroyObject( '<ID_SMARTBAR_HELP>' )
rc3=SysDestroyObject( '<ID_SMARTBAR_FOLDER>' )
if rc1\=0 & rc2\=0 & rc3\=0 then do
say ""
say "The folder SmartBar was correctly deleted."
say "If you want, you should delete all files"
say "in the SmartBar directory."
say ""
say "Thank you for using this program."
say ""
end
else do
say ""
say "Couldn't delete SmartBar Folder."
say ""
end
end
when Action = "I" then do
say ""
say ""
say ""
say "WARNING! This version of SmartBar is NOT compatible with earlier versions."
say "You SHOULD uninstall any previous version before installing this version."
say ""
if Question("Continue? Y)es N)o","Y","N") = "N" then
call Exit
rc = SysFileTree("SMARTBAR.INI",outfile,'F',,)
if outfile.0 = 1 then do
say ""
say ""
say ""
say "Mhhh..... I found a SMARTBAR.INI file."
say "Is it from a correct version ?"
say ""
if Question("Continue? Y)es N)o","Y","N") = "N" then
call Exit
end
say ""
say ""
say ""
say "The contents of this archive (program executable and doc files) are"
say "provided on as-is basis at no cost to you. Source code is NOT available."
say "This software is not covered by any warranty of any description on any"
say "planet known by man. You assume any and all risks associated with the"
say "use of this Software including, but not limited to global thermonuclear"
say "war, famine, the fall of Microsoft, uncontrolled acts of glee, corporate"
say "takeovers, paradigm shifts, and/or failure of the Heisenberg compensators."
say ""
if Question("Do you agree? Y)es N)o","Y","N") = "N" then
call Exit
call SysCreateObject 'WPFolder', 'SmartBar', '<WP_DESKTOP>',,
'OBJECTID=<ID_SMARTBAR_FOLDER>;ICONFILE='||directory()||'\SMBFOLD1.ICO;ICONNFILE=1,'||directory()||'\SMBFOLD2.ICO;'
call SysOpenObject '<ID_SMARTBAR_FOLDER>',0, FALSE
call SysCreateObject 'WPProgram', 'SmartBar', '<ID_SMARTBAR_FOLDER>',,
'EXENAME='||directory()||'\SMARTBAR.EXE;PROGTYPE=PM;STARTUPDIR='||directory(),
||';OBJECTID=<ID_SMARTBAR_PROGRAM>;'
call SysCreateObject 'WPProgram', 'SmartBar - Reference (Italian)', '<ID_SMARTBAR_FOLDER>',,
'EXENAME=VIEW.EXE;PROGTYPE=PM;PARAMETERS=SMARTBAR.HLP;STARTUPDIR='||directory(),
||';OBJECTID=<ID_SMARTBAR_HELP>;'
if Question("Do you want create a shadow into Startup Folder ? Y)es N)o","Y","N")="Y" then do
call SysCreateShadow "<ID_SMARTBAR_PROGRAM>", "<WP_START>"
end
if Question("Do you want run SmartBar now ? Y)es N)o","Y","N")="Y" then do
call SysOpenObject '<ID_SMARTBAR_PROGRAM>',0, FALSE
end
say ""
say "The program was correctly installed."
say ""
say "Click right mouse for Settings Menu".
say ""
say "If do you like this program don't forget to send a mail"
say "to SmartBar@mclink.it."
say ""
end
otherwise
say ""
say "Bye."
end
exit
Exit:
say ""
say "Bye."
say ""
exit
/*****************************************************************************/
Question:
resp="["
arrisp.0=0
do i=2 to arg()
resp=resp || arg(i) || "/"
end
resp=delstr(resp,(length(resp)),1)
resp=resp || "]"
do forever
say ""
say arg(1) resp
parse value SysCurPos() with row col
row=(row-1)
col=length(arg(1) resp)+1
call SysCurPos row, col
parse upper pull chr
do i=1 to arg()
if translate(arg(i))=chr then
return chr
end
end
return ""