|
2#
楼主 |
发表于 2012-12-28 13:31:38
|
只看该作者
这是原bat,这制作的可以成功,我就是照这改的:
- @echo off
- color 70
- ECHO 说 明
- ECHO ---------------------------------------------------------
- ECHO.
- ECHO 移植已经安装好的 WINXP、2K3 系统为 WIM 的 RAMOS 。
- ECHO.
- ECHO 系统 默认为administrator登录,系统 默认为“X盘”系统(系统安装方法请百度)
- ECHO.
- ECHO.
- ECHO. 本处理参考菜鸟论坛Q大教程,制作过程得到菜鸟论坛:鑫源,路飞,dummy等各位大神指导,在此一并感谢
- ECHO. 归零 (QQ群:112102870;245855821) 2012.12.22
- ECHO -------------------------------------------------------------------------------
- PAUSE
- echo 完成等待。
- cls
- @echo. 选择您需要做系统的window所在盘(D/E/F/G/H..如果复制过文件请按M)
- ECHO.
- ECHO. 若启动wim后发现新硬件安装完新硬件后导出注册表system配置单元
- ECHO.
- ECHO. 拷贝至E:\BOOT\WINDOWS\SYSTEM32\CONFIG 目录替换后按M重新打包wim
- ECHO -------------------------------------------------------------------------------
- set shut=""
- set /p shut="请输入 【 <D> 或 <E> 或 <F> 或 <G> 或 <H> 或 <I>或 <J> 或 <X> 或 <q>退出】 并按回车键 :"
- IF NOT "%shut%"=="" (
- if %shut% NEQ "" SET shut=%shut:~0,1%
- ) else (
- set shut="")
- if /i %shut%==c goto RAM1
- if /i %shut%==d goto RAM2
- if /i %shut%==e goto RAM3
- if /i %shut%==f goto RAM4
- if /i %shut%==g goto RAM5
- if /i %shut%==h goto RAM6
- if /i %shut%==i goto RAM7
- if /i %shut%==j goto RAM8
- if /i %shut%==x goto RAM9
- if /i %shut%==m goto RAM0
- if /i %shut%==q exit
- :RAM1
- @echo.
- @echo 您选择的是E:\sys\gbak盘,任意键继续。。。
- pause
- echo 请等待》》》》》》》
- robocopy.exe >nul "E:\sys\gbak\WINDOWS" "e:\boot\WINDOWS" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "E:\sys\gbak\Program Files" "e:\boot\Program Files" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.ico *.pnf *.gif *.txt *.html IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "E:\sys\gbak\Documents and Settings" "e:\boot\Documents and Settings" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- sleep.exe 9000
- echo 完成等待。
- goto RAM0
- :RAM2
- @echo.
- @echo 您选择的是D盘,任意键继续。。。
- pause
- echo 请等待》》》》》》》
- robocopy.exe >nul "D:\WINDOWS" "E:\BOOT\WINDOWS" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "D:\Program Files" "E:\BOOT\Program Files" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.ico *.pnf *.gif *.txt *.html IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "D:\Documents and Settings" "E:\BOOT\Documents and Settings" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- sleep.exe 9000
- echo 完成等待。
- goto RAM0
- :RAM3
- @echo.
- @echo 您选择的是E盘,任意键继续。。。
- pause
- echo 请等待》》》》》》》
- robocopy.exe >nul "E:\WINDOWS" "E:\BOOT\WINDOWS" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "E:\Program Files" "E:\BOOT\Program Files" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.ico *.pnf *.gif *.txt *.html IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "E:\Documents and Settings" "E:\BOOT\Documents and Settings" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- sleep.exe 9000
- echo 完成等待。
- goto RAM0
- :RAM4
- @echo.
- @echo 您选择的是F盘,任意键继续。。。
- pause
- echo 请等待》》》》》》》
- robocopy.exe >nul "F:\WINDOWS" "E:\BOOT\WINDOWS" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "F:\Program Files" "E:\BOOT\Program Files" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.ico *.pnf *.gif *.txt *.html IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "F:\Documents and Settings" "E:\BOOT\Documents and Settings" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- sleep.exe 9000
- echo 完成等待。
- goto RAM0
- :RAM5
- @echo.
- @echo 您选择的是G盘,任意键继续。。。
- pause
- echo 请等待》》》》》》》
- robocopy.exe >nul "G:\WINDOWS" "E:\BOOT\WINDOWS" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "G:\Program Files" "E:\BOOT\Program Files" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.ico *.pnf *.gif *.txt *.html IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "G:\Documents and Settings" "E:\BOOT\Documents and Settings" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- sleep.exe 9000
- echo 完成等待。
- goto RAM0
- :RAM6
- @echo.
- @echo 您选择的是H盘,任意键继续。。。
- pause
- echo 请等待》》》》》》》
- robocopy.exe >nul "H:\WINDOWS" "E:\BOOT\WINDOWS" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "H:\Program Files" "E:\BOOT\Program Files" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.ico *.pnf *.gif *.txt *.html IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "H:\Documents and Settings" "E:\BOOT\Documents and Settings" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- sleep.exe 9000
- echo 完成等待。
- goto RAM0
- :RAM7
- @echo.
- @echo 您选择的是I盘,任意键继续。。。
- pause
- echo 请等待》》》》》》》
- robocopy.exe >nul "I:\WINDOWS" "E:\BOOT\WINDOWS" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "I:\Program Files" "E:\BOOT\Program Files" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.ico *.pnf *.gif *.txt *.html IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "I:\Documents and Settings" "E:\BOOT\Documents and Settings" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- sleep.exe 9000
- echo 完成等待。
- goto RAM0
- :RAM8
- @echo.
- @echo 您选择的是J盘,任意键继续。。。
- pause
- echo 请等待》》》》》》》
- robocopy.exe >nul "J:\WINDOWS" "E:\BOOT\WINDOWS" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "J:\Program Files" "E:\BOOT\Program Files" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.ico *.pnf *.gif *.txt *.html IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "J:\Documents and Settings" "E:\BOOT\Documents and Settings" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- sleep.exe 9000
- echo 完成等待。
- goto RAM0
- :RAM9
- @echo.
- @echo 您选择的是K盘,任意键继续。。。
- pause
- echo 请等待》》》》》》》
- robocopy.exe >nul "K:\WINDOWS" "E:\BOOT\WINDOWS" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "K:\Program Files" "E:\BOOT\Program Files" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.ico *.pnf *.gif *.txt *.html IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- robocopy.exe >nul "K:\Documents and Settings" "E:\BOOT\Documents and Settings" /E /ZB /COPYALL /R:5 /W:10 /xf *.tmp *.bak *.log *.jpg *.png *.pnf *.gif *.txt *.html *.ico IconCache.db *.PF *.bmp *.gid *.old *.chm *.htm *.mp3 *.EVT
- sleep.exe 9000
- echo 完成等待。
- goto RAM0
- :RAM0
- echo 清除文件夹
- rd /s /q E:\BOOT\windows\ADAM
- rd /s /q E:\BOOT\windows\addins
- rd /s /q E:\BOOT\windows\ADFS
- rd /s /q E:\BOOT\windows\Cursors
- rd /s /q E:\BOOT\windows\Debug
- rd /s /q E:\BOOT\windows\Help
- rd /s /q E:\BOOT\windows\ime
- rd /s /q E:\BOOT\windows\Installer
- rd /s /q E:\BOOT\windows\java
- rd /s /q E:\BOOT\windows\LastGood
- rd /s /q E:\BOOT\windows\LastGood.Tmp
- rd /s /q E:\BOOT\windows\Logs
- rd /s /q E:\BOOT\windows\Media
- rd /s /q E:\BOOT\windows\msapps
- rd /s /q E:\BOOT\windows\mui
- rd /s /q "E:\BOOT\windows\Offline Web Pages"
- rd /s /q "E:\BOOT\windows\Downloaded Installations"
- rd /s /q E:\BOOT\windows\RegisteredPackages
- rd /s /q E:\BOOT\windows\WinSxS\InstallTemp
- rd /s /q E:\BOOT\windows\prefetch
- rd /s /q E:\BOOT\windows\repair
- rd /s /q E:\BOOT\windows\security
- rd /s /q E:\BOOT\windows\Web
- rd /s /q E:\BOOT\windows\temp
- rd /s /q E:\BOOT\windows\system32\1025
- rd /s /q E:\BOOT\windows\system32\1028
- rd /s /q E:\BOOT\windows\system32\1031
- rd /s /q E:\BOOT\windows\system32\1033
- rd /s /q E:\BOOT\windows\system32\1037
- rd /s /q E:\BOOT\windows\system32\1041
- rd /s /q E:\BOOT\windows\system32\1042
- rd /s /q E:\BOOT\windows\system32\1054
- rd /s /q E:\BOOT\windows\system32\2052
- rd /s /q E:\BOOT\windows\system32\3076
- rd /s /q E:\BOOT\windows\system32\3com_dmi
- rd /s /q E:\BOOT\windows\system32\administration
- rd /s /q E:\BOOT\windows\system32\dllcache
- rd /s /q E:\BOOT\windows\system32\dhcp
- rd /s /q E:\BOOT\windows\system32\export
- rd /s /q E:\BOOT\windows\system32\lls
- rd /s /q E:\BOOT\windows\system32\LogFiles
- rd /s /q E:\BOOT\windows\system32\ReinstallBackups
- rd /s /q E:\BOOT\windows\system32\ShellExt
- rd /s /q E:\BOOT\windows\system32\Setup
- rd /s /q E:\BOOT\windows\system32\spool\drivers\w32x86
- rd /s /q E:\BOOT\windows\system32\spool\PRINTERS
- rd /s /q E:\BOOT\windows\system32\spool\prtprocs
- rd /s /q E:\BOOT\windows\system32\wins
- rd /s /q E:\BOOT\windows\system32\config\systemprofile
- echo 清除文件
- del /f /s /q E:\BOOT\windows\*.bak
- del /f /s /q E:\BOOT\windows\*.log
- del /f /s /q E:\BOOT\windows\*.old
- del /f /s /q E:\BOOT\windows\*.tmp
- del /f /s /q E:\BOOT\windows\*.txt
- del /f /s /q E:\BOOT\windows\*.lnk
- del /f /s /q E:\BOOT\windows\_default.pif
- del /f /s /q E:\BOOT\windows\desktop.ini
- del /f /s /q E:\BOOT\windows\system.ini
- del /f /s /q E:\BOOT\windows\win.ini
- del /f /s /q E:\BOOT\windows\inf\*.PNF
- del /f /s /q E:\BOOT\windows\control.ini
- del /f /s /q E:\BOOT\windows\inf\mdm*.*
- del /f /s /q E:\BOOT\windows\system32\config\*.Evt
- del /f /s /q E:\BOOT\windows\system32\config\*.sav
- del /f /s /q E:\BOOT\windows\system32\config\*.LOG
- del /f /s /q E:\BOOT\windows\system32\config\*.DEL
- del /f /s /q E:\BOOT\windows\system32\KBDFR.DLL
- del /f /s /q E:\BOOT\windows\system32\KBDGR.DLL
- del /f /s /q E:\BOOT\windows\system32\KBDIT.DLL
- del /f /s /q E:\BOOT\windows\system32\winntbbu.dll
- del /f /s /q E:\BOOT\windows\system32\tp4.hlp
- del /f /s /q "E:\BOOT\Documents and Settings\Administrator\Recent\*.*"
- del /f /s /q "E:\BOOT\Documents and Settings\Administrator\Local Settings\History\*.*"
- del /f /s /q "E:\BOOT\Documents and Settings\Administrator\recent\*.*"
- ECHO ---------------------------------------------------------
- echo 备份A盘注册表
- echo 复制相关文件
- echo.
- ECHO ---------------------------------------------------------
- copy E:\BOOT\windows\system32\config\system . /y >nul
- copy .\WIMboot\*.sys E:\BOOT\WINDOWS\system32\drivers\ /y >nul
- Rem copy .\WIMboot\*.dll E:\BOOT\WINDOWS\system32\ /y >nul
- copy .\WIMboot\*.exe E:\BOOT\WINDOWS\system32\ /y >nul
- copy .\WIMboot\halmacpi.dll E:\BOOT\WINDOWS\system32\ /y >nul
- copy .\WIMboot\*.inf E:\BOOT\WINDOWS\inf\ /y >nul
- copy .\WIMboot\fbwf.cfg E:\BOOT\ /y >nul
- echo 加载注册表
- echo.
- reg load HKLM\sys E:\BOOT\windows\system32\config\system >nul 2>nul
- if errorlevel 1 (
- echo 注册表加载出错
- goto fail
- )
- echo 设置Enum注册表可操作权限
- setacl -on "hklm\SYS\ControlSet001\Enum" -ot reg -actn ace -ace "n:everyone;p:full;m:grant;w:dacl" -actn setprot -op "dacl:p_nc" >nul
- echo 导入wim驱动
- regedit /s .\WIMboot\wimboot.reg
- echo 删除 X 盘符 wim驱动
- rem reg delete HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices /v \DosDevices\x: /f
- reg delete hklm\SYS\MountedDevices /v \DosDevices\x: /f rem check to see if x drier has been deleted.*********important this value should be delete before make wim
- echo.
- reg unload HKLM\sys >nul 2>nul
- if errorlevel 1 (
- echo 注册表断开出错
- goto fail
- )
- echo 注册表修改完成。
- echo.
- echo 请等待》》》》》》》
- sleep.exe 9000
- echo 完成等待。
- @ ECHO.
- ECHO ---------------------------------------------------------
- ECHO.
- ECHO 自动打包 %wimpath%\ 下文件为 C:\boot\boota.wim ...
- ECHO.
- ECHO ---------------------------------------------------------
- pause
- del C:\boot\boota.wim >nul
- imagex /capture E:\BOOT C:\boot\boota.wim "boota" /boot /compress maximum
- ECHO ---------------------------------------------------------
- echo 请等待》》》》》》》
- sleep.exe 9000
- echo 完成等待。
- echo 打包完毕。重启后,体验 RAMOS 的魅力吧!
- pause
-
复制代码
文件内容:
[一键win2003,xpWIM]
database.mdb
imagex.exe
REGEDT.EXE
robocopy.exe
sleep.exe
启动项管理.cfg
启动项管理.exe
使用方法.txt
一键WIMRAMOS.bat
注册表垃圾清理器.exe
文件总数 = 10
-------------------------------
[boot]
bcd
bcd.LOG
bcd16384
bcd26384
bcdokbackup
bcdokversion
boot.sdi
BOOTICE.EXE
bootmgr.exe
pxeboot.n12
文件总数 = 10
----------------------------
[WIMboot]
fbwf.cfg
fbwf.sys
halmacpi.dll
ntkrnlpa.exe
ramdisk.inf
ramdisk.sys
wimboot.reg
wimfltr.inf
wimfltr.sys
wimfsf.sys
winload.exe
复件 wimboota.reg
文件总数 = 12 |
|