@ECHO OFF
REM RVKC.BAT - delayed user-context REVOKE readback helper.
REM Started by RVKSTA via DLYSTRT. Runs from C:\RVKTMP.

C:
CD \RVKTMP

ECHO RVKC user-context REVOKE readback helper > HELPER.TXT
ECHO Current phase: logout supervisor, login NOPASSUSER. >> HELPER.TXT

LOGOUT > ULOG1.OUT
LOGIN NOPASSUSER > ULOGIN.OUT

IF NOT EXIST UNOV MD UNOV
IF NOT EXIST UPUB MD UPUB

F:
CD \
IF EXIST \NPUBLIC\RIGHTS.EXE GOTO HAVEF
ECHO F: not ready after NOPASSUSER login. >> C:\RVKTMP\HELPER.TXT
GOTO RELSUP

:HAVEF
ECHO Starting G10_R as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G10 > C:\RVKTMP\UNOV\G10_R.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G10 > C:\RVKTMP\UPUB\G10_R.OUT
ECHO Starting G11_W as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G11 > C:\RVKTMP\UNOV\G11_W.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G11 > C:\RVKTMP\UPUB\G11_W.OUT
ECHO Starting G12_C as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G12 > C:\RVKTMP\UNOV\G12_C.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G12 > C:\RVKTMP\UPUB\G12_C.OUT
ECHO Starting G13_E as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G13 > C:\RVKTMP\UNOV\G13_E.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G13 > C:\RVKTMP\UPUB\G13_E.OUT
ECHO Starting G14_M as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G14 > C:\RVKTMP\UNOV\G14_M.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G14 > C:\RVKTMP\UPUB\G14_M.OUT
ECHO Starting G15_F as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G15 > C:\RVKTMP\UNOV\G15_F.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G15 > C:\RVKTMP\UPUB\G15_F.OUT
ECHO Starting G16_A as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G16 > C:\RVKTMP\UNOV\G16_A.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G16 > C:\RVKTMP\UPUB\G16_A.OUT
ECHO Starting G17_S as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G17 > C:\RVKTMP\UNOV\G17_S.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G17 > C:\RVKTMP\UPUB\G17_S.OUT
ECHO Starting G20_RF as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G20 > C:\RVKTMP\UNOV\G20_RF.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G20 > C:\RVKTMP\UPUB\G20_RF.OUT
ECHO Starting G21_RW as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G21 > C:\RVKTMP\UNOV\G21_RW.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G21 > C:\RVKTMP\UPUB\G21_RW.OUT
ECHO Starting G22_RWC as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G22 > C:\RVKTMP\UNOV\G22_RWC.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G22 > C:\RVKTMP\UPUB\G22_RWC.OUT
ECHO Starting G23_RWCE as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G23 > C:\RVKTMP\UNOV\G23_RWCE.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G23 > C:\RVKTMP\UPUB\G23_RWCE.OUT
ECHO Starting G24_EMF as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G24 > C:\RVKTMP\UNOV\G24_EMF.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G24 > C:\RVKTMP\UPUB\G24_EMF.OUT
ECHO Starting G25_SAL as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G25 > C:\RVKTMP\UNOV\G25_SAL.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G25 > C:\RVKTMP\UPUB\G25_SAL.OUT
ECHO Starting G26_ALL as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G26 > C:\RVKTMP\UNOV\G26_ALL.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G26 > C:\RVKTMP\UPUB\G26_ALL.OUT
ECHO Starting G30_RE as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G30 > C:\RVKTMP\UNOV\G30_RE.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G30 > C:\RVKTMP\UPUB\G30_RE.OUT
ECHO Starting G31_RWF as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G31 > C:\RVKTMP\UNOV\G31_RWF.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G31 > C:\RVKTMP\UPUB\G31_RWF.OUT
ECHO Starting G32_RCM as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G32 > C:\RVKTMP\UNOV\G32_RCM.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G32 > C:\RVKTMP\UPUB\G32_RCM.OUT
ECHO Starting G33_RFA as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G33 > C:\RVKTMP\UNOV\G33_RFA.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G33 > C:\RVKTMP\UPUB\G33_RFA.OUT
ECHO Starting G34_WCM as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G34 > C:\RVKTMP\UNOV\G34_WCM.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G34 > C:\RVKTMP\UPUB\G34_WCM.OUT
ECHO Starting G35_EMF as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G35 > C:\RVKTMP\UNOV\G35_EMF.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G35 > C:\RVKTMP\UPUB\G35_EMF.OUT
ECHO Starting G36_RMF as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G36 > C:\RVKTMP\UNOV\G36_RMF.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G36 > C:\RVKTMP\UPUB\G36_RMF.OUT
ECHO Starting G37_REMA as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G37 > C:\RVKTMP\UNOV\G37_REMA.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G37 > C:\RVKTMP\UPUB\G37_REMA.OUT
ECHO Starting G38_SR as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G38 > C:\RVKTMP\UNOV\G38_SR.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G38 > C:\RVKTMP\UPUB\G38_SR.OUT
ECHO Starting G39_SRF as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G39 > C:\RVKTMP\UNOV\G39_SRF.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G39 > C:\RVKTMP\UPUB\G39_SRF.OUT
ECHO Starting G40_SWCM as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\G40 > C:\RVKTMP\UNOV\G40_SWCM.OUT
\PUBLIC\RIGHTS F:\RVKTEST\G40 > C:\RVKTMP\UPUB\G40_SWCM.OUT
ECHO Starting F10_R as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\F10\T.TXT > C:\RVKTMP\UNOV\F10_R.OUT
\PUBLIC\RIGHTS F:\RVKTEST\F10\T.TXT > C:\RVKTMP\UPUB\F10_R.OUT
ECHO Starting F11_RF as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\F11\T.TXT > C:\RVKTMP\UNOV\F11_RF.OUT
\PUBLIC\RIGHTS F:\RVKTEST\F11\T.TXT > C:\RVKTMP\UPUB\F11_RF.OUT
ECHO Starting F12_RAL as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\F12\T.TXT > C:\RVKTMP\UNOV\F12_RAL.OUT
\PUBLIC\RIGHTS F:\RVKTEST\F12\T.TXT > C:\RVKTMP\UPUB\F12_RAL.OUT
ECHO Starting F13_ALL as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\F13\T.TXT > C:\RVKTMP\UNOV\F13_ALL.OUT
\PUBLIC\RIGHTS F:\RVKTEST\F13\T.TXT > C:\RVKTMP\UPUB\F13_ALL.OUT
ECHO Starting F14_N as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\F14\T.TXT > C:\RVKTMP\UNOV\F14_N.OUT
\PUBLIC\RIGHTS F:\RVKTEST\F14\T.TXT > C:\RVKTMP\UPUB\F14_N.OUT
ECHO Starting F15_S as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\F15\T.TXT > C:\RVKTMP\UNOV\F15_S.OUT
\PUBLIC\RIGHTS F:\RVKTEST\F15\T.TXT > C:\RVKTMP\UPUB\F15_S.OUT
ECHO Starting F16_SAL as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\F16\T.TXT > C:\RVKTMP\UNOV\F16_SAL.OUT
\PUBLIC\RIGHTS F:\RVKTEST\F16\T.TXT > C:\RVKTMP\UPUB\F16_SAL.OUT
ECHO Starting S10_R as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\S10\S1 > C:\RVKTMP\UNOV\S10_R.OUT
\PUBLIC\RIGHTS F:\RVKTEST\S10\S1 > C:\RVKTMP\UPUB\S10_R.OUT
ECHO Starting S11_RWC as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\S11\S1 > C:\RVKTMP\UNOV\S11_RWC.OUT
\PUBLIC\RIGHTS F:\RVKTEST\S11\S1 > C:\RVKTMP\UPUB\S11_RWC.OUT
ECHO Starting S12_ALL as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\S12\S1 > C:\RVKTMP\UNOV\S12_ALL.OUT
\PUBLIC\RIGHTS F:\RVKTEST\S12\S1 > C:\RVKTMP\UPUB\S12_ALL.OUT
ECHO Starting S13_SAL as NOPASSUSER... >> C:\RVKTMP\HELPER.TXT
\NPUBLIC\RIGHTS F:\RVKTEST\S13\S1 > C:\RVKTMP\UNOV\S13_SAL.OUT
\PUBLIC\RIGHTS F:\RVKTEST\S13\S1 > C:\RVKTMP\UPUB\S13_SAL.OUT

:RELSUP
C:
CD \RVKTMP
LOGOUT > ULOG2.OUT

F:
CD \
IF EXIST \LOGIN\LOGIN.EXE GOTO HAVELOG
ECHO F:\LOGIN\LOGIN.EXE not found. >> C:\RVKTMP\HELPER.TXT
GOTO MANUAL

:HAVELOG
F:\LOGIN\LOGIN SUPERVISOR /PWD:%LGNTPWD% > C:\RVKTMP\ULGSUP.OUT

F:
CD \
IF EXIST \RVKSTA.BAT GOTO QUEUEP2
ECHO F: not restored or \RVKSTA.BAT missing. >> C:\RVKTMP\HELPER.TXT
GOTO MANUAL

:QUEUEP2
C:
CD \RVKTMP
DLYSTRT /T:2 F:\RVKSTA.BAT PART2
GOTO END

:MANUAL
ECHO Please run manually after SUPERVISOR login: >> C:\RVKTMP\HELPER.TXT
ECHO   F: >> C:\RVKTMP\HELPER.TXT
ECHO   CD \ >> C:\RVKTMP\HELPER.TXT
ECHO   RVKSTA PART2 >> C:\RVKTMP\HELPER.TXT

:END
