China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-02 16:40
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » [Solved] How to replace files protected by the system, thank you! View 2,590 Replies 22
Original Poster Posted 2008-06-21 13:10 ·  中国 江苏 苏州 电信
初级用户
Credits 27
Posts 13
Joined 2008-06-21 09:52
18-year member
UID 120670
Gender Male
Status Offline
I'm new here and really don't understand DOS batch processing! I humbly ask for everyone's help!
That is, when XP is about to finish installing or has been installed, I want to use a batch process to replace the four OEM files and two DLL files. Please tell me how to achieve this, thank you!

[ Last edited by lixin12345 on 2008-6-22 at 10:07 PM ]
Floor 2 Posted 2008-06-21 14:37 ·  中国 江苏 苏州 电信
高级用户
★★
五星老土
Credits 558
Posts 172
Joined 2003-02-09 00:00
23-year member
UID 881
Gender Male
From 江苏
Status Offline
我怎么找不到一个比我注册日期早的人? 难道我是传说中的超级管理员? 其实我只是个潜水冠军而已.
Floor 3 Posted 2008-06-21 16:54 ·  中国 江苏 苏州 电信
初级用户
Credits 27
Posts 13
Joined 2008-06-21 09:52
18-year member
UID 120670
Gender Male
Status Offline
I'm asking experts to solve my problem. How can I research your disk! But your disk looks well-made! To research your disk, I still need to download such a big ISO. Oh, forget it! I won't download it.
Floor 4 Posted 2008-06-21 17:57 ·  中国 江苏 苏州 电信
高级用户
★★
五星老土
Credits 558
Posts 172
Joined 2003-02-09 00:00
23-year member
UID 881
Gender Male
From 江苏
Status Offline
Then why do you want to replace these few files? Confused.

These few files can be replaced, but the two dll files must be replaced in safe mode.

Replace them at the end of the installation, and most of the time the system won't be able to boot. Because these few files can't be replaced easily.
我怎么找不到一个比我注册日期早的人? 难道我是传说中的超级管理员? 其实我只是个潜水冠军而已.
Floor 5 Posted 2008-06-21 19:29 ·  中国 江苏 苏州 电信
初级用户
Credits 27
Posts 13
Joined 2008-06-21 09:52
18-year member
UID 120670
Gender Male
Status Offline
I know how to replace it manually, and it has been successfully done! Now I want to achieve the same effect with a batch script! But I really don't understand batch processing, so I'm asking for help.
Floor 6 Posted 2008-06-21 20:55 ·  中国 江苏 苏州 电信
高级用户
★★
五星老土
Credits 558
Posts 172
Joined 2003-02-09 00:00
23-year member
UID 881
Gender Male
From 江苏
Status Offline
Then I'll post one I made before for your reference

@ECHO OFF
TITLE Modify VOL Edition Windows XP to OEM Edition----Designed by Qu Ya

REM Modifying the OEMDIR value can change to other OEM versions

set OEMDIR=\WXPOEM\IBM

if not defined SAFEBOOT_OPTION ECHO Please run this program in Safe Mode!&GOTO END
ECHO Disclaimer: You should bear the risk of using this program by yourself. &ECHO.
ECHO This batch file will change the VOL edition of XP to the IBM OEM version
ECHO Warning! The feature code corresponding to the BIOS must be modified, otherwise it cannot be activated!
ECHO If you want to change to the OEM version of other brands, please modify this file and then run &ECHO.

:answer
set/p cont=Continue installation (y/n)?
if %cont%==y goto setup
if %cont%==Y goto setup
if %cont%==n goto end
if %cont%==N goto end
goto answer

:setup

ECHO. &IF NOT EXIST %OEMDIR%\OEMBIOS.CAT GOTO ERROREND

REM Update OEM files to DllCache and SYSTEM32 directories, a total of 4 files

attrib -a -s -r -h %SYSTEMROOT%\System32\Dllcache\oembios.cat
attrib -a -s -r -h %SYSTEMROOT%\System32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\oembios.cat
COPY %OEMDIR%\*.* %SYSTEMROOT%\System32\Dllcache /Y>nul
COPY %OEMDIR%\OEMBIOS.BIN %SYSTEMROOT%\System32 /Y>nul
COPY %OEMDIR%\OEMBIOS.DAT %SYSTEMROOT%\System32 /Y>nul
COPY %OEMDIR%\OEMBIOS.SIG %SYSTEMROOT%\System32 /Y>nul
COPY %OEMDIR%\OEMBIOS.CAT %SYSTEMROOT%\System32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE} /Y>nul
COPY %OEMDIR%\OEMINFO\*.* %SYSTEMROOT%\System32 /Y>nul 2>nul

