Sign in to follow this  
Followers 0
FeReNGi

how to install IN HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\SYSTEM003

4 posts in this topic

#1 ·  Posted (edited)

I would like to install the windows embedded driver but a part of it doesn't work :

;Check for Windows embedded tools
If Not FileExists(@ProgramFilesDir &"\Windows Embedded\bin\sdiaut.dll") Then
    DirCreate(@ProgramFilesDir &"\Windows Embedded\bin")
    FileInstall("C:\Program Files\Windows Embedded\drivers\sdi.inf", @WindowsDir &"\inf\sdi.inf",1)
    FileInstall("C:\Program Files\Windows Embedded\drivers\sdi.sys", @SystemDir &"\drivers\SDI.sys",1)  
    FileInstall("C:\Program Files\Windows Embedded\bin\sdiaut.dll", "C:\Program Files\Windows Embedded\bin\sdiaut.dll",1)
    
    RunWait('regsvr32.exe /s "C:\Program Files\Windows Embedded\bin\sdiaut.dll"', @SystemDir, @SW_HIDE) 
    
    $Regkey = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\SYSTEM\003"
    RegWrite($Regkey,"ClassGUID","REG_SZ","{4D36E97D-E325-11CE-BFC1-08002BE10318}")
    RegWrite($Regkey,"Class","REG_SZ","System")
    RegWrite($Regkey,"HardwareID","REG_MULTI_SZ","SDI" & @LF & "I")
    RegWrite($Regkey,"Driver","REG_SZ","4D36E97D-E325-11CE-BFC1-08002BE10318}032")
    RegWrite($Regkey,"Mfg","REG_SZ","Microsoft")
    RegWrite($Regkey,"Service","REG_SZ","SDI")
    RegWrite($Regkey,"DeviceDesc","REG_SZ","Storage Device Image Device")
    RegWrite($Regkey,"ConfigFlags","REG_DWORD",0x00000000)
    RegWrite($Regkey,"Capabilities","REG_DWORD",0x00000000) 
    RegWrite($Regkey,"ParentIdPrefix","REG_SZ","1&2d12bed1&0")
    RegWrite($Regkey & "\LogConf")
    RegWrite($Regkey & "\Control","ActiveService","REG_SZ","SDI")   
    
    $RegClass = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E97D-E325-11CE-BFC1-08002BE10318}032"
    RegWrite($RegClass, "InfPath", "REG_SZ", "sdi.inf")
    RegWrite($RegClass, "InfSection", "REG_SZ", "DiskInstall")
    RegWrite($RegClass, "InfSectionExt", "REG_SZ", ".NT")   
    RegWrite($RegClass, "ProviderName", "REG_SZ", "Microsoft")  
    RegWrite($RegClass, "DriverDateData", "REG_BINARY", "0040478D662BC101")
    RegWrite($RegClass, "DriverDate", "REG_SZ", "8-23-2001")
    RegWrite($RegClass, "DriverVersion", "REG_SZ", "1.0.0.0")   
    RegWrite($RegClass, "MatchingDeviceId", "REG_SZ", "sdi")    
    RegWrite($RegClass, "DriverDesc", "REG_SZ", "Storage Device Image Device")      
    
    $RegService = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SDI"
    RegWrite($RegService, "Type", "REG_DWORD", 0x00000001)  
    RegWrite($RegService, "Start", "REG_DWORD", 0x00000000) 
    RegWrite($RegService, "ErrorControl", "REG_DWORD", 0x00000001)  
    RegWrite($RegService, "ImagePath", "REG_SZ", "system32\DRIVERS\SDI.sys")    
    RegWrite($RegService, "DisplayName", "REG_SZ", "Storage Device Image Driver")   
    RegWrite($RegService & "\Enum", "0", "REG_SZ", "ROOT\SYSTEM\003")   
    RegWrite($RegService & "\Enum", "Count", "REG_DWORD", 0x00000001)   
    RegWrite($RegService & "\Enum", "NextInstance", "REG_DWORD", 0x00000001)        
    
;   MsgBox(4096 + 16, "W A R N I N G","Windows Embedded Tools not installed...! ",30)   
;   Local $oIE = ObjCreate("InternetExplorer.Application")
;   $oIE.Visible = 1
;   $oIE.Silent = 1 ; Don't show IE's dialog boxes              
;   Local $URL = "http://msdn2.microsoft.com/en-us/embedded/aa731405.aspx"
;   $oIE.Navigate( $URL )           
;   Sleep(500)
;   $oIE = 0        
;   Exit    
EndIf

The problem is to write to this section $Regkey = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\SYSTEM\003"

How can this be done ?

SDI.INF

; SDI.INF 
; Windows installation file for installing the SDI Device and Driver
; Copyright (c) 1990-2001 Microsoft Corporation All rights Reserved

[Version]
Signature="$WINDOWS NT$"
Class=System
ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318} 
CatalogFile=SDI.CAT
Provider=%MSFT%
DriverVer=08/23/2001,1.00.0000.0

[DestinationDirs]
DefaultDestDir = 12

; [ClassInstall32]
; Addreg=SDIClassReg

; [SDIClassReg]
; HKR,,,0,%ClassName%
; HKR,,Icon,,-5

[DiskCopyfiles]
SDI.sys

[SourceDisksNames]
1=%InstDisk%,

[SourceDisksFiles]
SDI.sys=1

[Manufacturer]
%MSFT% = SDIDevice

[SDIDevice]
%SDIDevDesc% = DiskInstall, SDI

[DiskInstall.NT]
CopyFiles = DiskCopyfiles

[DiskInstall.NT.Services]
AddService = SDI, %SPSVCINST_ASSOCSERVICE%, SDIServiceInst

[SDIServiceInst]
ServiceType   = %SERVICE_KERNEL_DRIVER%
StartType    = %SERVICE_BOOT_START%
ErrorControl  = %SERVICE_ERROR_NORMAL%
DisplayName   = %SDIServiceDesc%
ServiceBinary = %12%\SDI.sys
AddReg      = SDIAddReg

[SDIAddReg]

[Strings]
MSFT            = "Microsoft"
; ClassName    = "SDI"
SDIDevDesc    = "Storage Device Image Device"
SDIServiceDesc  = "Storage Device Image Driver"
InstDisk        = "Storage Device Image Driver Install Disk"
;*******************************************
;Handy macro substitutions (non-localizable)
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER  = 1
SERVICE_BOOT_START   = 0
SERVICE_ERROR_NORMAL   = 1
REG_DWORD             = 0x00010001
REG_SZ               = 0x00000000
Edited by FeReNGi

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Nobody ?

I tried but I can't even write manually (using regedit) to the enum folder, let alone anything below that... And I tried as a local admin. Windows seems to just not allow it for some reason. I can however write to one all of my other three CurrentControlSet subfolders.

Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Only System has rights to change anything under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum ... everyone has read rights...

so unless you want to change the permissions or run as system you might have a hard time.

edit: it does seem that administrators have special permissions under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\SYSTEM\ subfolder. Namely Query Value, Enumerate Subkeys, Notify and Read Control. At least this is the case in my computer, other computers may differ :whistle:

Edited by jinxter

> there are 10 types of people in the world, those who understand binary and those who don't.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0