1 Customize Windows XP Boot CD with batch file 26th February 2010, 1:21 pm
kyawzwathant
MITR Reader
- Code:
ကၽြန္ေတာ္ Windows XP SP3 Boot CD ကို nLite နဲ႕လုပ္တာ ေတာ္ေတာ္ေလးအဆင္ေျပတယ္။ Service pack, drivers, hot fix အကုန္ေပါင္းတာ ရတယ္။ ဒါေပမယ္ ေနာက္အဆင့္တစ္ခု လိုအပ္ေနတယ္ အဲ့ဒါက Batch command ေရးပီး software installation လုပ္ခ်င္တာ မရေသးဘူးျဖစ္ေနတယ္။ registry ကို လည္း input လုပ္ခ်င္တယ္။ တခ်ဳိ႕ software ေလးေတြ ေပါင္းထည့္ ေပးခ်င္တယ္ hacker ေတြလုပ္ထားတဲ့ windows xp boot cd ေတြလိုမ်ဳိးေပါ့။ MS Live Messenger, Gtalk, Skype, Windows Media Player 11, IE 8, Mozilla Firefox, Office, etc... စသျဖင့္ေပါ့။ အဲ့ဒါေတြကို ဘယ္လိုေရးပီး run ခိုင္းရမလဲ။
1. ပထမအဆင့္က Windows Installation လုပ္မယ္ဗ်ာ
2. ဒုတိယအဆင့္က software ေတြကို installation လုပ္မယ္ဗ်ာ
အဲ့ဒါေတြကို CD, DVD တစ္ခုထည္းမွာ ေပါင္းထည့္ေပးခ်င္တာ
hacker ေတြလုပ္ထားတဲ့ CD , DVD ေတြမွာက batch file processing နဲ႕ တဆင့္ခ်င္းခိုင္းထားတာ copy ကူးပီး လုပ္ခိုင္းလို႕လဲ မရဘူး။ သူတို႕ အိုင္ဒီယာက တစ္မ်ဳိး ကၽြန္ေတာ္ လုပ္ခ်င္တာက တစ္မ်ဳိးဗ်။ သူတို႕က မလိုအပ္တာေတြ အမ်ားႀကီးထည့္ထားတယ္။ ကၽြန္ေတာ္တို႕အတြက္ အသံုးမတည့္တာေတြမ်ားတယ္။ အဲဒါ ကူညီေပးႏိုင္ၾကရင္ ကူညီၾကပါဦး။
ကၽြန္ေတာ္မွာ Windows XP SP3 untouch original Copy CD ရွိတယ္ အထက္က ကၽြန္ေတာ္လုပ္ထားတာေတြ အကုန္ဆင္ေျပတယ္။ ေနာက္ထပ္တိုးခ်င္တာ အဆင္မေျပဘူးျဖစ္ေနတယ္။
ဒါက သူတို႕ေရးထားတဲ့ batch file ပါ
- Code:
@echo off
rem Original Source from Winstyle 2008 Big Thank ^^
rem OEMinfo For Windows Dark Edition v.7 Rebirth Version
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
set OEMFILE=%SYSTEMROOT%\system32\oeminfo.ini
set REGMODE=0
set TAGFILE=WIN51
set MANUFACTURER=Windows Dark Edition V.7
set MODEL=Rebirth Version By Catalogk
set UPMAX=6
set UPNAMEL=8
set KEY=0
set KEYISVISIBLE=1
for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do (if exist "%%d:\%TAGFILE%" set CDROM=%%d:&& goto metka)
:metka
if defined CDROM (
set UPDATESDIR=%CDROM%\Systems\WinDa7k_ALL\I386\SVCPACK
set UPDATESMASK=*.*
) else (
set CDROM=%~dp0
set CDROM=!CDROM:~0,-7!
set UPDATESDIR=%SYSTEMROOT%\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}
set UPDATESMASK=KB*.*
)
for /F "tokens=1" %%j in ('reg 2^>nul') do if "%%j"=="REG" set REGEXE=rus
if exist "%CDROM%\I386\winn?.sif" (
set WINNTSIF=%CDROM%\I386\winn?.sif
) else (
if defined REGEXE (
for /F "tokens=3 delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v SourcePath') do set SrcP=%%j
) else (
for /F "tokens=3 delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v SourcePath') do set SrcP=%%j
)
if exist "!SrcP!\winn?.sif" set WINNTSIF=!SrcP!\winn?.sif
)
if defined REGEXE (
for /F "tokens=3 delims= " %%j in ('reg query "HKCU\Control Panel\International" /v Locale') do set lang=%%j
for /F "tokens=3 delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName') do set PN=%%j
for /F "tokens=3 delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CSDVersion') do set CSDV=%%j
for /F "tokens=3 delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion') do set CV=%%j
for /F "tokens=3 delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v BuildLab') do set BUILD=%%j
) else (
for /F "tokens=3 delims= " %%j in ('reg query "HKCU\Control Panel\International" /v Locale') do set lang=%%j
for /F "tokens=3* delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName') do set PN=%%j %%k
for /F "tokens=3* delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CSDVersion') do set CSDV=%%j %%k
for /F "tokens=3 delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion') do set CV=%%j
for /F "tokens=3 delims= " %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v BuildLab') do set BUILD=%%j
)
for /F %%j in ('echo.%* ^| find /i /c "/k"') do if %%j==1 set KEY=1
for /F %%j in ('echo.%* ^| find /i /c "/v"') do if %%j==1 set KEYISVISIBLE=1
for /F %%j in ('echo.%* ^| find /i /c "/r"') do if %%j==1 set REGMODE=1
echo [General]> "%OEMFILE%"
echo Manufacturer=%MANUFACTURER%>> "%OEMFILE%"
echo Model=%MODEL%>> "%OEMFILE%"
if defined WINNTSIF (
if %KEY% == 1 (
for /F "tokens=3 delims==] " %%j in ('find /I /N "ProductKey" "%WINNTSIF%"') do set PK=%%j
)
)
set i=1
set l=0
set c=0
set n=0
if %REGMODE% == 1 (
for /F "tokens=5* delims=\" %%j in ('reg query "HKLM\SOFTWARE\Microsoft\Updates" /s ^| findstr /i /v "REG_ FileList"') do (
if %ERRORLEVEL%==0 (
for /F "usebackq tokens=3 delims=\" %%m in ('%%j\%%k') do (
set tmp=%%m
set tmp=!tmp:~0,%UPNAMEL%!
set kb[!tmp!]=!tmp:~2,6!
)
for /F "tokens=2 delims=\" %%m in ('echo %%j\%%k^| findstr /i /c:" .NET"') do (
set tmp=%%m
set tmp=!tmp:~0,%UPNAMEL%!
set kb[!tmp!]=!tmp:~2,6!
)
)
)
for /F "tokens=7 delims=\" %%m in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" ^| findstr /i "\<KB[0-9][0-9][0-9][0-9][0-9][0-9]"') do (
set tmp=%%m
set tmp=!tmp:~0,%UPNAMEL%!
set kb[!tmp!]=!tmp:~2,6!
)
for /F %%j in ('set kb[') do set /A n+=1
call :suppinfo
for /F "tokens=2 delims=[]" %%j in ('set kb[ ^| sort') do (set kbname=%%j&& call :myprint)
) else (
for /F %%j in ('dir /b /a:-d "%UPDATESDIR%\%UPDATESMASK%"') do set /A n+=1
call :suppinfo
for /F "tokens=1 delims=." %%j in ('dir /b /a:-d "%UPDATESDIR%\%UPDATESMASK%"') do (set kbname=%%j&&set kbname=!kbname! &&set kbname=!kbname:~0,%UPNAMEL%!&& call :myprint)
)
goto :EOF
:myprint
if !c! == 0 (
set str=!kbname!
) else (
set str=!str! !kbname!
)
set /A c+=1
if !c! == %UPMAX% (
echo Line!i!=!str!>> "%OEMFILE%"
set /A i+=1
set /A l+=1
set str=
set c=0
set /A tmp=n-l*UPMAX
) else (
if %n% LSS %UPMAX% (
if !c! == %n% (
echo Line!i!=!str!>> "%OEMFILE%"
)
)
if !tmp! LSS %UPMAX% (
if !c! == !tmp! (
echo Line!i!=!str!>> "%OEMFILE%"
)
)
)
goto :EOF
:suppinfo
if defined PK (
if %KEYISVISIBLE% == 0 (
echo [OEMSpecific]>> "%OEMFILE%"
echo SerialNo=%PK%>> "%OEMFILE%"
)
)
)
echo [Support Information]>> "%OEMFILE%"
echo Line!i!=Windows Dark Edition v.7 Rebirth Version By Catalogk>> "%OEMFILE%"
rem set /A i+=1
if defined PK (
if %KEYISVISIBLE% == 1 (
echo Line!i!=Product Key: %PK%>> "%OEMFILE%"
set /A i+=1
)
)
echo Line!i!=>> "%OEMFILE%"
set /A i+=1
for /F %%t in ('time/T') do set T=%%t
echo Line!i!=OS:%PN:Microsoft=% %CSDV:Service Pack=SP% version %CV% build %BUILD%>> "%OEMFILE%"
rem set /A i+=1
rem echo Line!i!=>> "%OEMFILE%"
set /A i+=1
echo Line!i!=Installation ^(updation^) date and time: %date% ^(%T%^)>> "%OEMFILE%"
set /A i+=1
echo Line!i!=>> "%OEMFILE%"
set /A i+=1
echo Line!i!=Contact : [You must be registered and logged in to see this link.]>> "%OEMFILE%"
set /A i+=1
echo Line!i!=>> "%OEMFILE%"
set /A i+=1
echo Line!i!=Installed Components and Updates ^(%n%^):>> "%OEMFILE%"
set /A i+=1
echo Line!i!=>> "%OEMFILE%"
set /A i+=1
goto :EOF