我想对C:\windows\system32\OemInfo.ini中的Support Information
下Line1=下写数据,
必需是回车就向第二行Line2=下写数据
#include <GUIConstants.au3>
GUICreate("OEM修改器", 380 ,430)
GUICtrlCreateGroup("", 5, 1, 370, 425)
GUICtrlCreateLabel("注册到:", 170, 20)
$wink1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOwner")
$Input = GUICtrlCreateInput("", 220, 15, 145,20)
GUICtrlSetData($Input, ($wink1))
$wink2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOrganization")
$Input2 = GUICtrlCreateInput("", 220, 40, 145,20)
GUICtrlSetData($Input2, ($wink2))
$wink3 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductId")
$Input3 = GUICtrlCreateInput("", 220, 65, 145,20)
GUICtrlSetData($Input3, ($wink3))
$wink4 = IniRead("C:\windows\system32\OemInfo.ini", "General", "Manufacturer", "")
GUICtrlCreateLabel("支持信息:", 200, 220)
$Input4 = GUICtrlCreateInput("", 220, 235, 145,20)
GUICtrlSetData($Input4, ($wink4))
$wink5 = IniRead("C:\windows\system32\OemInfo.ini", "General", "Model", "")
$Input5 = GUICtrlCreateInput("", 220, 255, 145,20)
GUICtrlSetData($Input5, ($wink5))
$wink6 = IniRead("C:\windows\system32\OemInfo.ini", "Support Information", "Line1", "")
$Input6 = GUICtrlCreateEdit("", 10, 280, 360 , 100)
GUICtrlSetData($Input6, ($wink6))
GUICtrlCreateButton("删除oem信息",90, 390 ,90 ,30)
$Button2 = GUICtrlCreateButton("确定",200, 390 ,70 ,30)
$Button3 = GUICtrlCreateButton("返回",290, 390 ,70 ,30)
GUISetState(@SW_SHOW)
While 1
$nmsg = GUIGEtMsg()
Select
Case $nmsg = $GUI_EVENT_CLOSE
ExitLoop
Case $nmsg = $Button3
Exit
Case $nmsg = $Button2
$okInput = GUICtrlRead ($Input)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOwner", "REG_SZ", $okInput)
$okInput2 = GUICtrlRead ($Input2)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOrganization", "REG_SZ", $okInput2)
$okInput3 = GUICtrlRead ($Input3)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductId", "REG_SZ", $okInput3)
$okInput4 = GUICtrlRead ($Input4)
$sIni = @SystemDir & "\oeminfo.ini"
IniWrite("C:\windows\system32\OemInfo.ini", "General", "Manufacturer",$okInput4)
$okInput5 = GUICtrlRead ($Input5)
IniWrite("C:\windows\system32\OemInfo.ini", "General", "Model",$okInput5)
$okInput6 = GUICtrlRead ($Input6)
IniWrite("C:\windows\system32\OemInfo.ini", "Support Information", "Line1", $okInput6)
EndSelect
WEnd
[ 本帖最后由 sliqi 于 2008-9-24 15:04 编辑 ] |