@ECHO OFF
REM RMVC.BAT - delayed user-context REMOVE readback helper.
REM Started by RMVSTA via DLYSTRT. Runs from C:\RMVTMP.

C:
CD \RMVTMP

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

LOGOUT > ULOG1.OUT
LOGIN NOPASSUSER > ULOGIN.OUT

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

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

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

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

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

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

:QUEUEP2
C:
CD \RMVTMP
DLYSTRT /T:2 F:\RMVSTA.BAT PART2
GOTO END

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

:END
