home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / resyncpw.zip / resyncpw.cmd
OS/2 REXX Batch file  |  1998-12-15  |  22KB  |  526 lines

  1. /* ------------------------------------------------------------------ */
  2. /* File : RESYNCPW                                                    */
  3. /*                                                                    */
  4. /*                  Généré par RXPP v2.0 le 15/12/98                  */
  5. /*                                                                    */
  6. /* ------------------------------------------------------------------ */
  7.  
  8.  
  9. /* ===== RXPP ======================================================= */
  10. /* Les lignes suivantes proviennent du fichier source                 */
  11. /* ================================================================== */
  12.  
  13. /*┌───────────────────────────────────────────────────────────────────────┐
  14.   │  MODULE:          RESYNCPW.CMD                                        │
  15.   ├───────────────────────────────────────────────────────────────────────┤
  16.   │ Resynchronize the password of a server machine with the Primary       │
  17.   │ Domain Controller.                                                    │
  18.   ├───────────────────────────────────────────────────────────────────────┤
  19.   │  External Dependancies :                                              │
  20.   │ PWDEXP.EXE PWDIMP.EXE Export and Import of a user's password (in      │
  21.   │     crypted form)                                                     │
  22.   └───────────────────────────────────────────────────────────────────────┘*/
  23.  
  24. Call LS_Init 'RexxUtil,LSRXUT'
  25.  
  26. /* We have to guess the machine name. It is stored into IBMLAN.INI         */
  27. htaPgorPteN = Reverse(SysSearchPath('Path','Net.exe'))
  28. Parse Var htaPgorPteN . '\' htaPgorPteN
  29. NetProgPath = Reverse(htaPgorPteN)
  30. Parse Var htaPgorPteN . '\' htaPteN
  31. IniFile = Reverse(htaPteN) || '\IBMLAN.INI'
  32. Call SysFileSearch 'ComputerName',IniFile,'Lines.'
  33. If Lines.0 = 0
  34.   Then Do
  35.          Call Display PMsg(4)
  36.          Exit
  37.        End
  38. Do i = 1 to Lines.0
  39.   Parse Value Translate(Lines.i) With . 'COMPUTERNAME' . '=' Test
  40.   If Test \= '' Then ComputerName = Strip(Test)
  41. End                                                               /* End do*/
  42.  
  43. Call LS_ServerModalInfo ComputerName,'Info.'
  44. Parse Var Info.role SrvRole Junk
  45. PRDCName = Info.Primary
  46.  
  47. /* Now we have to verify the availability of our utility programs ...      */
  48. NeededProgs = 'PWDEXP.EXE PWDIMP.EXE'
  49. Do While NeededProgs \= ''
  50.   Parse Var NeededProgs P NeededProgs
  51.   If SysSearchPath('Path',P) = ''
  52.     Then Do
  53.            Call Display PMsg(6,P)
  54.            Exit
  55.          End
  56.   Parse Value Reverse(P) With . '\' htaPslooT
  57.   ToolsPath = Reverse(htaPslooT)
  58. End                                                               /* End do*/
  59.  
  60. "@NET ACCOUNTS /ROLE:STANDALONE 1>Nul 2>Nul"
  61. If Rc = 0
  62.   Then Do
  63.          Call Display PMsg(5,Translate(SrvRole))
  64.        End
  65.   Else Do
  66.          Call Display PMsg(8)
  67.          Call Display PMsg(11)
  68.          Exit
  69.        End
  70.  
  71. /* We have to ask the user a valid UserID and Passwords for performing a   */
  72. /* local logon                                                             */
  73. Do Forever
  74.   Call LineAsk PMsg(1); Pull LocUser
  75.   Call LineAsk PMsg(2); LocPW = Translate(GetPW())
  76.   "@LOGON" LocUser "/P:" || LocPW "/V:L /R 1>Nul 2>Nul"
  77.   If rc <> 0 Then Call Display PMsg(3,LocUser)
  78.              Else Leave
  79. End                                                               /* End do*/
  80.  
  81. /* Create a temporary Queue to retrieve the actual local password          */
  82. PW_Queue = RXQueue('CREATE')
  83. Junk     = RXQueue('SET',PW_Queue)
  84. '@PWDEXP' ComputerName '| RXQUEUE' PW_Queue
  85. Pull LocalPW
  86. Call RXQueue 'DELETE',PW_Queue
  87. /* LocalPW contains ServerName:XXXXXXXXXXXXXXXXXXXXXXXXXX */
  88. "@LOGOFF"
  89. Call Display PMsg(16,LocalPW)
  90.  
  91. /* Now we have to logon onto the domain ...                         */
  92. /* We hope that the given elements are corrects. If not we will ask */
  93. /* for more...                                                      */
  94.  
  95. "@LOGON" LocUser "/P:" || LocPW "/V:D /R 1>Nul 2>Nul"
  96. If rc <> 0
  97.   Then Do Forever
  98.          Call LineAsk PMsg(7); Pull DomUser
  99.          Call LineAsk PMsg(2); DomPW = Translate(GetPW())
  100.          "@LOGON" DomUser "/P:" || DomPW "/V:D /R 1>Nul 2>Nul"
  101.          If rc <> 0 Then Call Display PMsg(3,DomUser)
  102.                     Else Leave
  103.        End
  104.  
  105. /* Make Sure that the PWDIMP.EXE file is available on the PR-DC            */
  106. Call SysFileTree '\\' || PRDCName || '\IBMLAN$\NETPROG\PWDIMP.EXE','Test.','FO'
  107. If Test.0 = 0
  108.   Then Do                                          /* Just Copy it in Place*/
  109.           "@COPY" ToolsPath || '\PWDIMP.EXE \\' || PRDCName || '\IBMLAN$\NETPROG 1>Nul 2>Nul'
  110.           /* And in that case copy the companion ... */
  111.           "@COPY" ToolsPath || '\PWDEXP.EXE \\' || PRDCName || '\IBMLAN$\NETPROG 1>Nul 2>Nul'
  112.        End
  113. /* We now use Net Admin to perform exactly the same stuff as before ...    */
  114. PW_Queue = RXQueue('CREATE')
  115. Junk     = RXQueue('SET',PW_Queue)
  116. '@NET ADMIN \\' || PrDCName '/C PWDEXP' ComputerName '| RXQUEUE' PW_Queue
  117. Pull DomainPW
  118. Call RXQueue 'DELETE',PW_Queue
  119. Call Display PMsg(17,DomainPW)
  120.  
  121. If LocalPW = DomainPW
  122.   Then Do
  123.          Call Display PMsg(18)
  124.          Call Display PMsg(19)
  125.        End
  126.   Else Do
  127.          "@NET ADMIN \\" || PrDCName '/C PWDIMP' LocalPW '1>Nul 2>Nul'
  128.          If Rc = 0
  129.            Then Do
  130.                   Call Display PMsg(9,ComputerName,PRDCName)
  131.                   "@NET ACCOUNTS /ROLE:" || SrvRole '1>Nul 2>Nul'
  132.                   If rc = 0
  133.                     Then Do
  134.                            Call Display PMsg(14,ComputerName,SrvRole)
  135.                            Call Display PMsg(12)
  136.                            "@NET START SERVER"
  137.                          End
  138.                     Else Do
  139.                            Call Display PMsg(15,ComputerName,SrvRole)
  140.                          End
  141.                 End
  142.            Else Do
  143.                   Call Display PMsg(10,ComputerName)
  144.                 End
  145.        End
  146.  
  147. /* Then We can use Net Admin to perform the work ... */
  148. /* In Any Case we have to make a Logoff */
  149. "@LOGOFF 1>Nul 2>Nul"
  150. Call Display PMsg(13)
  151. Exit
  152.  
  153. /* This routines gets the characters entered but displays stars on the screen */
  154. /* Extended keys (Arrows or functions) Tab are ignored. Enter terminates      */
  155. GetPW: procedure
  156. String = ''
  157. Parse Value SysCurPos() With Row0 Col0
  158. Do Forever
  159.   Char = SysGetKey('NoEcho')
  160.   Select
  161.     When Char = d2c(13) Then Leave
  162.     When (Char = d2c(0)) | (Char = d2c(224))
  163.       Then Do                                               /* Extended Key*/
  164.              Junk = SysGetKey('NoEcho')
  165.              Call Charout ,d2c(7)                                   /* Beep*/
  166.            End
  167.     When Char = d2c(8)                                         /* BackSpace*/
  168.       Then If Length(String) > 1
  169.              Then Do
  170.                     String = Left(String,Length(String) - 1)
  171.                     Call SysCurPos Row0,Col0
  172.                     Do i = 1 to Length(String) + 1
  173.                       Call Charout ,' '      /* Wipe out our previous stars*/
  174.                     End                                           /* End do*/
  175.                     Call SysCurPos Row0,Col0
  176.                     Do i = 1 to Length(String)
  177.                       Call Charout ,'*'
  178.                     End                                           /* End do*/
  179.                   End
  180.              Else Call Charout ,d2c(7)
  181.     When Char = d2c(9)                                           /* Tab Key*/
  182.       Then Call Charout , d2c(7)
  183.     Otherwise
  184.       String = String || Char
  185.       Call Charout , '*'
  186.   End                                                             /* Select*/
  187. End                                                               /* End do*/
  188. Say                                             /* Goto Next line on screen*/
  189. Return String
  190.  
  191. /* ===== RXPP ======================================================= */
  192. /* Les lignes suivantes proviennent des directives EXTERN             */
  193. /* ================================================================== */
  194.  
  195.  
  196. /* ----- RXPP ------------------------------------------------------- */
  197. /* Membre : LS_INIT (D:\RXPP\LIBS\lslib.RLB)                          */
  198. /* ------------------------------------------------------------------ */
  199.  
  200. LS_Init: Procedure
  201. Arg ToolsList
  202. ToolsList = Space(Translate(ToolsList,'  ',',;'))
  203. Signal On Syntax Name LoadFailed
  204. Do While ToolsList \= ''
  205.   Parse Var ToolsList ToolsSet ToolsList
  206.   Select
  207.     When ToolsSet = 'REXXUTIL'
  208.       Then Do
  209.              If DLL_Needed('REXXUTIL') = 0
  210.                Then Do
  211.                       Call Display LSMsg(2,'REXXUTIL')
  212.                       Exit
  213.                     End
  214.              Call RxFuncAdd 'SysLoadFuncs','REXXUTIL','SysLoadFuncs'
  215.              Call SysLoadFuncs
  216.            End
  217.     When ToolsSet = 'LSRXUT'
  218.       Then Do
  219.              If DLL_Needed('LSRXUT') = 0
  220.                Then Do
  221.                       Call DIsplay LSMsg(2,'LSRXUT')
  222.                       Exit
  223.                     End
  224.              Call RxFuncAdd 'LoadLSRXUtFuncs','LSRXUT','LoadLSRXUtFuncs'
  225.              Call LoadLSRxUtFuncs
  226.            End
  227.     When ToolsSet = 'RXUTILS'
  228.       Then Do
  229.              If DLL_Needed('RXUTILS') = 0
  230.                Then Do
  231.                       Call Display LSMsg(2,'RXUTILS')
  232.                       Exit
  233.                     End
  234.              Call RxFuncAdd 'RxLoadFuncs','RXUTILS','RxLoadFuncs'
  235.              Call RxLoadFuncs
  236.            End
  237.     Otherwise
  238.       Call Display LSMsg(3,ToolsSet)
  239.       Exit
  240.   End                                                         /* End select*/
  241. End                                                               /* End do*/
  242. Signal OFF Syntax
  243. Return
  244. LoadFailed:
  245.   Call Display LSMsg(1,ToolsSet)
  246.   Exit
  247.  
  248.  
  249. /* ----- RXPP ------------------------------------------------------- */
  250. /* Membre : LSMSG (D:\RXPP\LIBS\lslib.RLB)                            */
  251. /* ------------------------------------------------------------------ */
  252.  
  253. LSmsg: Procedure Expose __LSMSGS__. __COLORS__. __PROGNAME__
  254. Trace Off
  255. If __LSmsgs__.1 = '__LSMSGS__.1' Then Do          /* not set or not exposed*/
  256.  
  257. /* ----- RXPP ------------------------------------------------------- */
  258. /* Les lignes suivantes ont été générées par une directive SETSTEM    */
  259. /* impliquant le fichier E:\aurora\newdev\LsLib.eng                   */
  260. /* ------------------------------------------------------------------ */
  261.  
  262. __LSMSGS__.1 = 'E Unable to register the Rexx function of &1'
  263. __LSMSGS__.2 = 'E Needed file &1 not found in LIBPATH'
  264. __LSMSGS__.3 = 'E Unknown ToolsSet &1'
  265. __LSMSGS__.4 = 'E A called function &2 returned RC=&1'
  266. __LSMSGS__.5 = 'E &2 : Invalid command &1'
  267. __LSMSGS__.6 = 'E Code for &1 not yet implemented. Noting Done'
  268.  
  269. /* ----- RXPP ------------------------------------------------------- */
  270. /* Fin des lignes générées par SETSTEM                                */
  271. /* ------------------------------------------------------------------ */
  272.  
  273.  
  274. /* ----- RXPP ------------------------------------------------------- */
  275. /* La ligne suivante a été générée par une directive SETVAR           */
  276. /* ------------------------------------------------------------------ */
  277.  
  278. __PROGNAME__ = 'RESYNCPW'
  279. End                                                                /* EndIf*/
  280. Parse Arg Number,Parms
  281. String = __LSMSGS__.Number
  282. Do _i = 1 By 1 Until Pos('&' || _i,String) = 0; End _i
  283. NParms = _i - 1
  284. Do _i = 1 To NParms
  285.   LookFor = '&' || _i
  286.   Parse Var String before (lookfor) after
  287.   String = before || Arg(_i + 1) || after
  288. End _i
  289. Return String
  290.  
  291. /* ----- RXPP ------------------------------------------------------- */
  292. /* Membre : LS_SERVERMODALINFO (D:\RXPP\LIBS\lslib.RLB)               */
  293. /* ------------------------------------------------------------------ */
  294.  
  295. LS_ServerModalInfo:
  296. Arg Server,InfoStem
  297. Server = '\\' || Strip(Server,'L','\')
  298. NetServerModals = 370
  299. If Length(Server)= 2 Then Server = ''
  300. Rc = NetGetInfo(NetServerModals,InfoStem,Server)
  301. Return Rc
  302.  
  303. /* ----- RXPP ------------------------------------------------------- */
  304. /* Membre : COLOR (D:\RXPP\LIBS\OS2.RLB)                              */
  305. /* ------------------------------------------------------------------ */
  306.  
  307. /* Cette procédure permet l'affichage d'un mot en couleur            */
  308. /* Elle retroune la chaîne passée entourée des caractères spéciaux   */
  309. /* qui interceptés par ANSI.SYS assureront le changement de couleur. */
  310. /* On ne sait pas, pour le moment afficher en mode souligné et blink */
  311. Color: Procedure
  312. Parse Arg Color,High,Text
  313.  
  314. All_Cols = 'DEF BLU RED PIN GRE TUR YEL WHI'
  315. All_High = 'NON BLI REV UND HIG'
  316.  
  317. Intro    = X2C('1b') || '['
  318. Fin      = Intro || '0m'
  319.  
  320. Color = Translate(Substr(Strip(Color,'B'),1,3))
  321. Highl = Translate(Substr(Strip(High ,'B'),1,3))
  322. Color = Word('DEF'  All_Cols,1+WordPos(Color,All_Cols))
  323. Highl = Word('NONE' All_High,1+WordPos(Highl,All_High))
  324. Select
  325.    when Color = 'DEF' then code = 0
  326.    When Color = 'BLU' then code = 34
  327.    When Color = 'RED' then code = 31
  328.    When Color = 'PIN' then code = 35
  329.    When Color = 'GRE' then code = 32
  330.    When Color = 'TUR' then code = 36
  331.    When Color = 'YEL' then code = 33
  332.    When Color = 'WHI' then code = 37
  333. otherwise Code = 0
  334. end  /* select */
  335. Select
  336.    when Highl = 'NON' then Code = Code || ';1m'
  337.    when Highl = 'BLI' then Code = Code || ';1m'
  338.    when Highl = 'REV' then Code = Code + 10 || ';1m'
  339.    When Highl = 'UND' then Code = Code || ';1m'
  340.    When Highl = 'HIG' then Code = Code || ';1m'
  341. otherwise Code = Code || ';m'
  342. end  /* select */
  343. Return Intro || Code || Text || Fin
  344.  
  345. /* ----- RXPP ------------------------------------------------------- */
  346. /* Membre : SAY_COLOR (D:\RXPP\LIBS\OS2.RLB)                          */
  347. /* ------------------------------------------------------------------ */
  348.  
  349. /* Cette procédure affiche une ligne dans la couleur spécifiée.      */
  350. /* Elle utilise les services de Color et a donc les mêmes limitations*/
  351. Say_Color: Procedure
  352. Parse Arg Col,High,Text
  353. Say Color(Col,High,Text)                         
  354. Return
  355.  
  356. /* ----- RXPP ------------------------------------------------------- */
  357. /* Membre : DISPLAY (D:\RXPP\LIBS\OS2.RLB)                            */
  358. /* ------------------------------------------------------------------ */
  359.  
  360. /* This function displays a message in a color representative of     */
  361. /* it's severity. The message is in the form s text where s is the   */
  362. /* severity. The functions PMsg and SMSg are in charge of setting    */
  363. /* the replaceable parameters with the supplied values.              */
  364. /* This ones only detects the severity and call Say_Color accordingly*/
  365. /* The colors are defines in the file STANDARD.COL */
  366. Display: procedure
  367.  
  368. /* ----- RXPP ------------------------------------------------------- */
  369. /* Les lignes suivantes ont été générées par une directive SETSTEM    */
  370. /* impliquant le fichier D:\RXPP\SYS\STANDARD.COL                     */
  371. /* ------------------------------------------------------------------ */
  372.  
  373. __COLORS__.E = 'Red'
  374. __COLORS__.I = 'Turquoise'
  375. __COLORS__.W = 'White'
  376. __COLORS__.Q = 'Yellow'
  377. __COLORS__.S = 'Red'
  378. __COLORS__.R = 'Yellow'
  379. __COLORS__.T = 'Red'
  380.  
  381. /* ----- RXPP ------------------------------------------------------- */
  382. /* Fin des lignes générées par SETSTEM                                */
  383. /* ------------------------------------------------------------------ */
  384.  
  385. Parse Arg Sev Text
  386. Sev = Translate(Sev)
  387. Call Say_Color __Colors__.Sev,'NONE',Text
  388. Return
  389.  
  390. /* ----- RXPP ------------------------------------------------------- */
  391. /* Membre : LINEASK (D:\RXPP\LIBS\OS2.RLB)                            */
  392. /* ------------------------------------------------------------------ */
  393.  
  394. LineAsk: Procedure
  395.  
  396. /* ----- RXPP ------------------------------------------------------- */
  397. /* Les lignes suivantes ont été générées par une directive SETSTEM    */
  398. /* impliquant le fichier D:\RXPP\SYS\STANDARD.COL                     */
  399. /* ------------------------------------------------------------------ */
  400.  
  401. __COLORS__.E = 'Red'
  402. __COLORS__.I = 'Turquoise'
  403. __COLORS__.W = 'White'
  404. __COLORS__.Q = 'Yellow'
  405. __COLORS__.S = 'Red'
  406. __COLORS__.R = 'Yellow'
  407. __COLORS__.T = 'Red'
  408.  
  409. /* ----- RXPP ------------------------------------------------------- */
  410. /* Fin des lignes générées par SETSTEM                                */
  411. /* ------------------------------------------------------------------ */
  412.  
  413. Parse Arg Sev Text
  414. Sev = Translate(Sev)
  415. Call Charout ,Color(__Colors__.Sev,'NONE',Text || ' ')
  416. Return
  417.  
  418. /* ----- RXPP ------------------------------------------------------- */
  419. /* Membre : DLL_NEEDED (D:\RXPP\LIBS\OS2.RLB)                         */
  420. /* ------------------------------------------------------------------ */
  421.  
  422. DLL_Needed: Procedure Expose  __LibPath__
  423. Arg Dll
  424. Parse Var Dll Dll '.' .            /* get rid of a potential .DLL extension*/
  425. If Symbol('__LibPath__') = 'LIT'
  426.   Then Do
  427.          BootDrive = FileSpec('Drive',Value('ComSpec',,'OS2ENVIRONMENT'))
  428. /* As we are perhaps asked to check for RexxUtil availability, we cannot   */
  429. /* rely on SysFileSearch to get the value assigned to LIBPATH in CONFIG.SYS*/
  430. /* We will do the work by ourselves ...                                    */
  431.          ConfigSys = BootDrive || '\CONFIG.SYS'
  432.          LibPath   = ''
  433.          Do While Lines(ConfigSys) > 0
  434.            Line = Space(Translate(LineIn(ConfigSys)))
  435.            If Abbrev(Line,'LIBPATH')
  436.              Then Do
  437.                     Parse Var Line . '=' LibPath
  438.                     Leave
  439.                   End
  440.          End                                                      /* End do*/
  441.          Call Stream ConfigSys,'COMMAND','CLOSE'        /* Close Config.Sys*/
  442.          If LibPath = '' Then Return 0                  /* Just in case ...*/
  443.          __LibPath__ = LibPath             /* Store it for future reference*/
  444.        End
  445.   Else LibPath = __LibPath__
  446.  
  447. /* Now just scan the path to find out if the DLL will be available ...     */
  448. Ok = 0
  449. Do Until (LibPath = '') | Ok
  450.   Parse Var LibPath Test ';' LibPath
  451.   Test = Strip(Space(Test),'T','\') || '\' || Dll || '.DLL'
  452.   Ok =  Stream(Test,'COMMAND','QUERY EXISTS') \= ''
  453. End                                                               /* End do*/
  454. /* We come here either via the leave implied by our test and then ok = 1   */
  455. /* or because the contents of LibPath has been exhausted and then ok = 0   */
  456. Return Ok
  457.  
  458. /* ----- RXPP ------------------------------------------------------- */
  459. /* Membre : PMSG (D:\RXPP\LIBS\STANDARD.RLB)                          */
  460. /* ------------------------------------------------------------------ */
  461.  
  462. /* ------------------------------------------------------------------ */
  463. /* NAME       : Pmsg                                                  */
  464. /* TYPE       : Function                                              */
  465. /* PARAMETERS : Message number, parameters                            */
  466. /* INPUT      : Message_number identifies the program messages        */
  467. /*              a variable number of parameters is allowed. These     */
  468. /*              parameters will be used to replace the &n markers     */
  469. /* OUTPUT     : The updated message is returned                       */
  470. /* FUNCTION   : Allows the dynamic contruction of messages            */
  471. /* EXAMPLE    : String = Pmsg(1,name)                                 */
  472. /* NOTES      : Code very similar to SMsg                             */
  473. /*              Building is dynamic with %%LANG%% variable            */
  474. /*              XMSG is required                                      */
  475. /* ------------------------------------------------------------------ */
  476. Pmsg: Procedure Expose __PMSGS__. __COLORS__. __PROGNAME__
  477. Trace Off
  478. If __Pmsgs__.1 = '__PMSGS__.1' Then Do  /* not set or not exposed     */
  479.  
  480. /* ----- RXPP ------------------------------------------------------- */
  481. /* Les lignes suivantes ont été générées par une directive SETSTEM    */
  482. /* impliquant le fichier E:\aurora\newdev\ResyncPW.eng                */
  483. /* ------------------------------------------------------------------ */
  484.  
  485. __PMSGS__.1 = 'Q Enter a LOCAL administrator UserID .................'
  486. __PMSGS__.2 = 'Q Enter the corresponding password ...................'
  487. __PMSGS__.3 = 'E Local logon as &1 failed.'
  488. __PMSGS__.4 = 'E Unable to get the name of this server'
  489. __PMSGS__.5 = 'I Role changed from &1 to STANDALONE'
  490. __PMSGS__.6 = 'E Needed file &1 is not in your PATH.'
  491. __PMSGS__.7 = 'Q Enter a DOMAIN administrator UserID ................'
  492. __PMSGS__.8 = 'E Role cannot be changed to STANDALONE'
  493. __PMSGS__.9 = 'I Password for &1 has been updated on &2'
  494. __PMSGS__.10 = 'I Error occured when trying to update the password of &1'
  495. __PMSGS__.11 = 'W Have you issued a NET STOP SERVER?'
  496. __PMSGS__.12 = 'I NET START SERVER command issued'
  497. __PMSGS__.13 = 'I LOGOFF has been issued'
  498. __PMSGS__.14 = 'I Role of &1 successfuly changed to &2'
  499. __PMSGS__.15 = 'E Role of &1 was not updated to &2'
  500. __PMSGS__.16 = 'W Local Password ........ : &1'
  501. __PMSGS__.17 = 'W Domain Password ....... : &1'
  502. __PMSGS__.18 = 'E Passwords seem to be synchronized. Problem must be further analyzed'
  503. __PMSGS__.19 = 'W The role of this machine has been left as STANDALONE'
  504.  
  505. /* ----- RXPP ------------------------------------------------------- */
  506. /* Fin des lignes générées par SETSTEM                                */
  507. /* ------------------------------------------------------------------ */
  508.  
  509.  
  510. /* ----- RXPP ------------------------------------------------------- */
  511. /* La ligne suivante a été générée par une directive SETVAR           */
  512. /* ------------------------------------------------------------------ */
  513.  
  514. __PROGNAME__ = 'RESYNCPW'
  515. End  /* EndIf */
  516. Parse Arg Number,Parms
  517. String = __PMSGS__.Number
  518. Do _i = 1 By 1 Until Pos('&' || _i,String) = 0; End _i
  519. NParms = _i - 1
  520. Do _i = 1 To NParms
  521.   LookFor = '&' || _i
  522.   Parse Var String before (lookfor) after
  523.   String = before || Arg(_i + 1) || after
  524. End _i
  525. Return String
  526.