Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Drivers Instalation in Post-Install stage (New Method)

- - - - -

  • Please log in to reply
619 replies to this topic

#76
Netman66

Netman66

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 22-November 05
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.


How to remove advertisement from MSFN

#77
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • Joined 21-February 05
  • OS:none specified
  • Country: Country Flag
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
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • Joined 21-February 05
  • OS:none specified
  • Country: Country Flag
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
Netman66

Netman66

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 22-November 05
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!

Edited by Netman66, 13 September 2006 - 12:28 PM.


#80
Netman66

Netman66

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 22-November 05
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!

#81
tain

tain

    Cyber Ops

  • Super Moderator
  • 3,685 posts
  • Joined 24-September 05
  • OS:none specified
  • Country: Country Flag

Donator

- removed commandlines (useless)

So can this be used at all without invoking the GUI?

#82
twig123

twig123

    Advanced Member

  • Member
  • PipPipPip
  • 325 posts
  • Joined 02-October 05

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)


Usually Code 10 is incorrect drivers...
In my case I had working sound drivers from 2002, i removed the driver to test and a the system tried to reinstall the driver from the inf that is installed... but failed trying to find an additional file on the system. (not related to your software, just some extra testing). When your software removed the unknown device it would just attempt to reinstall the old 2002 driver, instead of the new 2006 provided on my driver cd. I can vouch that the 2006 driver work if i point windows to the folder where they are though.

... but thanks for the software update, I will test the new release shortly and report my findings.

#83
twig123

twig123

    Advanced Member

  • Member
  • PipPipPip
  • 325 posts
  • Joined 02-October 05
one Quick observance... the single diget code issues (ex: Code 1) is not removed when specified like in your settings. for it to work correctly, your software sees this as a ProblemID 01 (Code 01)... aka must be stated as a 2 digit code for it to be removed properly.

more reporting after further tests.

#84
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • Joined 21-February 05
  • OS:none specified
  • Country: Country Flag
TAiN: well if you set the program in Automatic mode GUI should pop_up and work automagically, all you need to do is to close the app after it's done. I can make it close automatically too but problem is that when program is closed it 'applies' default settings to registry. That way when you close it too soon and the plug & play devices are still searching for drivers they might end up in bad situation.

If someone has idea what my program can look for while the Plug & play devices are installed (some process or something) and when Windows finishes it, as for now i have NO CLUE how to make it work so my program CAN realy tell you when P&P is done. If someone knows what my program can look for i will gladly hear it :)

Netman: you are right with the removal process. As discountpc spotted it should be 01 not 1 and i overlooked it when changing things. Fixed in 0.5.4 that will be out soon.
Also can you verify if that C:\A has .inf file in it ? or somewhere in dir in dir. You must be aware that drivers can't be in packed form for example just setup.exe or so. Lemme know?


Discountpc: try playing with registry_path and report if it fixes your issues.



Changelog for 0.5.4
- one little typo when coding new functionalities, which caused removal process of devices with problem ID 01 to be not removed (tnx discountpc)


Get it :/

#85
Netman66

Netman66

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 22-November 05
OK, here's what I've found.

Running SetDevicePath.exe against my Drivers folder correctly populates the registry.

If I run your utility now, it removes everything, but doesn't put any entries at all except the default entry.

It appears the device path component of your utility doesn't want to work for me.

#86
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • Joined 21-February 05
  • OS:none specified
  • Country: Country Flag
I guess you have french version of windows. I'll try to add some more debug lines to .inf search function and we will see. Lets say it will be added in new version ;P

#87
Netman66

Netman66

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 22-November 05
It's English. We do have the MUI installed though.

I really want this to work. We support too many different hardware platforms to have to manage images for. A single image is the goal and your utility would be perfect if we could get it working.

Thanks for the effort and I hope we can put our fingers on the issue and solve it.

NM

#88
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • Joined 21-February 05
  • OS:none specified
  • Country: Country Flag
Netman66: i have uploaded new binary (same version) so just redownload it and use Debug=yes in config file. It should give big output ;) That might give me some hints on what can be wrong.

#89
Netman66

Netman66

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 22-November 05
Well, that was a little different now.

