Jump to content

Silent INF Installation Through Batch


Recommended Posts

Posted

Hi,

Before people keep flaming me that I should first search the forums for related post etcetera, I've been there but it wasn't working for me. I've got the Toshiba UDF Driver(thdudf.inf, thdudf.sys). Now I want to be able to silently install the inf through the command prompt. I've tried several commands but non of them resulted in a full successful installation of the UDF driver. A few combinations I tried:

rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 %systemdrive%\install\thdudf.inf,,3

rundll32.exe advpack.dll,LaunchINFSectionEx %systemdrive%\install\thdudf.inf,4,N

rundll32.exe advpack.dll,LaunchINFSection %systemdrive%\install\thdudf.inf, DefaultInstall,3

After trying these combinations it does copy the files in the windows folder and some registry entries are imported. Nevertheless it still doesn't work since the "legacy" keys in the registry are missing which are there if the inf has been installed manually.

I don't believe it's impossible to do since it installs fine when I just right click and choose install. I think it's because my knowledge of INFs is insufficient.

Could someone please tell me how to be able to silently install the inf through the command prompt.

The contents of thdudf.inf:

; thdudf.inf

;

; Setup information file for the TOSHIBA HD DVD File System Driver

; for Windows XP.

;

; Copyright © 2006, TOSHIBA Corporation

;

[Version]

Signature = "$Windows NT$"

;Class = LegacyDriver

;ClassGUID = {8ECC055D-047F-11D1-A537-0000F8753ED1}

Class = System

ClassGUID = {4D36E97D-E325-11CE-BFC1-08002BE10318}

Provider = "TOSHIBA Corporation"

DriverVer = 4/14/2006,1.0.0.3

CatalogFile = thdudf.cat

[Manufacturer]

%thdudfAuthor% = TOSHIBA

[FileSystem]

%thdudfDescription% = DefaultInstall,%thdudfKey%

[ClassInstall32]

AddReg = thdudf.Install.ClassReg

[thdudf.Install.ClassReg]

;HKR,,,%REG_SZ%,"%thdudfClass%"

HKR,,,%REG_SZ%, %thdudfClass%

;HKR,,"Icon",%REG_SZ%,"-5"

HKR,,Icon,,"-5"

[DefaultInstall.NTx86]

AddReg = thdudf.Install.AddReg

CopyFiles = thdudf.Files.Drv,thdudf.Files.Inf

DelFiles = thdudf.Files.Pnf

[DefaultInstall.NTx86.Services]

AddService = "%thdudfKey%",%SVCINST_ASSOCSERVICE%,thdudf.Service,thdudf.EventLog

[DefaultUninstall.NTx86]

DelFiles = thdudf.Files.Drv,thdudf.Files.Inf,thdudf.Files.Pnf

DelReg = thdudf.Remove.DelReg

[DefaultUninstall.NTx86.Services]

DelService = "%thdudfKey%",%SVCINST_DELETEEVENTLOGENTRY%

[thdudf.Install.AddReg]

HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\%thdudfKey%","UninstallString",%REG_SZ%,"%11%\RunDll32.Exe %11%\SetupAPI.Dll,InstallHinfSection DefaultUninstall.NTx86 4 %17%\thdudf.Inf"

[thdudf.Remove.DelReg]

HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\%thdudfKey%"

HKLM,"System\CurrentControlSet\Services\%thdudfKey%\Parameters"

[thdudf.Service]

DisplayName = "%thdudfDriver%"

ServiceType = %SERVICE_KERNEL_FILESYSTEM_DRIVER%

StartType = %SERVICE_AUTO_START%

LoadOrderGroup = File System

ErrorControl = %SERVICE_ERROR_NORMAL%

ServiceBinary = "%12%\thdudf.sys"

AddReg = thdudf.Service.Reg

[thdudf.Service.Reg]

HKR,"Parameters","DebugOption",%REG_DWORD%,0x00000000

[thdudf.EventLog]

AddReg = thdudf.EventLog.Reg

[thdudf.EventLog.Reg]

HKR,,"EventMessageFile",%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.Dll"

HKR,,"TypesSupported",%REG_DWORD%,7

[sourceDisksNames]

;99 = "%thdudfDescription%",,0000-0000,"."

1 = %thdudfDescription%,,,

[sourceDisksFiles]

;thdudf.inf = 99

;thdudf.sys = 99

thdudf.sys = 1

[DestinationDirs]

thdudf.Files.Drv = 12 ; %SystemRoot%\System32\Drivers

thdudf.Files.Inf = 17 ; %SystemRoot%\Inf

thdudf.Files.Pnf = 17 ; %SystemRoot%\Pnf

[thdudf.Files.Drv]

thdudf.sys,,,%DELFLG_IN_USE%

[thdudf.Files.Inf]

thdudf.inf,,,%DELFLG_IN_USE%

[thdudf.Files.Pnf]

thdudf.pnf,,,%DELFLG_IN_USE%

[strings]

; Localizable Strings

thdudfAuthor = "TOSHIBA"

thdudfClass = "File System"

thdudfDescription = "TOSHIBA UDF2.5 Reader File System Driver"

thdudfDriver = "TOSHIBA UDF2.5 Reader File System Driver"

thdudfKey = "thdudf"

thdudfVersion = "1.0.0.3"

; Non-Localizable Strings

DELFLG_IN_USE = 0x00010000

; Registry Data Types

REG_SZ = 0x00000000

REG_BINARY = 0x00000001

REG_SZ_NOCLOBBER = 0x00000002

REG_BINARY_NOCLOBBER = 0x00000003

REG_MULTI_SZ = 0x00010000

REG_DWORD = 0x00010001

REG_MULTI_SZ_NOCLOBBER = 0x00010002

REG_DWORD_NOCLOBBER = 0x00010003

REG_EXPAND_SZ = 0x00020000

REG_EXPAND_SZ_NOCLOBBER = 0x00020002

; Driver and Service Types

SERVICE_KERNEL_DRIVER = 0x00000001

SERVICE_KERNEL_FILESYSTEM_DRIVER = 0x00000002

; Driver and Service Start Types

SERVICE_BOOT_START = 0

SERVICE_SYSTEM_START = 1

SERVICE_AUTO_START = 2

SERVICE_MANUAL_START = 3

SERVICE_NEVER_START = 4

; Driver and Service Error Control

SERVICE_ERROR_IGNORE = 0

SERVICE_ERROR_NORMAL = 1

SERVICE_ERROR_SEVERE = 2

SERVICE_ERROR_CRITICAL = 3

SVCINST_TAGTOFRONT = 0x00000001

SVCINST_ASSOCSERVICE = 0x00000002

SVCINST_DELETEEVENTLOGENTRY = 0x00000004


Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...