What the program is for:
After you install Windows on your computer usually you have to install drivers. One will say you can put drivers on Windows CD and skip that part but i don't realy like that way. What i did was dividing Computer installation into 4 parts. 1st is instalation of Windows, 2nd installation of drivers, 3rd giving computer name/domain and 4th installing software. In this thread 2nd part is covered (3rd i'm trying to build and 4th is done but it would require a lot of work if someone would want to adapt it for himself/his company.)
After compilation you need: Hardware.exe file and Hardware.ini file with settings (same dir). Hardware.ini is generated on first program use or when no hardware.ini is found.
To compile: 7z.exe, devcon32.exe, devcon64.exe.
Those files are attatched to this post but if you would prefer to get it from the official sources just download 7zip and copy 7z.exe and download devcon from microsoft webpages and rename binaries to corespond 32 and 64bit naming.
So far program works with following routine:
1. Checks if hardware.ini is in the right dir. (tested)
2. Checks if path to drivers realy exists (tested)
3. Turns off policy for driver signing (not realy working ;p)
4a. Sets right Device Path in registry to drivers (both 32/64) - (needs testing on 64)
or
4b. Uses SetupCopyOemInf
5. Removes all uknown devices from system (both 32/64) (uses Devcon.exe by Microsoft) - (needs testing on both)
6. Forces system to detect plug&play devices (both 32/64) - (needs testing on both)
7. Sets back registry settings for:
a. Sets default device path in registry - (tested on 32, needs testing on 64)
b. Sets default registry settings for driver signing (TURNS IT ON) - (not realy working ;p)
Hardware.ini settings:
[INFO]
Start=Manual --> Manual or Auto (manual requires you to press button)
Mode=Standard --> Standard/Unattended/CommandLine (for now only Standard works ;p)
Drivers_drive=REMOVABLE --> CDROM/REMOVABLE or simply drive letter (without : )
Drivers_dir=\All_Drivers --> path on drive
Device_manager=On --> On/Off - Device Manager (to monitor what's happening with devices)
Method=RegistryDevicePath --> RegistryDevicePath (4096 chars max into registry)/SetupCopyOemInf
Logging_to_file=Yes ---> Yes/No - logging to file ;)
Logging_option=Advanced --> Simple/Full - full might be slower but usefull for debugging.
Drivers_Packed=No --> Rar/7zip/No --> Packed or not. Set it here.
Copy_drivers=No --> If you wish to copy drivers to your drive before program starts working (Yes/No)
Copy_where=C:\Drivers --> Path where to copy drivers
Delete_drivers=No --> Yes/No - do you want to delete drivers on program close.
Create_backup=No --> Create backup of drivers dir from C:\Windows .. maybe someone got better idea?
Leave_registry_entries=No --> Yes or No (not working yet, just an option). Will be usefull for leaving registry entries (from RegistryDevicePath) in system. So you can use them without problems after reboot (some devices/drivers requires reboot to work)
Problems to solve:
- Signing of drivers isn't 100% working. Unfortunetly Microsoft implemented it the way it can't be realy done just by registry. Tests shown that also during change from Warn to IGNORE mode (My Computer -> Properties -> Hardware -> Driver Signing) besides standard registry keys that can be found all over the internet this key below also changes. On my computer it has 2 values (one for IGNORE and one for WARN). So unless i'll find a way to fix it.. Bummer. Maybe someone has some nice idea? Each computer has their own diffrent keys so it's not that simple as i seen on other forums in some posts ;)
- HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\PrivateHash 15 CA EF C3 34 E8 C8 78
- HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\PrivateHash 01 32 A3 68 55 C2 D2 00
Problem of signing drivers on unnatended cd doesn't exist because you can set the right value in winnt.sif or sysprep.inf. Or so i have read on Microsoft pages :) Oh well, we will see..
Explanation on RegistryDevicePath vs SetupCopyOemInf:
Orginally RegistryDevicePath and SetupCopyOemInf were written by pyron from MSFN forum. I rewrote them in AutoIt. RegistryDevicePath is nothing else but setting path of Drivers Dir that have .inf in the dir into registry. Keep in mind that reg key can be as long as 4096 chars (never realy got this confirmed but so they say). If you realy have a lot of dir in dirs in dirs with drivers or you just prefer the other way of implementing drivers you can use SetupCopyOemInf method. Oh well, i prefer RegistryDevicePath method ;p
Btw. if you're going to compile the source yourself remember to update FileInstall paths or it wont' realy work.
Least but not last wanted to thank a lot of ppl from this forum that made this possible. A lot of help came from BigDaddy, JdeB, Mhz, Smoke_N, th.meger, Valuater,vollyman, ChrisL, cameronsda, BigDod. If i skipped anyone, it wasn't intentional, lemme know :)
Hopefully all is clear, if not lemme know i'll try to explain better then. Please test it/check code. It prolly have lots of sloppy coding ;p
Attached File(s)
-
hardware_0.4.0.au3 (34.86K)
Number of downloads: 530 -
7z.zip (59.04K)
Number of downloads: 183 -
devcon32.zip (15.97K)
Number of downloads: 241 -
devcon64.zip (28.15K)
Number of downloads: 171 -
AngryMonitor.ico (7.6K)
Number of downloads: 201 -
hardware_v4.01.zip (350.87K)
Number of downloads: 374
This post has been edited by MadBoy: 13 May 2006 - 11:13 PM

Sign In
Register
Help


MultiQuote