[Q]: ������ �p娢 WPS ��� �ᯮ�짮����� arcinst.exe � arcrecov.exe
[A]: Yegor Dolzhikov (2:463/5050)
��� ᯮᮡ ��p������ ���⮯� ����� p� �p���y��� �� �p������� �
���� �ᥢ� arcinst.exe. ��-��p���, ����� �p娢 �p���⠢��� ᮡ��
���� zip-䠩�, � ���p�� �p������ �� 䠩�� ����� � �� p���p���묨 ��p��y⠬�. �� ��������, 祬 �p����� 䠩�� ��y��������묨, ��� ��
������ arcinst.exe, � ⮬y ��, ᭨������ ��p��⭮��� ���p� ��� ��p� ea. ��-��p��, ��p������ ����� ��� WPS ��⠫�� Nowhere, 祣� arcinst.exe �� ������. �p� ���p� ea .classinfo WPS �� �p������ ��� ��⠫�� � �⪠�뢠���� ���py������. � ��饬 �p���� �� ��� �⭮襭��� � ������� ᯮᮡ.
�⠪, ��p�� ����� y���塞 arcinst.exe � arcrecov.exe, � ⠪�� �� ᮤ�p����� ��⠫��� \os2\archives (�� �⮣� ������� ���y���� checkini �� ����p�
y⨫�� wptools). ����p� ᮡ�⢥��� �p����:
\os2\arcinst.cmd - � ����, ��p���� � ��� ��y� �p���� \os2\arcrecov.cmd ���py���� ��� � �y�� � (un)zip.exe
=== [arcinst.cmd] ===
/**/
'@echo off'
call rxfuncadd 'sysloadfuncs', 'rexxutil', 'sysloadfuncs'
call sysloadfuncs
bootdrive='d'
zip='c:\arch\zip.exe'
adir=bootdrive':\os2\archives\'
if right(adir,1)<>'\' then
adir=adir'\'
filename=adir'arch1.zip'
if stream(adir'arch3.zip', 'c', 'query exists')<>'' then
'erase 'adir'arch3.zip'
if stream(adir'arch2.zip', 'c', 'query exists')<>'' then
'ren 'adir'arch2.zip arch3.zip'
if stream(adir'arch1.zip', 'c', 'query exists')<>'' then
'ren 'adir'arch1.zip arch2.zip'
say 'Creating archive 'filename'... '
'attrib -H -S 'bootdrive':\OS2\OS2.INI'
'attrib -H -S 'bootdrive':\OS2\OS2SYS.INI'
'attrib -H -S 'bootdrive':\NOWHERE'
zip '-9 -r -S -@ 'filename'<'adir'arch.cfg|'adir'pp.cmd'
'attrib -H +S 'bootdrive':\OS2\OS2.INI'
'attrib -H +S 'bootdrive':\OS2\OS2SYS.INI'
'attrib +H +S 'bootdrive':\NOWHERE'
say '0a0d'x||'Done.'
bdir=bootdrive':\os2\boot\'
if stream(bdir'config.2', 'c', 'query exists')<>'' then
'copy 'bdir'config.2 'bdir'config.3>nul'
if stream(bdir'config.1', 'c', 'query exists')<>'' then
'copy 'bdir'config.1 'bdir'config.2>nul'
'copy 'bootdrive':\config.sys 'bdir'\config.1>nul'
altf1mid=bootdrive':\OS2\BOOT\ALTF1MID.SCR'
'attrib -H -S -R 'altf1mid
call sysfiledelete altf1mid
s1=' 1) Archive created 'stream(adir'arch1.zip', 'c', 'query datetime') s2='';s3=''
if stream(adir'arch2.zip', 'c', 'query exists')<>'' then
s2=' 2) Archive created 'stream(adir'arch2.zip', 'c', 'query datetime')
if stream(adir'arch3.zip', 'c', 'query exists')<>'' then
s3=' 3) Archive created 'stream(adir'arch3.zip', 'c', 'query datetime')
call lineout altf1mid, s1
call lineout altf1mid, s2
call lineout altf1mid, s3
call stream altf1mid, 'c', 'close'
=== eof [arcinst.cmd] ===
=== [arcrecov.cmd] ===
/**/
'@echo off'
call rxfuncadd 'sysloadfuncs', 'rexxutil', 'sysloadfuncs'
call sysloadfuncs
bootdrive='d'
unzip='c:\arch\unzip.exe'
adir=bootdrive':\os2\archives\'
if right(adir,1)<>'\' then
adir=adir'\'
parse arg num
if num<>'1' & num<>'2' & num<>'3' then
exit
if stream(adir'arch'num'.zip', 'c', 'query exists')='' then
exit
cfg=adir'arch.cfg'
do while lines(cfg)>0
call xerase linein(cfg)
end
call stream cfg, 'c', 'close'
'@'unzip' 'adir'arch'num'.zip -d 'bootdrive':\'
'attrib -H +S 'bootdrive':\OS2\OS2.INI'
'attrib -H +S 'bootdrive':\OS2\OS2SYS.INI'
'attrib +H +S 'bootdrive':\NOWHERE'
exit
xerase: procedure
if stream(arg(1), 'c', 'query exists')<>'' then do
'attrib -R -H -S 'arg(1)
call sysfiledelete arg(1)
end
else do
call sysfiletree arg(1)'\*', st, 'SFO'
if st.0=0 then return
do i=1 to st.0
if sysfiledelete(st.i)=5 then do
'attrib -R -H -S 'st.i
call sysfiledelete st.i
end
end
call sysfiletree arg(1)'\*', st, 'SDO'
do until s=0
s=0
do i=1 to st.0
if sysrmdir(st.i)=5 then s=1
end
end
call sysrmdir arg(1)
end
return
=== eof [arcrecov.cmd] ===
\os2\archives\arch.cfg - � y ��� py�᪠� os/2, ��p���� ����� �y�,
����� �������� � ��� ᯨ᮪ � 䠩��, ���p� ���� ��������.
=== [arch.cfg] ===
D:\CONFIG.SYS
D:\AUTOEXEC.BAT
D:\STARTUP.CMD
D:\DESKTOP
D:\OS2\OS2.INI
D:\OS2\OS2SYS.INI
D:\OS2\SYSTEM\SYSTEM.DAT
D:\OS2\SYSTEM\USER.DAT
D:\NOWHERE
=== eof [arch.cfg] ===
\os2\archives\pp.cmd - ��, �⮡ �p� ��⮡����� �� startup.cmd zip.exe
����� �� ��p�� �� ��ᠫ... :) � ���, �⮡ ��-⠪� ��ᠫ,
y��p�� � arcinst.cmd "|'adir'pp.cmd'" � ��p��� ���y᪠ ����.
=== [pp.cmd] ===
/* ��頫��-��p����� :-) */
call trace "off";ppc=0;pps='|/-\'
signal on notready name programend
do while lines("STDIN")<>0
call linein "STDIN"
call charout "STDOUT",'0d'x||substr(pps,ppc+1,1)
ppc=(ppc+1)//4
end
programend:
=== eof [pp.cmd] ===
\os2\boot\altf1.cmd - �⨬ 䠩��� ������� y�� ����騩�� y ���.
=== [altf1.cmd] ===
@ECHO OFF
IF @%1==@ goto end
IF V==%1 GOTO setvga
IF v==%1 GOTO setvga
IF M==%1 GOTO setvga
IF m==%1 GOTO setvga
DETACH D:\OS2\SRVREXX
call arcrecov %1
echo Press CTRL-ALT-DELETE now!
:loop
GOTO loop
:setvga
setvga
:end
=== eof [altf1.cmd] ===
\os2\srvrexx.exe - ��p���� � ����p��y⨢���� ��᪠ (\cid\locinstu),
�y���, �⮡ rexx p���⠫ �� ���py��� PM.
��� ��⮬����� ������ �p� ���py��� �p������� yp������ ��p���� ����� StartUp.cmd (� ������ �p娢 ��p� �p�� ����, � ������ ���� �p娢):
=== [startup.cmd] ===
/**/
a='d:\os2\archives\arch1.zip'
if stream(a, 'c', 'query exists')<>'' then do
d=stream(a, 'c', 'query datetime')
d=substr(d, 4, 3)substr(d, 1, 3)substr(d, 7, 2)
delta=dmytojulian(d)-dmytojulian(translate(date('E'),'-','/'))
end
else
delta=2000
if delta>3 then
'@call d:\os2\arcinst.cmd'
'@exit'
DMYToJulian: PROCEDURE
parse arg dmyDate trans
parse var dmyDate YMDD "-" YMDM "-" YMDY
YMDY=YMDY+2000
if Trans = "" then
Trans = 2299161
AY = YMDY
if YMDY < 0 then
Y = YMDY + 4717
else
Y = YMDY + 4716
if YMDM < 3 then
do
M = YMDM + 12
Y = Y - 1
AY = AY - 1
end
else
M = YMDM
D = Trunc((1461 * Y) / 4) + Trunc((153 * (M + 1)) / 5) + YMDD - 1524
G = D + 2 - Trunc(AY / 100) + Trunc(AY / 400) - Trunc(AY / 4000)
if G >= Trans then
thisRC = G
else
thisRC = D
RETURN thisRC
=== eof [startup.cmd] ===
�p娢��p Info-ZIP ����� ����� ��
http://www.cdrom.com/pub/infozip/.
���! �p�楤yp� ����⠭������� WPS �� �p娢� �� ���������� - ��� ⠪ ��
��� �p� ���py��� Alt-F1, �� Recovery Choice �롨p��� �y��� �� �p娢
� ��p����py������ �� �p� �������, ����� ��⥬� �� �⮬ ���p��� (���
�y饩 ��⮬�⨪� ����� �y�� - � altf1.cmd - ��⠢��� Reboot.exe �� GTU, ��
�� �� ��� �ᥬ� ��ﬨ p���⠥�).
--- INN 2.7.3 (rc1 version)
* Origin: This echo is READ-ONLY. Send %HELP to FAQSERVER at (2:5020/181)