The script failed with the following error:

Attached File  error.JPG   29.11KB   32 downloads

Using the following INI:

[INFO]
Start=Automatic
Mode=Standard
Drivers_drive=C
Drivers_dir=\Asus
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=Yes
[Advanced]
Registry_Path=END

And here's the logfile:

[23:58:06] - =================== Log Start: TEST
[23:58:06] - Starting program on TEST.
[23:58:06] - Detecting Windows version - Windows XP x32
[23:58:06] - Checking for drivers directory existance.
[23:58:06] - Directory with drivers (C:\Asus) exist.
[23:58:06] - Detecting number of devices in system.
[23:58:06] - Found 137 devices of which 1 has problems.
[23:58:06] - Automatic start used - GoGoGo..
[23:58:06] - Setting Driver signing to OFF.
[23:58:06] - Setting path into registry using RegistryDevicePath method.
[23:58:06] - DEBUG in REGISTRYDEVICEPATH FUNCTION 0: Volume in drive C has no label.
[23:58:06] - DEBUG in REGISTRYDEVICEPATH FUNCTION 0: Volume Serial Number is 7C1C-7789
[23:58:06] - DEBUG in REGISTRYDEVICEPATH FUNCTION 0:
[23:58:06] - DEBUG in REGISTRYDEVICEPATH FUNCTION 0: Directory of C:\Asus
[23:58:06] - DEBUG in REGISTRYDEVICEPATH FUNCTION 1: Directory of C:\Asus


I hope this means something to you! :huh:

#90
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • Joined 21-February 05
  • OS:none specified
  • Country: Country Flag
I have reuploaded the version again. Try it now ;) Should be no error of that kind.

Here's yours:

[23:58:06] - DEBUG in REGISTRYDEVICEPATH FUNCTION 0: Directory of C:\Asus
[23:58:06] - DEBUG in REGISTRYDEVICEPATH FUNCTION 1: Directory of C:\Asus

To say the truth that lines says it all.

Here's min:
[16:15:10] - DEBUG in REGISTRYDEVICEPATH FUNCTION 0: Katalog: C:\All_Drivers
[16:15:10] - DEBUG in REGISTRYDEVICEPATH FUNCTION 1: Katalog: C:\All_Drivers

and i use ": " as splitting behaviour to get what i need. guess i need to find other way. Seems each language version has diffrent 'DIR' behaviour ;) lemme work on it. actually you don't need to test more. I have to think of better way to solve it. TNX!

#91
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • Joined 21-February 05
  • OS:none specified
  • Country: Country Flag
Once again i have reuploaded 0.5.4 version. Now it should FIX the issue with registry path not being added correctly. Please test it. And those who downloaded earlier 0.5.4 version pls redownload it.

#92
Netman66

Netman66

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 22-November 05
I'm now getting the script error again.


Attached File  error2.JPG   29.14KB   21 downloads

#93
Netman66

Netman66

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 22-November 05
Just tried it again on another machine and it works fine this time!

I suspect when I downloaded and overwrote the old version it didn't do it correctly.

Will let you know on Tuesday whether this clean download solves it.

Thanks for all the assistance and fixes!

#94
twig123

twig123

    Advanced Member

  • Member
  • PipPipPip
  • 325 posts
  • Joined 02-October 05
I checked and the 01 code changes are working now.
also, if I choose Begin or End... it still finds the existing INF first, and asks for the missing files. However, if I choose None, it will search the CD and will overlook the existing INF's like it is supposed to.

I was also wondering, after the devices are re-detected, I have to walk windows through the new hardware wizard. Can this be made automated? or is that already planned for a future release?

Here is my INI file if needed:
[INFO]
Start=Automatic
Mode=Standard
Drivers_drive=CDROM
Drivers_dir=\All_Drivers
Device_manager=Off
Method=RegistryDevicePath
Logging_to_file=Yes
Logging_option=Advanced
Drivers_Packed=No
Copy_drivers=No
Copy_where=C:\Drivers
Delete_drivers=Yes
Create_backup=No
Leave_registry_entries=No
Debug=No
[ADVANCED]
Registry_path=None
Problem_Ids=01,10,18,28,37,39

Edited by discountpc, 14 September 2006 - 10:06 PM.


#95
twig123

twig123

    Advanced Member

  • Member
  • PipPipPip
  • 325 posts
  • Joined 02-October 05
I was looking in the registry when the 'None' option is used... and the "DevicePath" key changes to blank when the program runs. Shouldn't this be set to the Driver source path? cause I assumed that the 'None' switch was just used to not look in the current systemroot\inf folder, but still use the new variable path...

#96
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • Joined 21-February 05
  • OS:none specified
  • Country: Country Flag
discountpc: correct behaviour when 'none' is used is clean devicepath on start of the function but it is supposed to add 'more' paths as it finds .inf's later on. If it doesn't add anything and you are sure path's are correct and inf's are there then there might be error in code :( Have you DOWNLOADED newest version that i uploaded? Maybe it was cached or so? As Netman66 gave me debug output that helped to solve the problem of paths not getting added to registry on English (probably other versions too, except Polish) windows. Maybe it was same cause for you too?

As for the Windows Wizard it's complicated issue. Are you sure you have correct 'paths' added in registry (as i said earlier there might have been problem with earlier version 0.5.4 and all before that)? I'll release 0.5.5 shortly to fix the confusion ;p

#97
Netman66

Netman66

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 22-November 05
I was also wondering about the Add New Hardware Wizard. I was under the impression that after the Registry was pointing to the correct location that the hardware should just install without asking for any manual input as long as all the correct drivers were there. Is this not the case?

If that's how it works, then we need to figure out how to automate that as it defeats the purpose of unattended installation.

So far so good though. It seems to be doing what it's supposed to other than the wizards.

#98
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • Joined 21-February 05
  • OS:none specified
  • Country: Country Flag
Well the Add Hardware Wizard shouldn't be there at all. As i expect Plug & Play to work in background and just install stuff and do nothing. Maybe baloon tip.. all done. And that's it. I experienced that Add hardware wizard myself few times, but i can count it on one hand. Other then that all drivers successfully installed without the wizard showing.

I would expect all the ppl that were experiencing problem with Add hardware wizard to be connected with the bug that wasn't adding paths to registry and when PLUG & PLAY found some device, and no drivers (as no path in registry = no drivers) then the wizard was showing. But if the wizard always shows up and the registry path is CORRECT then it's plain wrong.

If the wizards are really showing up for everyone and for every device maybe it's problem for WINDOWS to distinguish between multiple modem's, mulitple vga cards etc. Anyone tried it with using just one driver for modem, one vga card etc? I just don't get why the wizards would appear.

I realy have no idea WHY the Wizards show up, maybe there's a way to force window to not use WIZARDS at all (for the time the program runs or so). Anyone with info about that?

The last bastion can be of course use of AutoIt functionality to control widnows and to just make the program do the wizards for user. Only problem is it won't loook "as good" and i will have to learn functions that control mouse, windows etc :) But i guess it's doable.

Anyway if you guys can help me out on the topic about Wizards we can realy make it work and be very usefull for a lot of ppl.

#99
Netman66

Netman66

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 22-November 05
I have no problem helping you out with this - I see it as very useful if it works the way it's supposed to.

I will test this extensively on Tuesday when I'm back in front of the images I'm working on.

I have 9 different machines at my bench (6 different desktops and 3 different laptops) so I should be able to stress test this to the max.

Can you Upload 0.5.5 with all minor correction so I can use the latest cleaned build?

Incidently, what is the maximum path length for this registry key? I think it's 4096 characters - can you confirm?

Also, if you can write some logic into your code to display the length of the path (in the window) it will add to the registry it would be very helpful as a visual indicator of how close we are to the limit.

Thanks,
NM

#100
Netman66

Netman66

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 22-November 05
Nevermind the request for 0.5.5 - you've posted it already, sorry.

I have noticed one interesting thing which *may* prompt the Wizard to show up even if the drivers are located in the DevicePath path.

In the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup

...there is a value: Installation Sources

...which seem to hold paths to the drivers that were installed last.

If these values conflict, it may prompt the Wizard to appear.

I wonder if capturing, deleting then repopulating that value might work??




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users