Jump to content

Drivers Instalation in Post-Install stage (New Method)


MadBoy

Recommended Posts

[devilrunner]

It uses internal routines written in AutoIt v3 with a slight use of "DIR" command ;) On begining i used Pyron's external programs but as soon someone explained me how those programs works i wrote them in AutoIt.

I don't like the SetupCopyOemInf routine either as it's including all the drivers into WINDOWS so in my opinion it's NOT great. But it works :P

[ty628659]

Thank you for your offer of help but i seriously don't know how to fix your issue even if i would be working on your computer :) I am just wondering wtf is wrong ;) Would be nice if someone else could try the exact steps you're doing so i could confirm it's one big BUG that needs fixing, still it would be weird that it doesn't work in your cases at all ;) I don't see where you oculd have done wrong and where the program could be wrong. Especially i'm curious why 7zip doesn't work as it should as i think 7zip is backwards compatible.

Link to comment
Share on other sites


Well I don't like it either but it's the only way arround the setdevicepath limitations for me..

I am using quite allot of drivers:-)

Would it be able to receive the code of that routine?

I am having problems with pyron's exe in conjunction with a suspended setup.exe as illustrated (HERE)

I don't like the available setup.exe resume/wait/resume solution.

Edited by devilrunner
Link to comment
Share on other sites

Devilrunner:

If $method = "SetupCopyOemInf" Then
_AddLineBox("Integrating drivers with SetupCopyOemInf method.")
$DirOutput = Run(@ComSpec & " /c DIR /A:D /S " & $path_to_drivers, '', @SW_HIDE, 2)
While 1
$DirData = StdoutRead($DirOutput)
If @error Then ExitLoop
If $DirData Then
$DirOutputOnce &= $DirData
Else
Sleep(10)
EndIf
WEnd
; Remove spaces from output
$DirOutputOnce = StringStripWS($DirOutputOnce, 3)
; Split output into array
$DirSplit = StringSplit($DirOutputOnce, @CRLF, 1)
$NrCopiedInfs = 0
For $i = 1 To $DirSplit[0]
If StringInStr($DirSplit[$i], $path_to_drivers) Then
$registrystring = StringSplit($DirSplit[$i], ": ", 1)
If $registrystring[0] = 2 Then; Testing amount of elements in array, if more then 2 Exits
If StringInStr($registrystring[2], $path_to_drivers) Then; Making sure that Drivers path exists in string
$drivers_directory = $registrystring[2]

$search_ini = FileFindFirstFile($drivers_directory & "\*.inf")
If $search_ini = -1 Then
Else
$dll_exe = DllOpen("setupapi.dll")
While 1
$search_file = FileFindNextFile($search_ini)
$full_path_to_inf = $drivers_directory & "\" & $search_file
If @error Then ExitLoop
$dll_result = DllCall($dll_exe, "int", "SetupCopyOEMInf", "str", $full_path_to_inf, "str", "", "int", 1, "int", 8, "str", "", "int", 0, "int", 0, "str", "")
If $logging_option = "Advanced" Then
If @error = 0 Then
_AddLineBox("Inf integration passed: " & $drivers_directory & "\" & $search_file)
$NrCopiedInfs = $NrCopiedInfs + 1
ElseIf @error = 1 Then
_AddLineBox("Inf integration failed: " & $drivers_directory & "\" & $search_file)
ElseIf @error = 2 Or @error = 3 Then
_AddLineBox("Unknown return type or Function not found in DLL. Tell author about it!")
EndIf
EndIf
WEnd
DllClose($dll_exe)
EndIf
FileClose($search_ini)
EndIf
EndIf
EndIf
Next
If $NrCopiedInfs = 1 Then _AddLineBox("SetupCopyOemInf method completed. " & $NrCopiedInfs & " driver was integrated.")
If $NrCopiedInfs = 0 Then _AddLineBox("SetupCopyOemInf method completed. No drivers were integrated.")
If $NrCopiedInfs <> 0 And $NrCopiedInfs <> 1 Then _AddLineBox("SetupCopyOemInf method completed. " & $NrCopiedInfs & " drivers were integrated.")
$DeviceDrivers = "PASSED"
EndIf

Enjoy

Link to comment
Share on other sites

I have uploaded new version 0.5.0 on first page. DOwnload it from there and lemme know if the Unpacking works now. I redownloaded commandline version from page changed things a bit. Please check and give feedback. Use Debug = Yes in config file for debugging :)

Link to comment
Share on other sites

MadBoy, great program would it be possible to add your instructions on how to use it i.e hardware.ini switches e.c.t as a help file,

I copied text from Possible settings for hardware.ini from first post. But it would be great if instructions could be included with program.

Thanks keep up the great work :D

Link to comment
Share on other sites

This method is completly diffrent method. Sata/Scsi drivers HAVE to be included in Windows installation as otherwise your hdd's will be invisible for Windows so you won't be able to install it. This method is good for other drivers such as graphic cards, audio cards etc

Cheers,

Link to comment
Share on other sites

found new hardware wizard still pops up.. anyone knws how to get rid of that.. i mean install drivers without that screen popping up

actually i have no idea y this happaesns.. even when u plug in a usb flash drive .. the wizard pops up and u have to press next to install the usb driver (which infact shouldnt happen.. shud be done automatically) anyone knws y this is happeining

Edited by Avneet
Link to comment
Share on other sites

found new hardware wizard still pops up.. anyone knws how to get rid of that.. i mean install drivers without that screen popping up

actually i have no idea y this happaesns.. even when u plug in a usb flash drive .. the wizard pops up and u have to press next to install the usb driver (which infact shouldnt happen.. shud be done automatically) anyone knws y this is happeining

[INFO]
Start=Manual
Mode=Standard
Drivers_drive=CDROM
Drivers_dir=\All_Drivers
Device_manager=On
Method=RegistryDevicePath
Logging_to_file=Yes
Logging_option=Advanced
Drivers_Packed=No
Copy_drivers=No
Copy_where=C:\Drivers
Delete_drivers=No
Create_backup=No
Leave_registry_entries=No

Try changing Device_manager=On to Device_manager=Off i,e

Device_manager - possible options are on or off. If you leave it On when your devices will be removed you can see progress on how your devices are being redetected. Usefull for testing.

hope this helps

Link to comment
Share on other sites

urie:

He means that when he connects any device Windows asks him with it's WIZARD to point the drivers for device.

Avneet:

Check registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\

Find there key: DevicePath

Type of the key: REG_EXPAND_SZ

Value of the key must have at least this: %SystemRoot%\inf;

It can also have other paths after semi-colon.

Check it,

Hope it helps.

Link to comment
Share on other sites

Sure, it will be done when ppl will say it WORKS :P I mean there seems to be a problem with packed drivers for some users until i am told ALL is WORKING there's no sense to add help file ;)

7zip packed drivers are now working correctly.

However, I have a sound card that has a "Problem ID 10" which the software says that it is removing unknown hardware, but directly after that it says that there was no devices removed... Sometimes when the program runs it tries to reinstall the old malfunctioning drivers that are already on the computer, instead of the new driver provided in BTS DriverPacks. Any incite on this issue?

Edited by discountpc
Link to comment
Share on other sites

Well my programs shows all devices that have some problems. Only some of those problems are driver related. My program only removes devices that match: 1, 18, 28, 37, 39 problems. You can find what they mean here: http://support.microsoft.com/kb/310123/en-us

Your code: Code 10

If the device has a FailReasonString value in its hardware key, that string appears as the error message. The driver or enumerator puts this registry string value there. If there is no FailReasonString in the hardware key, you receive the following error message:

This device cannot start. (Code 10)

Recommended resolution

Device failed to start. Click Update Driver to update the drivers for this device. On the General Properties tab of the device, click Troubleshoot to start the Troubleshooting Wizard. "

I'm not sure if this code should be added to my program. Can you tell me what happens if you delete device from DeviceManager and rescan p&p? DOes it work correctly? Finds drivers and all? If yes then i can add code 10 to my program. I could probably even add line in .ini where you could specify which codes are removed and which aren't but it might be risky for some ppl ;)

As for the old drivers being used instead of the new supported it's because in registry path you have old_path for drivers ("%SystemRoot%\inf;") and the new paths are added after that. So the searching starts in Windows dir first then it goes to wherever your drivers are. I wonder if we will do little swap places so the "%SystemRoot%\inf;" would be added to end, and new drivers paths to begining. We can make some test like that. Eventually we could also have an option to completly not use "%SystemRoot%\inf;" in the registry path (and only have program set it back to defaults on exit, as it is doing it now). That way Windows will be forced to look for new drivers instead using old ones. Only disadvantage i can see now is that some devices that are nativly supported by Windows (like usb devices) might not be detected correctly while the program is working. Okey i'll try to prepare some new version with what i just said ;) And gimme shouts about the Code 10 and other codes if you think they should be added. Or maybe that .ini option will be better??

Link to comment
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
  • Recently Browsing   0 members

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