home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
qsetup.zip
/
DM2TEST.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-04-25
|
2KB
|
56 lines
/* REXX - DM2Test: DeskMan/2 setup test object install program */
/*-──────────────────────────────────────────────────────────────────┐
│ │
│ (C) Copyright 1993-1994 Development Technologies, Inc. │
│ Portions Copyright 1993 Gregory Czaja │
│ All rights reserved │
│ DeskMan, DeskMan/2, DM2Setup, VUEMan, VUEMan/2 and DM2Image │
│ are trademarks of Development Technologies, Inc. (DevTech), │
│ a Pennsylvania Corporation │
│ │
│ version 1.5 April 1994 │
└───────────────────────────────────────────────────────────────────*/
Parse source . . __rexx_name;
__rexx_dir = Filespec('D',__rexx_name)||Filespec('P',__rexx_name)
Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs';
Call SysLoadFuncs;
system_dll = FileSpec('Drive',Value('SYSTEM_INI',,'OS2ENVIRONMENT'))||'\OS2\DLL';
rc = SysDestroyObject("<DM2Test>");
rc = SysDeregisterObjectClass('DM2Test');
Address CMD '@ERASE 'system_dll'\DM2Test.DLL 2>NUL';
Say "Install (I) or Remove (R)?"; Pull reply;
If Translate(reply) = 'R'
Then Exit;
Address CMD '@COPY '__rexx_dir'DM2Test.DLL 'system_dll;
If rc <> 0 /* registered OK ? */
Then Do;
Say "DM2 Test: could not replace the DLL, rc="rc".";
Say "DM2 Test: delete the object and the DLL from \OS2\DLL directory.";
Exit;
End;
rc = SysRegisterObjectClass('DM2Test',system_dll||'\DM2Test.DLL');
If rc <> 1 /* registered OK ? */
Then Do;
Say "DM2 Test: could not register its object class, rc="rc".";
Exit;
End;
rc = SysCreateObject('DM2Test','DM/2Test','<WP_DESKTOP>', ,
'OBJECTID=<DM2Test>;',,
'ReplaceIfExists');
If rc <> 1 /* registered OK ? */
Then Do;
Say "DM2 Test: could not create its object, rc="rc".";
End;
Exit;