REM Update activation verification files (Dpcdll.dll, Pidgen.dll)

EXPAND -R Dpcdll.dl_ %SYSTEMROOT%\System32\Dllcache>nul
EXPAND -R Dpcdll.dl_ %SYSTEMROOT%\System32>nul
EXPAND -R Pidgen.dl_ %SYSTEMROOT%\System32\Dllcache>nul
EXPAND -R Pidgen.dl_ %SYSTEMROOT%\System32>nul

REM Import OEM registry file

attrib +a +s +r +h %SYSTEMROOT%\System32\Dllcache\oembios.cat
attrib +a +s +r +h %SYSTEMROOT%\System32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\oembios.cat
REGEDIT -S OEM.REG

ECHO Import completed, please restart the computer
GOTO END
:ERROREND
ECHO No OEM version related files found, the system has not been modified
:END
PAUSE


Note that place OEM.REG, PIDGEN.DL_, DPCDLL.DL_ in the same directory as the above batch file.

The content of OEM.REG is as follows:

Windows Registry Editor Version 5.00


"ProductId"="55661-OEM-0011964-47775"


"ProductId"="55661-OEM-0011964-47775"
"DigitalProductId"=hex:a4,00,00,00,03,00,00,00,35,35,36,36,31,2d,4f,45,4d,2d,\
30,30,31,31,39,36,34,2d,34,37,37,37,35,00,2d,00,00,00,41,32,32,2d,30,30,30,\
30,31,00,00,00,00,00,00,00,3e,5c,43,0e,f2,25,4c,6e,07,bd,af,e0,91,6f,05,00,\
00,00,00,00,3d,1f,f1,40,99,a3,02,00,02,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,34,33,34,30,30,00,00,00,00,00,00,00,96,16,\
00,00,c2,b7,1a,38,00,01,00,00,8c,01,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,50,91,fe,62
"LicenseInfo"=hex:33,43,46,34,7e,d9,1f,26,2d,7c,f4,45,be,b3,26,ef,05,4b,17,21,\
10,86,9c,ff,5e,4c,06,86,00,cd,09,9d,f4,58,c5,d8,21,ed,11,f3,42,66,af,35,e5,\
99,1e,95,7d,58,26,8e,63,ce,68,d5
我怎么找不到一个比我注册日期早的人? 难道我是传说中的超级管理员? 其实我只是个潜水冠军而已.
Floor 7 Posted 2008-06-21 21:40 ·  中国 江苏 苏州 电信
初级用户
Credits 27
Posts 13
Joined 2008-06-21 09:52
18-year member
UID 120670
Gender Male
Status Offline
First of all, thank you for your help! After looking at it for a long time, I somewhat understand the running process of this batch processing:
1. Set the directory and files of the files to be replaced;
2. It must be run in safe mode.
3. Import the registry file (actually, it is a serial number for XP, I don't know if it is like this?).

Then what I mean is like this:
1. Can I not replace it from safe mode (personally, I think booting to safe mode is slow and not enjoyable);
2. The OEM.REG can not be imported, because the serial number has been entered during installation (do I still need to import it?);
3. There is a DLL file that is not compressed, do I still need to compress it myself?
I don't know if there are other better ways (this question is a bit naive, hehe)
For example, get a permission to directly modify?
In short, thank you!

[ Last edited by lixin12345 on 2008-6-21 at 09:43 PM ]
Floor 8 Posted 2008-06-21 21:48 ·  中国 江苏 苏州 电信
高级用户
★★
五星老土
Credits 558
Posts 172
Joined 2003-02-09 00:00
23-year member
UID 881
Gender Male
From 江苏
Status Offline
1. Correct
2. Must
3. Actually, it's an OEM serial number of XP

Since you have entered the serial number during installation, this serial number has already determined which 6 files you need. Why do you want to replace them??! Do you want to mess it up?

The DLL file can be uncompressed. But an error message will appear, which can be shielded by making a slight modification.

For example, EXPAND -R Dpcdll.dl_ %SYSTEMROOT%\System32\Dllcache>nul 2>nul
我怎么找不到一个比我注册日期早的人? 难道我是传说中的超级管理员? 其实我只是个潜水冠军而已.
Floor 9 Posted 2008-06-21 21:54 ·  中国 江苏 苏州 电信
初级用户
Credits 27
Posts 13
Joined 2008-06-21 09:52
18-year member
UID 120670
Gender Male
Status Offline
Kill it? I don't understand what you mean?

For example (maybe not very good): Previously, when installing with PRO, I entered a certain OEM's serial number but didn't activate it. Is that possible like this?

I just raised such a question to see if it can be solved, and other things are not considered for the time being.


Alas! Actually, my real meaning is like this:
I mean, can a batch script be used to obtain sufficient privileges to replace a system-protected file, so that it can be replaced smoothly and there will be no prompts to insert a CD or something like that?

[ Last edited by lixin12345 on 2008-6-21 at 10:04 PM ]
Floor 10 Posted 2008-06-21 22:26 ·  中国 江苏 苏州 电信
高级用户
★★
五星老土
Credits 558
Posts 172
Joined 2003-02-09 00:00
23-year member
UID 881
Gender Male
From 江苏
Status Offline
Originally posted by lixin12345 at 2008-6-21 01:10 PM:
I'm new here and really don't understand DOS batch processing! I sincerely ask for everyone's help!
That is, when XP is about to finish installing or has been installed, I want to use a batch processing to replace the four OEM files and two DLL files. How should I achieve this? Thank you!


Kill it? I don't understand what you mean?
For example (maybe not very good): When installing with PRO, I entered an OEM serial number by mistake but didn't activate it. Is it possible like this?

I just raised such a question to see if it can be solved, and other things are not discussed for the time being.


Alas! Actually, my real meaning is like this:
That is, can a batch processing be used to obtain a sufficiently large permission to replace a file protected by the system, on the one hand, it can be replaced smoothly, and on the other hand, there will be no prompts like inserting a CD, etc.!



Your analogy is very inappropriate because entering the wrong serial number cannot continue the installation. For example, if you entered an OEM serial number for a VOL version.

Your real meaning was said in the top floor, which is obviously to replace 6 OEM files. How did it become other files in the end.

So I really suspect your real motivation. If you want people to help you, please treat them sincerely. Thank you.

[ Last edited by quya on 2008-6-21 at 10:27 PM ]
我怎么找不到一个比我注册日期早的人? 难道我是传说中的超级管理员? 其实我只是个潜水冠军而已.
Floor 11 Posted 2008-06-21 22:46 ·  中国 江苏 苏州 电信
初级用户
Credits 27
Posts 13
Joined 2008-06-21 09:52
18-year member
UID 120670
Gender Male
Status Offline
Alas! Why do you say I'm not sincere? I just didn't express my meaning clearly. I said don't replace in safe mode, but I got more confused by what you said (actually, replacing in safe mode doesn't need such a complicated batch script). I said I would replace in safe mode! I said the analogy was not good!
Because there's no result I want, so I just explain further, and let it be like this! It doesn't matter if you don't want to help!
It seems I didn't do anything to you! Alright! Forget it! If there are experts willing to help, they can; if not, it's also okay. There's always a way. If it really can't be done, then there's no way, and I'll just not do it! If I was not sincere to you, I'm sorry here! Thank you again!

Can I replace system-protected files using batch scripting in normal circumstances?
Floor 12 Posted 2008-06-21 23:23 ·  中国 江苏 苏州 电信
高级用户
★★
五星老土
Credits 558
Posts 172
Joined 2003-02-09 00:00
23-year member
UID 881
Gender Male
From 江苏
Status Offline
According to my current level, I can no longer help you. Because I know batch processing isn't all-powerful.

But there are many experts here, I hope someone can help you.
我怎么找不到一个比我注册日期早的人? 难道我是传说中的超级管理员? 其实我只是个潜水冠军而已.
Floor 13 Posted 2008-06-22 03:50 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Floor 14 Posted 2008-06-22 08:40 ·  中国 河北 保定 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
I don't have much research on this. In the XP environment, there is a replace.exe command used to replace system files, but it's not very easy to use.
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 15 Posted 2008-06-22 08:55 ·  中国 江苏 苏州 电信
初级用户
Credits 27
Posts 13
Joined 2008-06-21 09:52
18-year member
UID 120670
Gender Male
Status Offline
Thanks to the netizens on the 13th and 14th floors! The link provided by the 13th floor is from a foreigner, and I have already seen it. It's too long, and I can't understand it at my level, heh heh! I didn't pay attention to the command on the 14th floor. I'll check the materials later. Thanks again to the two upstairs!
Forum Jump: