MSFN Forum: Drivers Instalation in Post-Install stage (New Method) - MSFN Forum

Jump to content


  • 31 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Drivers Instalation in Post-Install stage (New Method) Updated: 1.XII.2009 version 2.0.0.28 Rate Topic: -----

#61 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 467
  • Joined: 21-February 05
  • OS:none specified
  • Country: Country Flag

Posted 30 August 2006 - 02:05 AM

[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.


#62 User is offline   devilrunner 

  • Junior
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 01-June 04

Posted 30 August 2006 - 10:35 AM

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.

This post has been edited by devilrunner: 30 August 2006 - 10:36 AM


#63 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 467
  • Joined: 21-February 05
  • OS:none specified
  • Country: Country Flag

Posted 03 September 2006 - 11:24 PM

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

#64 User is offline   devilrunner 

  • Junior
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 01-June 04

Posted 04 September 2006 - 02:15 PM

Thx man...
U rock!


I expect to be releasing my own drivers from cd method with this fix very soon...
So we can all get rid of that resume/wait/resume/wait fix.
Many thx to madboy

This post has been edited by devilrunner: 04 September 2006 - 02:16 PM


#65 User is offline   twig123 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 325
  • Joined: 02-October 05

Posted 05 September 2006 - 08:26 PM

How can this be changed to include the previous version on 7zip? because the newest seems to be causing an issue with un-compressing the 7z files.

#66 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 467
  • Joined: 21-February 05
  • OS:none specified
  • Country: Country Flag

Posted 06 September 2006 - 07:51 AM

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 :)

#67 User is offline   urie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 517
  • Joined: 30-July 03

Posted 06 September 2006 - 12:29 PM

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

#68 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 467
  • Joined: 21-February 05
  • OS:none specified
  • Country: Country Flag

Posted 07 September 2006 - 02:06 AM

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 ;)

#69 User is offline   Doc Symbiosis 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 333
  • Joined: 03-August 04

Posted 07 September 2006 - 07:35 AM

Does this method also work for SATA drivers?
I've just created an unattended 64 bit XP-CD and now want to integrate some SATA/RAID drivers.

#70 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 467
  • Joined: 21-February 05
  • OS:none specified
  • Country: Country Flag

Posted 07 September 2006 - 08:17 AM

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,

#71 User is offline   Avneet 

  • Member
  • PipPip
  • Group: Members
  • Posts: 175
  • Joined: 12-July 05

Posted 08 September 2006 - 02:34 PM

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

This post has been edited by Avneet: 08 September 2006 - 02:44 PM


#72 User is offline   urie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 517
  • Joined: 30-July 03

Posted 08 September 2006 - 03:16 PM

View PostAvneet, on Sep 8 2006, 09:34 PM, said:

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

Quote

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

#73 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 467
  • Joined: 21-February 05
  • OS:none specified
  • Country: Country Flag

Posted 08 September 2006 - 06:13 PM

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.

#74 User is offline   twig123 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 325
  • Joined: 02-October 05

Posted 13 September 2006 - 02:18 AM

View PostMadBoy, on Sep 7 2006, 03:06 AM, said:

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?

This post has been edited by discountpc: 13 September 2006 - 02:22 AM


#75 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 467
  • Joined: 21-February 05
  • OS:none specified
  • Country: Country Flag

Posted 13 September 2006 - 08:32 AM

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.micro...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??

#76 User is offline   Netman66 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 22-November 05

Posted 13 September 2006 - 11:01 AM

I am also having the same issues as ty628659. The tool states that it's adding the Registry Paths and that they are successful, however the path in the registry is never changed.

What key are you changing?

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion :: DevicePath

If so, there's no new entries.

#77 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 467
  • Joined: 21-February 05
  • OS:none specified
  • Country: Country Flag

Posted 13 September 2006 - 11:24 AM

Well i can't realy see why you would have that problem. But lets see.

Drivers_drive=C
Drivers_dir=\All_Drivers

Put some drivers in that or other dir specified by you. When you put them there (can be dir in dir in dir etc) check if .inf files exist (as the tool checks for dirs with inf's and add them to registry. If it can't find those inf's then it does nothing to you device path's.


I'll upload 0.5.3 in a sec and update first page. Check these option (make sure to read what they mean). Then monitor what happens in registry to your key while you set 'None' in that option. If the key changes. Then it means registry access is okey and it prolly can't find drivers or so. That option works only with 0.5.3+
[ADVANCED]
Registry_path=None

#78 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 467
  • Joined: 21-February 05
  • OS:none specified
  • Country: Country Flag

Posted 13 September 2006 - 11:48 AM

New version is out:
Changelog for 0.5.2-0.5.3
- removed commandlines (useless)
- cleaned up some more useless code
- added new ADVANCED option called problem_ids in hardware.ini.
- added new ADVANCED option called registry_path in hardware.ini.


Possible settings for hardware.ini for [ADVANCED] [/b]
Keep in mind those options are only good if you know what you are doing. Application will work JUST FINE without those settings being in hardware.ini. It will use defaults then. AGAIN. Do NOT use those options if you are unsure what they do.
Registry_path - possible options are Begin, End, None. This option controls if "%SystemRoot%\inf;" is supposed to be added in the begining, end or none at all in the registry line HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion :: DevicePath. I believe if you set it to End it will first look for correct driver for your device in YOUR NEW DRIVERS and then in the default Windows drivers dir. If you set it to None then drivers from default Windows drivers dir won't be taken in consideration at all. Keep in mind that some crucial devices like USB that are supported by WINDOWS use this dir.
Problem_Ids - here you put numbers separated by commas i.e. 1,10,18,28,37,39. This means that devices that match one of those problems IDS will be removed. You can either increase the numbers or decrease if you think default i use is too much. On that page: http://support.micro...kb/310123/en-us you can find what each problem means.

Hardware.ini for newest version 0.5.3 but with ADVANCED options in use looks like this:
[INFO]
Start=Manual
Mode=Standard
Drivers_drive=REMOVABLE
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
Debug=No
[ADVANCED]
Registry_path=Begin
Problem_Ids=1,10,18,28,37,39




Check it out and lemme know how it works ;) discountpc i hope you are satisfied with those 2 options ;) Should work for you!

#79 User is offline   Netman66 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 22-November 05

Posted 13 September 2006 - 12:15 PM

OK, ran the new build with the attached INI and LOG file.

Still no modification to the Registry.

Permissions on this key indicate Admin has ZFull Control and the normal User has Modify. We're running this as Admin.

The driver source was shortened down to see if it was a path length issue with no change.

I'm quite sure this will all work if the registry key would get modified.

Thanks in advance.

[INFO]
Start=Automatic
Mode=Standard
Drivers_drive=C
Drivers_dir=\A
Device_manager=On
Method=RegistryDevicePath
Logging_to_file=Yes
Logging_option=Advanced
Drivers_Packed=No
Copy_drivers=No
Copy_where=
Delete_drivers=No
Create_backup=No
Leave_Registry_Entries=No
Debug=No
[Advanced]
Registry_Path=None

[03:00:53] - =================== Log Start: TEST
[03:00:53] - Starting program on TEST.
[03:00:53] - Detecting Windows version - Windows XP x32
[03:00:53] - Checking for drivers directory existance.
[03:00:53] - Directory with drivers (C:\A) exist.
[03:00:53] - Detecting number of devices in system.
[03:00:53] - Found 126 devices of which 5 have problems.
[03:00:53] - Automatic start used - GoGoGo..
[03:00:53] - Setting Driver signing to OFF.
[03:00:53] - Setting path into registry using RegistryDevicePath method.
[03:00:53] - Drivers path was set successfully into registry.
[03:00:53] - Removing unknown hardware from system.
[03:00:54] - Unknown devices were removed successfully.
[03:00:54] - Starting Device Manager.
[03:00:54] - Forcing system to detect Plug & Play Devices.
[03:00:54] - System is now detecting and installing drivers for your hardware. Wait!

This post has been edited by Netman66: 13 September 2006 - 12:28 PM


#80 User is offline   Netman66 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 22-November 05

Posted 13 September 2006 - 12:57 PM

OK, I've got it to remove the existing default entry when Registry_Path=None and add the defualt back in when it set to BEGIN or END.

So the issue isn't with the key.

I dumped an unpacked driver into the root of my driver folder specified in the hardware INI (C:\A). The driver is relevant to the machine and one that is missing (the video) so it should pick it up, but it doesn't seem to want to add the path.

Any ideas?



Also just noticed that Advanced logging (in the new build) stopped logging removal events or the tool quit removing hardware!

Share this topic:


  • 31 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy