Site Index - Feedback - Impressum |
| |||||||||
|
|
( Archiv ) | ( Neues Thema ) |
27.11.2013 |
Re: Wer kennt sich mit REXX aus? (von: Günter, 15:58:13) | ^ |
"@echo off"
Adress CMD Call SETLOCAL Call RxFuncAdd 'SysloadFuncs', 'REXXUTIL', 'SysloadFuncs' Call SysloadFuncs rc = main() Call ENDLOCAL return rc main: system_drive = FileSpec('Drive', Value('OS2_Shell',, 'OS2ENVIROMENT')) prod_name = "PWF" fspec_dll = DLLSearch(prod_name) if fspec_dll >< '' Then Do Say "PWfolder was already installed: you must delete all" Say "LockUp Folders you installed.You can save their" Say "contents in regular folders." Say "Do you want tu pursue? (YES or NO)" Pull answer if answer >< 'YES' Then Return 0 rc = SysDeregisterObjectClass('PWFolder'); if rc >< 1 Then Do Say "Cannot de-register PWF object class"; End; End; Else Do fspec_dll = system_drive'\OS2\APPS\DLL\'prod_name'.DLL' End fspec_hlp = SysSearchPathOnly(HELP, prod_name'.HLP') if fspec_hlp == ' ' Then fspec_hlp = system_drive'\OS2\HELP\'prod_name'.HLP' "COPY PWF.DLL" spe_dll if rc >< 0 Then Do Say 'Cannot copy PWF.DLL to fspec_dll', rc='rc Call TempHelp1 Return 4 END "Copy PWF.HLP" fspec-hlp if rc >< 0 Then Do Call TempHelp2 Return 4 End if SysRegisterObjectClass('PWFolder', fspec_dll) >< 1Then Do Say 'Cannot register the PWFolder Object class' Return 4 End; Else Do; Say 'PWFolder class successfully created' Say 'Go drag some instances from the "Templates" folder,,,' End; Return 0 /*---------------------------SubRoutines and Functions ---------------------*/ DLLSearch: Procedure Expose system_drive Arg filename /*Search for LIBPATH in CONFIG.SYS */ rc = SysFileSearch('LIBPATH', system_drive'\CONFIG.SYS', 'answer.') if rc >< 0 | answer.0 >< 1 Then Do say 'Cannot read the Libpath statement of CONFIG.SYS filespec = ' ' End; Else Do /* Get the file, if any */ Parse Value answer.1 with 'LIBPATH=' answer.1 "set DUMMY="answer.1 filespec = SysSearchPathOnly(Dummy, filename'.DLL') End return filespec SysSearchPathOnly: Arg path, filename "rename "filename" zutzut.zut 2>NUL" /*Aaaarggghhh */ filespec = SysSearchPath(path, filename) "rename zutzut.zut "filename" 2>NUL" /*Aaaarggghhh */ return filespec TempHelp1: Say " >Sometimes de-registering an object class does not remove" Say " > the subdirectory in Templates. If the files has been" Say " > found 'being use by another process', check if there is" Say " > a directory Like:" Say " > system_drive "\OS2 Desktop\???\Templates\LockUpFolder" Say "> You can either re-IPL, or remove this directory." TempHelp2: Say " > If the file has been found'being use by another process'," Say " > you havetu shutdown your system and restart this command" Ich hoffe es ist soweit in Ordnung? Die DLL und Help File kopiert er richtig. Say 'cannot copy PWF.HLP to 'fspec_hlp', rc='rc [ Leser: 254 ] |
|
Mit * markierte Felder müssen ausgefüllt werden ! |
( Zeige alle Einträge ) | ( Zur Startübersicht ) |
|
| Günter | 267 | 27.11.2013 | 12:24 |
| Frank Wochatz | 258 | 27.11.2013 | 14:11 |
| Günter | 254 | 27.11.2013 | 15:58 |
| Andreas Schnellbacher | 249 | 27.11.2013 | 17:42 |
| Günter | 249 | 27.11.2013 | 18:24 |
| Günter | 215 | 29.11.2013 | 10:18 |
| Lothar S. | 206 | 29.11.2013 | 17:07 |
| Günter | 198 | 29.11.2013 | 21:36 |
| fna | 199 | 29.11.2013 | 21:54 |
| Günter | 200 | 30.11.2013 | 12:02 |
| Frank Wochatz | 192 | 30.11.2013 | 16:14 |
| Günter | 193 | 30.11.2013 | 18:01 |
| Günter | 194 | 30.11.2013 | 18:25 |
| Frank Wochatz | 202 | 01.12.2013 | 01:30 |
|