home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
rx_net.zip
/
test.cmd
< prev
Wrap
OS/2 REXX Batch file
|
1993-09-10
|
3KB
|
134 lines
/* */
"@ECHO OFF"
/*
trace ?i
*/
parse arg template dest .
if template = '' || dest = '' then do
say "Please supply name of template user and of destination user."
return -1
end
call RXFuncAdd 'RXNET_LOADALL', 'RX_NET', 'RXNET_LOADALL'
rc = RXNet_LoadAll()
if rc <> 0 then do
say 'Error RXNet_LoadAll :'rc
return -1
end
xxx = RX_GETDCName()
say "Domain Controller of current domain : "xxx
say ""
"PAUSE"
xxx = RX_GETUSERS( "Users.")
if xxx = 0 then do
say Users.0" users defined in current domain"
say " "
say ' Userid '
say '------------'
do i=1 to Users.0
say ' 'Left( Users.i, 10)
end
end; else do
say "Error issuing RX_GetUsers : "xxx
end
say ""
"PAUSE"
xxx = RX_GETALIASES( "Aliases.")
if xxx = 0 then do
say Aliases.0" aliases defined in current domain"
say " "
say ' Alias | Type'
say '------------+---------'
do i=1 to Aliases.0
parse var Aliases.i Name Type .
say ' 'Left( Name, 10)'| 'Left( Type, 8)
end
end; else do
say "Error issuing RX_GetAliases : "xxx
end
say ""
"PAUSE"
xxx = RX_GETAPPS( "Apps.")
if xxx = 0 then do
say Apps.0" applications defined in current domain"
say " "
say ' Application | Type'
say '-------------+------------'
do i=1 to Apps.0
parse var Apps.i Name Type .
say ' 'Left( Name, 11)'| 'Left( Type, 11)
end
end; else do
say "Error issuing RX_GetApps : "xxx
end
say ""
"PAUSE"
xxx = RX_GETAPPSEL( template, "test.")
if xxx = 0 then do
say "Application selector for "template
say " "
say ' Application | Type'
say '-------------+-----------'
do i=1 to Test.0
parse var Test.i App Type .
say ' 'Left( App, 12)'| 'Left( Type, 10)
end
end; else do
say "Error issuing RX_GetAppSel for "template": "xxx
end
say ""
"PAUSE"
say "Do you want to apply these settings to "dest" (Y/N)?"
parse pull ans
if ans = 'Y' | ans = 'y' then do
xxx = RX_SETAPPSEL( dest, "TeSt.")
if xxx <> 0 then do
say "Error issuing RX_SetAppSel for "dest": "xxx
end; else do
say "Set successful !"
end
end
say ""
"PAUSE"
xxx = RX_GETLOGONASN( template, "test.")
if xxx = 0 then do
say "Logon assignments for "template
say " "
say ' Alias | Type | Device'
say '------------+-----------+--------'
do i=1 to Test.0
parse var Test.i Alias Type Device
say ' 'Left( Alias, 11)'| 'Left( Type, 10)'| 'Device
end
end; else do
say "Error issuing RX_GetLogonAsn for "template": "xxx
end
say ""
"PAUSE"
say "Do you want to apply these settings to "dest" (Y/N)?"
parse pull ans
if ans = 'Y' | ans = 'y' then do
xxx = RX_LOGONASN( dest, "TeSt.")
if xxx <> 0 then do
say "Error issuing RX_SetLogonAsn for "dest": "xxx
end; else do
say "Set successful !"
end
end
call RXNET_DROPALL