拍狼 金牌會員
專門修理電腦不乖的電腦人 ... - UID
- 17982
- 帖子
- 3833
- 精華
- 367
- 積分
- 57502
- 金幣
- 53172
- 威望
- 1304
- 推廣
- 0
- 閱讀權限
- 88
- 來自
- 光華商場零件供應中心
- 註冊時間
- 2006-6-23
- 最後登錄
- 2014-7-8
|
5樓
大 中
小 發表於 2007-3-9 21:55
作為菜鳥的我們是不是需要用那麼複雜的方法手工編輯自己的INF檔案呢?
當然不用,因為費時費力.解決方法就是用 reg2inf 這個小軟體
使用方法: DOS下執行命令reg2inf.exe -w -t xxx.reg xxx.inf
下載地址:訪客無法瀏覽此圖片或連結,請先 註冊 或 登入會員 。
我們只需要將我們自己導出的REG檔案轉為INF檔案就行了
INF的使用方法有2種,一種是圖形界面下,單擊INF檔案,然後選擇[安裝]便可
還有種方法就是在DOS界面下用rundll32.exe來安裝.
使用方法:
rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 INF檔案名
知道了基礎知識,我們來看程序,其實都是些很簡單的代碼,只有一個比較重要的地方,因為考慮到exe檔案有可能也被程序封鎖,所以我又特地找了一些資料,終於找到一個比較隱蔽的檔案名.pif檔案.PIF是曾經DOS中使用的一種格式檔案,描述為"指向MS-DOS的快捷方式",這種檔案最大的特點,將任意一個可執行程序的後綴名改成pif也可以正常運行.所以程序一開始便將rundll32.exe改名為pif格式檔案並保存到windows目錄以便我們使用.
介紹了程序的主要流程,大家應該可以對檔案有個瞭解了吧.
後記:文章比較老,可能用的方法更加之古老,但是有效的方法就是好方法,我經過測試,的確可以從一定程度上修復註冊表,但是由於知識有限,只能將我所知註冊表容易被惡意修改的項目寫在INF裡.所以我希望如果大家覺得這個好用的話請一起來完善這個INF檔案(因為想保持更新這個INF檔案,所以在檔案中加入了時間信息,如果大家想圖形界面安裝的話請去掉restore.inf檔案中的第一行,然後保存遍可.
=========================restore.inf=====================
InfVersion: written by heroest May 28th,2006
[Version]
Signature="$CHICAGO$"
Provider=heroest、2006
[DefaultInstall]
; DelReg=restore_DelReg
AddReg=restore_AddReg
[restore_DelReg]
[restore_AddReg]
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","DisableTaskMgr",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","DisableRegistryTools",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","NoDispCPL",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","NoDispBackgroundPage",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","NoDispScrSavPage",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","NoDispAppearancePage",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","NoDispSettingsPage",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","NoColorChoice",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","NoSizeChoice",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","NoVisualStyleChoice",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","NoVirtMemPage",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","NoFileSysPage",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\System","NoDevMgrPage",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoAddPrinter",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoDeletePrinter",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoFind",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoRun",0x10001,00,00,00,00
hkcu,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoLogOff",0x10001,00,00,00,00
hku,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoNetSetupIDPage",0x10001,00,00,00,00
hku,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoNetSetup",0x10001,00,00,00,00
hku,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoEntireNetwork",0x10001,00,00,00,00
hku,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoClose",0x10001,00,00,00,00
hku,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoRecentDocsHistory",0x10001,00,00,00,00
hku,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoNetHood",0x10001,00,00,00,00
hku,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoSetFolders",0x10001,00,00,00,00
hku,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoDestop",0x10001,00,00,00,00
hku,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoSetTaskBar",0x10001,00,00,00,00
hklm,"SOFTWARE\Microsoft\Internet Explorer\Main","Start Page",,"about:blank"
hklm,"SOFTWARE\Microsoft\Internet Explorer\Main","Window Title",,"Microsoft Internet Explorer"
hkcr,".exe",,,"exefile"
hkcr,".exe","Content Type",,"application/x-msdownload"
hkcr,".reg",,,"regfile"
hkcr,".txt",,,"txtfile"
hkcr,"exefile\shell\open\command",,,"""%%1"" %%*"
hkcr,"regfile\shell\open\command",,,"regedit.exe ""%%1"""
hkcr,"txtfile\shell\open\command",,0x20000,"%%SystemRoot%%\system32\NOTEPAD.EXE %%1"
[Strings]
==========================================================
將以上代碼複製粘貼到notepad中,保存為restore.inf與文章開始的fix.cmd檔案放在同一個目錄下,使用時直接運行fix.cmd.
最後的最後:這僅僅是作為一個電腦愛好者的個人作品,與商業軟體沒有可比性,只想作為公益軟體與大家分享,希望大家喜歡~
|