Войти

Показать полную графическую версию : Как или чем обработать INF файлы с параметрам добавления в реестр?


XDefender
01-10-2007, 10:06
есть INI файл со строками типа

HKLM,"SOFTWARE\Microsoft\Updates\WgaNotify\SP0\WgaNotify","Description",0,"Windows Genuine Advantage Notification Tool (KB905474)"
HKLM,"SOFTWARE\Microsoft\Updates\WgaNotify\SP0\WgaNotify","InstalledBy",0,"%NAME%"
HKLM,"SOFTWARE\Microsoft\Updates\WgaNotify\SP0\WgaNotify","InstalledDate",0,"%VERSION%"
HKLM,"SOFTWARE\Microsoft\Updates\WgaNotify\SP0\WgaNotify","Type",0,"Update"
HKLM,"SOFTWARE\Microsoft\Updates\WgaNotify\SP0\WgaNotify\Filelist\0","BuildCheckSum",0,"16bffb"
HKLM,"SOFTWARE\Microsoft\Updates\WgaNotify\SP0\WgaNotify\Filelist\0","BuildDate",0,"Fri Apr 13 17:18:37 2007"
HKLM,"SOFTWARE\Microsoft\Updates\WgaNotify\SP0\WgaNotify\Filelist\0","FileName",0,"LegitCheckControl.dll"

Как добавить все это в реестр в автомате?

Petya V4sechkin
01-10-2007, 10:18
XDefender, не INI, а INF.
Руководство по работе с INF-файлами (http://oszone.net/3827)

XDefender
01-10-2007, 14:00
Вопрос:

Правильно ли написал inf файл?

[Version]
Signature = "$Windows NT$"

[DefaultInstall]
AddReg=adr.T
DelReg=adr.P


[adr.T]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update","AUOptions",0x00010001,1
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon",0x00000000,1
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultUserName",0x00000000,"Administrator"
HKLM,"SOFTWARE\Microsoft\Driver Signing","Policy",0x00000001,0

HKCU,"SOFTWARE\Policies\Microsoft\Windows NT\Driver Signing","BehaviorOnFailedVerify",0x00010001,0
HKLM,"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE","iexplore.exe",0x00010001,0

[adr.P]
HKCU,"Control Panel\Desktop","SCRNSAVE.EXE"
HKLM,"SOFTWARE\Microsoft\Internet Explorer\Extensions\{c95fe080-8f5d-11d2-a20b-00aa003c157a}"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FindExtensions\Static\WebSearch"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FindExtensions\Static\WabFind"
HKCR,"CLSID\{87D62D94-71B3-4b9a-9489-5FE6850DC73E}"

Запуск произвожу командой

rundll32.exe advpack,LaunchINFSection %MY%\myreg.inf,DefaultInstall,0

Vadikan
02-10-2007, 20:50
XDefender, файл вроде правильный. Команда
rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 132 %MY%\myreg.inf




© OSzone.net 2001-2012