If Not Exist "%I386%\Prodspec.ini" (
  cls
  color FC
  Set Err=Ошибка: в дистрибутиве не найден файл Prodspec.ini.
  GoTo :EOF
)
Find /I "Product=Windows XP " "%I386%\Prodspec.ini" >nul
If Not "!ErrorLevel!"=="0" (
  cls
  color FC
  Set Err=Ошибка: дистрибутив не Windows XP.
  GoTo :EOF
)
Find /I "Localization=Russian" "%I386%\Prodspec.ini" >nul
If Not "!ErrorLevel!"=="0" (
  cls
  color FC
  Set Err=Ошибка: дистрибутив не русский.
  GoTo :EOF
)
If Not Exist "%I386%\SP3.cat" (
  cls
  color FC
  Set Err=Ошибка: дистрибутив без интегрированного SP3.
  GoTo :EOF
)
If Exist "%I386%\NLITE.IN_" (
  cls
  color FC
  Set Err=Ошибка: Дистрибутив модифицирован nLite. Интеграция остановлена.
  GoTo :EOF
)

Set NotOrig=0
cd Files
Call :ChkSize 6to4svc.dll 100864
Call :ChkSize aaclient.dll 136192
Call :ChkSize aclayers.dll 471552
Call :ChkSize adsldp.dll 176128
Call :ChkSize adsmsext.dll 68096
Call :ChkSize advapi32.dll 688640
Call :ChkSize afd.sys 138496
Call :ChkSize apphelp.sdb 180364
Call :ChkSize apph_sp.sdb 790846
Call :ChkSize apps.chm 92268
Call :ChkSize apps_sp.chm 313764
Call :ChkSize asp51.dll 373760
Call :ChkSize asycfilt.dll 65536
Call :ChkSize atl.dll 58880
Call :ChkSize atmfd.dll 290816
Call :ChkSize avifil32.dll 85504
Call :ChkSize browser.dll 78336
Call :ChkSize bthport.sys 272512
Call :ChkSize cabview.dll 86528
Call :ChkSize calc.exe 968464
Call :ChkSize cdm.dll 97304
Call :ChkSize comctl32.dll 617472
Call :ChkSize crypt32.dll 606208
Call :ChkSize cryptdlg.dll 74752
Call :ChkSize cscript.exe 135168
Call :ChkSize csrsrv.dll 33280
Call :ChkSize dhtmled.ocx 128512
Call :ChkSize dnsapi.dll 149504
Call :ChkSize dnsrslvr.dll 45568
Call :ChkSize dpnet.dll 375296
Call :ChkSize drvmain.sdb 9696
Call :ChkSize dsuiext.dll 113152
Call :ChkSize encdec.dll 186880
Call :ChkSize es.dll 253952
Call :ChkSize fastprox.dll 473600
Call :ChkSize fontsub.dll 81920
Call :ChkSize ftpsv251.dll 126976
Call :ChkSize fxscover.exe 234496
Call :ChkSize gdi32.dll 287744
Call :ChkSize gptext.dll 200704
Call :ChkSize helpsvc.exe 744448
Call :ChkSize hidparse.sys 25088
Call :ChkSize html32.cnv 321920
Call :ChkSize http.sys 265728
Call :ChkSize httpapi.dll 25088
Call :ChkSize httpext.dll 268288
Call :ChkSize iccvid.dll 80384
Call :ChkSize imagehlp.dll 150528
Call :ChkSize inetcomm.dll 692736
Call :ChkSize infocomm.dll 257024
Call :ChkSize ipnathlp.dll 330752
Call :ChkSize irbus.sys 46848
Call :ChkSize isign32.dll 81920
Call :ChkSize iuengine.dll 198616
Call :ChkSize iyuv_32.dll 48128
Call :ChkSize jscript.dll 512000
Call :ChkSize kerberos.dll 301568
Call :ChkSize kernel32.dll 999424
Call :ChkSize ksecdd.sys 92928
Call :ChkSize l3codeca.acm 307260
Call :ChkSize l3codecx.ax 143422
Call :ChkSize lhmstsc.exe 677888
Call :ChkSize lhmstscx.dll 2069504
Call :ChkSize locale.nls 265822
Call :ChkSize localspl.dll 347136
Call :ChkSize lsasrv.dll 732160
Call :ChkSize mciseq.dll 23040
Call :ChkSize mfc40.dll 954368
Call :ChkSize mfc40u.dll 953856
Call :ChkSize mfc42.dll 978944
Call :ChkSize mfc42u.dll 974848
Call :ChkSize moviemk.exe 3558912
Call :ChkSize mpg2splt.ax 148992
Call :ChkSize mrxdav.sys 180096
Call :ChkSize mrxsmb.sys 457856
Call :ChkSize msadce.dll 331776
Call :ChkSize msadco.dll 143360
Call :ChkSize msado15.dll 565248
Call :ChkSize msado20.tlb 61440
Call :ChkSize msado21.tlb 61440
Call :ChkSize msado25.tlb 77824
Call :ChkSize msado26.tlb 77824
Call :ChkSize msado27.tlb 81920
Call :ChkSize msadomd.dll 180224
Call :ChkSize msador15.dll 57344
Call :ChkSize msadox.dll 200704
Call :ChkSize msasn1.dll 58880
Call :ChkSize msaud32.acm 282654
Call :ChkSize mscms.dll 74240
Call :ChkSize msconv97.dll 119648
Call :ChkSize msctfime.ime 177152
Call :ChkSize msdtclog.dll 58880
Call :ChkSize msdtcprx.dll 428032
Call :ChkSize msdtctm.dll 956928
Call :ChkSize msdtcuiu.dll 161792
Call :ChkSize msgsc.dll 83968
Call :ChkSize msi.dll 4445184
Call :ChkSize msiexec.exe 95744
Call :ChkSize msihnd.dll 332800
Call :ChkSize msimain.sdb 229450
Call :ChkSize msimsg.dll 2560
Call :ChkSize msisip.dll 18944
Call :ChkSize msjro.dll 102400
Call :ChkSize msoe.dll 1315328
Call :ChkSize mspaint.exe 345088
Call :ChkSize msrle32.dll 11264
Call :ChkSize msv1_0.dll 136704
Call :ChkSize msvidc32.dll 28672
Call :ChkSize msw3prt.dll 74752
Call :ChkSize mswebdvd.dll 204800
Call :ChkSize mswrd6.wpc 188416
Call :ChkSize mswrd632.wpc 187392
Call :ChkSize mswrd8.wpc 280576
Call :ChkSize mswrd832.cnv 215888
Call :ChkSize mswsock.dll 247296
Call :ChkSize msxml2.dll 701440
Call :ChkSize msxml3.dll 1172992
Call :ChkSize msxml6.dll 1446912
Call :ChkSize msyuv.dll 17920
Call :ChkSize mtxclu.dll 66560
Call :ChkSize mtxoci.dll 91648
Call :ChkSize mup.sys 105472
Call :ChkSize ndistapi.sys 10496
Call :ChkSize ndproxy.sys 40960
Call :ChkSize netapi32.dll 339968
Call :ChkSize netlogon.dll 407040
Call :ChkSize ntdll.dll 722432
Call :ChkSize ntdsapi.dll 68096
Call :ChkSize ntkrnlmp.exe 2151936
Call :ChkSize ntkrnlpa.exe 2071936
Call :ChkSize ntkrpamp.exe 2030592
Call :ChkSize ntoskrnl.exe 2195328
Call :ChkSize ntprint.cat 1089883
Call :ChkSize ntprint.dll 91136
Call :ChkSize ntprint.inf 1498904
Call :ChkSize oakley.dll 279040
Call :ChkSize odbc32.dll 253952
Call :ChkSize odbcbcp.dll 24576
Call :ChkSize ole32.dll 1289216
Call :ChkSize oleaut32.dll 552448
Call :ChkSize packager.exe 60416
Call :ChkSize pdh.dll 284672
Call :ChkSize policman.dll 92672
Call :ChkSize psbase.dll 97280
Call :ChkSize qdvd.dll 386560
Call :ChkSize qedit.dll 563200
Call :ChkSize quartz.dll 1293824
Call :ChkSize query.dll 1438208
Call :ChkSize raschap.dll 79872
Call :ChkSize rastls.dll 150528
Call :ChkSize rdpwd.sys 139784
Call :ChkSize rmcast.sys 203136
Call :ChkSize rpcrt4.dll 591360
Call :ChkSize rpcss.dll 401408
Call :ChkSize sbe.dll 270848
Call :ChkSize sc.exe 35328
Call :ChkSize schannel.dll 153088
Call :ChkSize scrobj.dll 180224
Call :ChkSize scrrun.dll 172032
Call :ChkSize secur32.dll 56832
Call :ChkSize services.exe 111104
Call :ChkSize shell32.dll 8481280
Call :ChkSize shimgvw.dll 441344
Call :ChkSize shlwapi.dll 474112
Call :ChkSize shsvcs.dll 135680
Call :ChkSize smtpsvc.dll 462336
Call :ChkSize spoolsv.exe 58880
Call :ChkSize sqloledb.dll 528384
Call :ChkSize sqlsrv32.dll 446464
Call :ChkSize srv.sys 357888
Call :ChkSize srvsvc.dll 99840
Call :ChkSize strmdll.dll 247326
Call :ChkSize strmfilt.dll 75776
Call :ChkSize sxs.dll 714240
Call :ChkSize synceng.dll 58368
Call :ChkSize sysmain.sdb 1206508
Call :ChkSize system.adm 1875210
Call :ChkSize t2embed.dll 119808
Call :ChkSize tcpip.sys 361600
Call :ChkSize tcpip6.sys 226880
Call :ChkSize telnet.exe 79872
Call :ChkSize themeui.dll 387584
Call :ChkSize tlntsess.exe 80896
Call :ChkSize triedit.dll 153088
Call :ChkSize tsbyuv.dll 8704
Call :ChkSize tsgqec.dll 53248
Call :ChkSize tzchange.exe 46080
Call :ChkSize usb8023.sys 12928
Call :ChkSize usb8023x.sys 12928
Call :ChkSize usbaudio.sys 60160
Call :ChkSize usbccgp.sys 32384
Call :ChkSize usbd.sys 5376
Call :ChkSize usbehci.sys 30336
Call :ChkSize usbport.sys 144128
Call :ChkSize usbscan.sys 14976
Call :ChkSize usbser.sys 26240
Call :ChkSize usbvideo.sys 123008
Call :ChkSize usp10.dll 406016
Call :ChkSize vbscript.dll 434176
Call :ChkSize w32time.dll 175616
Call :ChkSize w32tm.exe 53760
Call :ChkSize wab.exe 45568
Call :ChkSize wdigest.dll 54272
Call :ChkSize wic.dll 712704
Call :ChkSize wicext.dll 347648
Call :ChkSize win32k.sys 1879168
Call :ChkSize win32spl.dll 105472
Call :ChkSize winhttp.dll 354816
Call :ChkSize winmm.dll 177152
Call :ChkSize winsrv.dll 293376
Call :ChkSize wintrust.dll 178176
Call :ChkSize wkssvc.dll 132096
Call :ChkSize wmiprvsd.dll 453120
Call :ChkSize wmiprvse.exe 227840
Call :ChkSize wordpad.exe 221184
Call :ChkSize write.wpc 90624
Call :ChkSize write32.wpc 89600
Call :ChkSize wscript.exe 155648
Call :ChkSize wshext.dll 90112
Call :ChkSize wshom.ocx 135168
Call :ChkSize wuapi.dll 577048
Call :ChkSize wuau.adm 58746
Call :ChkSize wuauclt.exe 53784
Call :ChkSize wuauclt1.exe 174040
Call :ChkSize wuaucpl.cpl 219160
Call :ChkSize wuaueng.dll 1933848
Call :ChkSize wuaueng1.dll 195544
Call :ChkSize wuauhelp.chm 79473
Call :ChkSize wuauserv.dll 23064
Call :ChkSize wucltui.dll 329240
Call :ChkSize wups.dll 35864
Call :ChkSize wuweb.dll 210968
cd..

If "!NotOrig!"=="1" (
  cls
  color FC
  Set Err=Ошибка: UpdatePack повреждён. Интеграция остановлена.
  GoTo :EOF
)
color
GoTo :EOF

:ChkSize
If Not "%~z1"=="%2" Set NotOrig=1
GoTo :EOF
