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

#1
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
What is it for:
This program was written to help install drivers on newly installed computers. It's main goal is to be used after Windows is installed and after user logs in for the first time to Windows using Administrative account. All you do is put drivers for all (or just one) computers in one directory, start the program and press Action/Install Missing Drivers (or in Automatic mode just start program and it should do all steps by itself). It should remove unknown devices from system and recheck them with drivers you have uploaded to drivers directory of your choice. If it finds the drivers, device gets installed without any questions. Usually drivers should work in the form that they are supplied by manufacturer, but sometimes it may require some work from your side to prepare them.

To run program you need:
1. pro-s_hardware_<version>.exe
2. hardware_config.xml

This program is fully functional with Driver Packs. Newest version and config file can be found at projects website.

To do list:
- Add application updater (to update itself)
- Add database online support to download drivers from the WEB
- Add timers to execute some stuff simultaneously (where possible)
Version 2.0.0.28 (public)
- Fixed Drivers database creation for larger inf files. (recommended upgrade to newest version because of that);
Version 2.0.0.27 (public)
- Tweaked logging a bit
- Tweaked SEARCH & MATCH function
Version 2.0.0.26 (public)
- Tweaked hardware wizard a bit. There's no longer need to provide string with & char before the underlined char on button
Version 2.0.0.25 (public)
- Fixed hardware wizard (script breaking change in AutoIt which I've not noticed after updating to newest beta)
Version 2.0.0.24 (public)
- Changed behaviour for first time start of program for drivers database (or when drivers db doesn't exists) should be a bit more user friendly now
- Removed Loading screen (was too ugly) ;)
Version 2.0.0.23 (non-public)
- Added more debugging lines in Hardware Wizard
Changelog for 2.0.0.22 (public)
- Fixed bug to _UpdateStatusBar icons. Icons now show correctly all the time (tnx bowmore)
- Fixed bug when .inf file had incorrectly build version information (tnx pSycho-Y2K)
- Added missing status notes
Changelog for 2.0.0.21 (public)
- Added function to automatically change Signed Drivers option to Ignore and restore it back to original value when done (window management not nessecary)
- Compiled to newest version with special options which should give some speed improvements
- Updated version of 7zip to 4.65 (it's too soon for beta 9.07 or so)
Changelog for 2.0.0.20 (public)
- Fixed bug where some .inf's would be ignored (tnx GrandCat), nasty typo :P
- Fixed bug where database wouldn't be recreated if one already existed and $variables were used
Changelog for 2.0.0.19 (public)
- Added workaround for devices with &REV_ (tnx hoolie)
Changelog for 2.0.0.18 (public)
- Changed amounts of elements from 30000 to 8300000 (my bad)
Changelog for 2.0.0.17 (public)
- First release since a while (expect lots of bugs :P)
Changelog for 2.0.0.16 (non-public)
- Changes to listing of directories for RegistryDevicePath (better/optimized)
- Changes to listing of files for SetupCopyOemInf (better/optimized)
- Updated version of 7zip to 4.57
- Added window managing of Hardware wizard
Changelog for 2.0.0.15 (non-public)
- Added drive mapping (supported in LOGS/DRIVERS DB/DRIVERS PATH/DRIVERS COPY PATH)
- Changes to _DetectInfrastructure(), warning for Windows Vista added (vista is not supported as far as i can tell).
- Changes to hardware_config.xml (update your configuration!!):
===> REPLACED: <drivers_directory> AND <drivers_drive> WITH <drivers_directory_path>
===> REPLACED: <log_filename> AND <log_path> WITH <log_filename_path>
===> ADDED: <drivers_database> with subkeys added
===> ADDED: <drivers_method> added
===> ADDED: <share_configuration> with subkeys added
===> ADDED: <window_managing> with subkeys added
- Added Modern Menu look
- Added prepare drivers database
Changelog for 2.0.0.14 (non-public)
- Updated settings check to be more informative in case config file wasn't found. Was missleading back then.
- Updated settings check msgboxes to ones with icons
- Changed config file name from hardware.xml to hardware_config.xml (update your configuration!!)
- Fixed default log file names when the correct one cannot be created
Changelog for 2.0.0.13 (non-public)
- Fixed logging problem where log file was created but no data was populated
- Fixed flickering when data was populated to SimpleDeviceListView
- Updated code to newest beta of AutoIT v3 (some GUI functions were broken)
- Fixed DllCall for Plug and Play Rescan (tnx to Smoke_N)
(Changed: DllCall() new method of passing types by reference using *.)
(Changed: DllCall(): short_ptr, long_ptr, int_ptr types deprecated. Use short*, long* and int* respectively.)

Changelog for 2.0.0.10 (public)
- Fix of archives detection. Even thou <drivers_packed> option was No program was always checking for archives and not going further if it doesn't find any.
Changelog for 2.0.0.9
- Changed completly aproach to program due to several bugs in old code.
- Changed program name to Pro-S Hardware Professional.
- New GUI.
- New CODE.
- New configuration file (format .xml).
- New features.
- New autodetection of .7zip or .rar archives (only requires now drivers_packed set to Yes).
- Removed Backup option as it wasn't realy working.
- Removed Leave_registry_entries option as it wasn't realy working.
- Renamed Reboot option to auto_reboot_when_done. Other options not working!
as this will come back in newer better form. You can see in XML file that it's gonna be nice.
- Changed so now Debug option was moved to log_option which now takes Simple/Advanced/Debug as variables.
- Changed how variables look like in LOG section - they now start with $ instead of & as this char is unsupported by XML format.
- Too much to list all changes
Changelog for 0.7.3
- Fixed serious bug that was disallowing device to be removed when there was only one device in the list that didn't had any driver. (tnx kickarse!!)
- Added option Update_All_Drivers_Version (read documentation) which makes Windows update all drivers to newest version that it has access to (tnx kickarse!!)
- Cleaned up code (useless variables etc)
- Fixed bug that made the feature reboot useless (tnx kickarse!!)
- Added variable for Log_Path - &SystemDrive
Changelog for 0.7.2
- Added option to configure log files names/path to logfiles (check section [LOG]
- Changed config file format (please be advised on that!)
- Changed programs icon
Changelog for 0.7.1
- Fixed (hopefully, needs testing) better detection of devices with problems (thanks Jeca)
- Cleaned up, change code for removal of devices (requires testing aswell)
Changelog for 0.7.0
- Added option Force_run [ADVANCED] to ommit checking for unknown devices (even if 0 devices without drivers are detected program still can be run)
- Added option Reboot [ADVANCED] that in Automatic mode can reboot or shutdown pc after program is done running.
- Added option Plug_and_play [ADVANCED] to have ability to choose between Internal Plug & Play command and Devcon Rescan (was requested)
- Fixed hopefully 7zip problem with long filenames/spaces
Changelog for 0.6.8
- Added option RELATIVE to drivers_drive that takes the drive letter from path where the program is started at. So no more setting drive letter for harddrives is required. Just put hardware.exe on same drive as the drivers are located and it should find them with no problems.
- Added check for / in drivers_dir so it can't be used
Changelog for 0.6.7
- Changed to diffrent icon
- Added Time_To_Start option in Automatic mode
- Fixed so rundll32.exe process is now detected with more precision (as in even if rundll32.exe processes are running before program starts it only will care for the one that is started right after detection procedure and will ignore the rest)

Instructions
Below is example of how the hardware.xml can look like. As you may notice in the example below the config file is divide in couple of diffrent sections. This is to keep config more organized.

Hardware_config.xml for newest version includes following lines:
<?xml version="1.0" encoding="utf-8"?>
<settings>
  <basic_configuration>
	<choice>manual</choice>
	<window_managing>
		<hardware_wizard>
			<wizard_use>Yes</wizard_use>
			<wizard_title>Found New Hardware Wizard</wizard_title>
			<wizard_button_cancel>Cancel</wizard_button_cancel>
			<wizard_button_next>Next</wizard_button_next>
			<wizard_button_finish>Finish</wizard_button_finish>
		</hardware_wizard>
	</window_managing>
	<share_configuration>
		<use_mapping>Yes</use_mapping>
		<map_network_drive>	
			<drive_1>
				<share_path>\\127.0.0.1\c$</share_path>
				<domain_username>EM\MadBoy</domain_username>
				<domain_password>SuperPass</domain_password>
			</drive_1>
		</map_network_drive>
	</share_configuration>
		<drivers>
		  <drivers_method>New</drivers_method>
		  <drivers_database_use>Yes</drivers_database_use>
		  <drivers_database_recreate>No</drivers_database_recreate>
		  <drivers_database_path>$ProgramDir\hardware_database.db</drivers_database_path>
		  <drivers_directory_path>RELATIVE:\PenDrive\Drivers</drivers_directory_path>
		  <drivers_packed>No</drivers_packed>
		  <drivers_copy>No</drivers_copy>
		  <drivers_copy_path>C:\DriversTest</drivers_copy_path>
		  <drivers_copy_delete>No</drivers_copy_delete>
		  <options>
			  <method>RegistryDevicePath</method>
			  <registry_path>Begin</registry_path>
			  <problem_ids>01,10,18,24,28,37,39</problem_ids>
			  <update_all>No</update_all>
			  <plug_and_play>
					<option>Internal</option>
					<time_to_wait>15</time_to_wait>
			  </plug_and_play>
			  <shutdown>
					<auto_reboot_when_necessary>No</auto_reboot_when_necessary>
					<auto_reboot_when_done>No</auto_reboot_when_done>
					<auto_login>Yes</auto_login>
					<notify_when_done>Yes</notify_when_done>
			  </shutdown>
			  <time_to_run>0</time_to_run>
			  <force_run>No</force_run>
			  <device_manager>No</device_manager>
		  </options>
   	 </drivers>
   	 <log>
		  <log_overwrite>No</log_overwrite>
		  <log_to_file>Yes</log_to_file>
		  <log_filename_path>Drive_1:\hardware.log</log_filename_path>
		  <log_option>Simple</log_option>
	</log>
   	 <gui>
		  <hide_legacy_devices>No</hide_legacy_devices>
		  <fade_in_effect>No</fade_in_effect>
		  <hide_views>No</hide_views>
		</gui>
  </basic_configuration>
</settings>

Possible settings for hardware_config.xml:

choice - possible options are Manual and Automatic. In standard mode when you choose Automatic program will automatically checks everything and if unknown devices will be found it should remove them, and drivers path to registry or implement them into system and then re-detect devices. Manual option requires pressing button and is suggested to use in early stages till you really know what you are doing and you tested that everything works.


About section: This section holds language specific entries. It's very important to set it to proper language depending on system language you have. If you don't set it to what it should be you'll end up in program stuck in a loop.

SubSection: <window_managing> \ <hardware_wizard>
About sub-section: Hardware Wizard that shows up from time to time during drivers installation.

==> <wizard_use>Yes</wizard_use>
==> <wizard_title>Found New Hardware Wizard</wizard_title>
==> <wizard_button_cancel>Cancel</wizard_button_cancel>
==> <wizard_button_next>Next</wizard_button_next>
==> <wizard_button_finish>Finish</wizard_button_finish>


About section: This section allows mapping of drives.
Comments on sub-section: Mapping of drives happens at the very begging of program so the log from mapping of drives may not be available in the log (but should be visible in the GUI). This is to give everyone ability to use shares also for LOGS. You can have as many drives mapped as 20.

==> <use_mapping>Yes</use_mapping> -> possible values are Yes or No. You either want to map drives or not.
==> <map_network_drive> -> subsection that defines drives that are to be mapped.
=====> <drive_1> -> this value is quite imporant. It's name is later on used as a drive letter in values. You can have it called drive_1, myshare or even evilshare. Check example below for more explanation.
=====> <share_path>\\127.0.0.1\c$</share_path> -> full share path.
=====> <domain_username>EM\MadBoy</domain_username> -> user name along with domain in format as shown in the example.
=====> <domain_password>SuperPass</domain_password> -> password in clear format. Remember it's not wise to use private accounts. Use some open for everyone that has only specific access rights to specifc shares.


Section <share_configuration> example 1:
<share_configuration>	
	<map_network_drive>
		<use_mapping>Yes</use_mapping>	
		<drive_1>
			<share_path>\\127.0.0.1\c$</share_path>
			<domain_username>EM\MadBoy</domain_username>
			<domain_password>SuperPass</domain_password>
		</drive_1>
		<evilshare>
			<share_path>\\127.0.0.1\d$</share_path>
			<domain_username>EM\MadBoy24324</domain_username>
			<domain_password>Su3432perPass</domain_password>
		</evilshare>
		<SomeOthershare>
			<share_path>\\myserver\c\shared_path</share_path>
			<domain_username>EM\MadBoy24324</domain_username>
			<domain_password>Su3432perPass</domain_password>
		</SomeOthershare>
	</map_network_drive>
</share_configuration>
Section <share_configuration> example 2:
<share_configuration>	
	<map_network_drive>
		<use_mapping>Yes</use_mapping>	
		<drive_5>
			<share_path>\\127.0.0.1\c$</share_path>
			<domain_username>EM\MadBoy</domain_username>
			<domain_password>SuperPass</domain_password>
		</drive_5>
	</map_network_drive>
</share_configuration>

About section: This sections is the most important section of this program. This is where you define how program should behave when trying to find and install drivers.
==> <drivers_method>New</drivers_method> -> Possible settings are Old and New.
[*] Old drivers method is simple and takes all directories that have files (.inf) inside and puts them either in registry (when using method RegistryDevicePath) or integrates each inf separatly to system directory (when using SetupCopyOemInf method).
[*] New drivers method is a bit more advanced. It goes thru all files (.inf) and finds Hardware ID's they support. Then program compares them with devices that require drivers to be installed (so called Error Devices) and if any drivers match then that specific driver directory is added to registry (when using method RegistryDevicePath) or integrates that inf separatly to system directory (when using SetupCopyOemInf method).
==> <drivers_database_use>Yes</drivers_database_use> -> Possible settings are Yes or No.
[*] Comment: Worth to notice information is that if you use New Drivers method you don't nessecary need to set this on. Program will internally create database of drivers anyway. However creating database of drivers overhead can heavily increase speed of finding and installing correct drivers.
==> <drivers_database_recreate>No</drivers_database_recreate> -> Possible settings are Yes or No.
[*] Comment: Not realy useful feature as it will try to create new database every time program runs. As this is time consuming it would be the same as settings <drivers_database_use> to No when using New drivers method. You may wish to skip this or simply experience this for yourself.
==> <drivers_database_path>$ProgramDir\hardware_database.db</drivers_database_path> -> Full path to drivers database. Can use variables\mapped drives as described below.
[*] Comment: This setting is important for <drivers_database_use>. If you set <drivers_database_use> to Yes and your path to this database will be incorrect program will automatically turn of <drivers_database_use>.
==> <drivers_directory_path>RELATIVE:\PenDrive\Drivers</drivers_directory_path> -> Full path to where drivers are located. Can use variables\mapped drives as described below.
==> <drivers_packed>Yes</drivers_packed> -> Possible settings are Yes or No.
[*] Comment: Both .7zip and .rar format are supported. Note this may or may not work with <drivers_database_use>. But in my opinion to get this to work you would have to unpack .7z files first, run database prepare on it and then use packed files (which would be unpacked on program run). Feel free to use Bashrat Drivers Pack with this.
==> <drivers_copy>No</drivers_copy> -> Possible settings are Yes or No.
[*] Comment: This is to be used when you want to copy drivers first to some drive before "playing" with them. Works in conjuction with <drivers_copy_path>
==> <drivers_copy_path>C:\DriversTest</drivers_copy_path> -> Full path to where drivers are to be copied. Can use variables\mapped drives as described below.
==> <drivers_copy_delete>No</drivers_copy_delete> -> Possible settings are Yes or No. This setting should be used when we want drivers to be deleted when quiting the program.

Sub-Section:<drivers> \ <options>

==> update_all - possible options are No or Yes. This feature makes Windows update all drivers to the newest possible version that it can find in given path (in my opinion it should work without problems for both RegistryDevicePath and SetupCopyOemInf method but please report on that). Keep in mind that this command takes time (depending on amount of all drivers and devices) to run. Also when this option is enabled program will go start even if there's no Devices without drivers so you don't have to use 'Force_Run' option.
==> time_to_run - time in seconds to start program. Only available in Automatic mode.
==> auto_reboot_when_done - possible options are 0 or 2 or 6 or 9. Gives ability to reboot/shutdown pc after application is ending it's work. Works only in Automatic Mode. 0 means no reboot at all. 2 means reboot computer when done, 6 means run force reboot when done (closes other applications etc), 9 means shutdown and power down computer.
==> 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. 01,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. Keep in mind that there have to be 2 digits for example: 01,05,09,10,18.
==> plug_and_play - possible options are Internal or Devcon. It enforces use of one of the functions depending on preferences of the user.
==> force_run - possible options are Yes or No. It gives ability to force run even if there are no devices that require action. It can be used if devices are not visible yet for system when the program is run but when Plug and Play rescan command is run they would normally show up but wouldn't be able to find drivers.


Section <drivers> example 1:
<drivers>
		  <drivers_method>New</drivers_method>
		  <drivers_database_use>Yes</drivers_database_use>
		  <drivers_database_recreate>No</drivers_database_recreate>
		  <drivers_database_path>$ProgramDir\hardware_database.db</drivers_database_path>
		  <drivers_directory_path>RELATIVE:\PenDrive\Drivers</drivers_directory_path>
		  <drivers_packed>No</drivers_packed>
		  <drivers_copy>No</drivers_copy>
		  <drivers_copy_path>C:\DriversTest</drivers_copy_path>
		  <drivers_copy_delete>No</drivers_copy_delete>
		  <options>
			  <method>RegistryDevicePath</method>
			  <registry_path>Begin</registry_path>
			  <problem_ids>01,10,18,24,28,37,39</problem_ids>
			  <update_all>No</update_all>
			  <plug_and_play>
					<option>Internal</option>
					<time_to_wait>15</time_to_wait>
			  </plug_and_play>
			  <shutdown>
					<auto_reboot_when_necessary>No</auto_reboot_when_necessary>
					<auto_reboot_when_done>No</auto_reboot_when_done>
					<auto_login>Yes</auto_login>
					<notify_when_done>Yes</notify_when_done>
			  </shutdown>
			  <time_to_run>0</time_to_run>
			  <force_run>No</force_run>
			  <device_manager>No</device_manager>
		  </options>
   	 </drivers>
Section <drivers> example 2:
<drivers>
		  <drivers_method>Old</drivers_method>
		  <drivers_database_use>Yes</drivers_database_use>
		  <drivers_database_recreate>No</drivers_database_recreate>
		  <drivers_database_path>$ProgramDir\hardware_database.db</drivers_database_path>
		  <drivers_directory_path>RELATIVE:\PenDrive\Drivers</drivers_directory_path>
		  <drivers_packed>No</drivers_packed>
		  <drivers_copy>No</drivers_copy>
		  <drivers_copy_path>C:\DriversTest</drivers_copy_path>
		  <drivers_copy_delete>No</drivers_copy_delete>
		  <options>
			  <method>RegistryDevicePath</method>
			  <registry_path>Begin</registry_path>
			  <problem_ids>01,10,18,24,28,37,39</problem_ids>
			  <update_all>No</update_all>
			  <plug_and_play>
					<option>Internal</option>
					<time_to_wait>15</time_to_wait>
			  </plug_and_play>
			  <shutdown>
					<auto_reboot_when_necessary>No</auto_reboot_when_necessary>
					<auto_reboot_when_done>No</auto_reboot_when_done>
					<auto_login>Yes</auto_login>
					<notify_when_done>Yes</notify_when_done>
			  </shutdown>
			  <time_to_run>0</time_to_run>
			  <force_run>No</force_run>
			  <device_manager>No</device_manager>
		  </options>
   	 </drivers>
Section <drivers> example 3:
<drivers>
		  <drivers_method>New</drivers_method>
		  <drivers_database_use>No</drivers_database_use>
		  <drivers_database_recreate>No</drivers_database_recreate>
		  <drivers_database_path>$ProgramDir\hardware_database.db</drivers_database_path>
		  <drivers_directory_path>RELATIVE:\PenDrive\Drivers</drivers_directory_path>
		  <drivers_packed>No</drivers_packed>
		  <drivers_copy>No</drivers_copy>
		  <drivers_copy_path>C:\DriversTest</drivers_copy_path>
		  <drivers_copy_delete>No</drivers_copy_delete>
		  <options>
			  <method>RegistryDevicePath</method>
			  <registry_path>Begin</registry_path>
			  <problem_ids>01,10,18,24,28,37,39</problem_ids>
			  <update_all>No</update_all>
			  <plug_and_play>
					<option>Internal</option>
					<time_to_wait>15</time_to_wait>
			  </plug_and_play>
			  <shutdown>
					<auto_reboot_when_necessary>No</auto_reboot_when_necessary>
					<auto_reboot_when_done>No</auto_reboot_when_done>
					<auto_login>Yes</auto_login>
					<notify_when_done>Yes</notify_when_done>
			  </shutdown>
			  <time_to_run>0</time_to_run>
			  <force_run>No</force_run>
			  <device_manager>No</device_manager>
		  </options>
   	 </drivers>
Section <drivers> example 4:
<drivers>
		  <drivers_method>Old</drivers_method>
		  <drivers_database_use>No</drivers_database_use>
		  <drivers_database_recreate>No</drivers_database_recreate>
		  <drivers_database_path>$ProgramDir\hardware_database.db</drivers_database_path>
		  <drivers_directory_path>RELATIVE:\PenDrive\Drivers</drivers_directory_path>
		  <drivers_packed>No</drivers_packed>
		  <drivers_copy>No</drivers_copy>
		  <drivers_copy_path>C:\DriversTest</drivers_copy_path>
		  <drivers_copy_delete>No</drivers_copy_delete>
		  <options>
			  <method>RegistryDevicePath</method>
			  <registry_path>Begin</registry_path>
			  <problem_ids>01,10,18,24,28,37,39</problem_ids>
			  <update_all>No</update_all>
			  <plug_and_play>
					<option>Internal</option>
					<time_to_wait>15</time_to_wait>
			  </plug_and_play>
			  <shutdown>
					<auto_reboot_when_necessary>No</auto_reboot_when_necessary>
					<auto_reboot_when_done>No</auto_reboot_when_done>
					<auto_login>Yes</auto_login>
					<notify_when_done>Yes</notify_when_done>
			  </shutdown>
			  <time_to_run>0</time_to_run>
			  <force_run>No</force_run>
			  <device_manager>No</device_manager>
		  </options>
   	 </drivers>

About section: This sections takes care of logging settings.
===> <log_overwrite>No</log_overwrite> -> Possible settings are Yes or No. This is to determine if the log should be cleaned up every time you start program or not (of course only if the file specifed already exists).
===> <log_to_file>Yes</log_to_file> -> Possible settings are Yes or No. This will tell program to only show LOG in GUI or also to write to file. My suggestion leave it on. Will be easier for me to debug your problems.
===> <log_filename_path>Drive_1:\hardware.log</log_filename_path> -> Full path to your log file. In this example you can see I use Drive_1 which is one of the mapped drives. But you can put FULL PATH or use other variables which are explained below.
===> <log_option>Simple</log_option> -> Possible options are Simple, Advanced or Debug. Each level gives a bit more information to log.


Section <log> example 1:
<log>
	<log_overwrite>No</log_overwrite>
	<log_to_file>Yes</log_to_file>
	<log_filename_path>Drive_1:\hardware.log</log_filename_path>
	<log_option>Simple</log_option>
</log>
Section <log> example 2:
<log>
	<log_overwrite>No</log_overwrite>
	<log_to_file>Yes</log_to_file>
	<log_filename_path>RELATIVE:\hardware.log</log_filename_path>
	<log_option>Simple</log_option>
</log>
Section <log> example 3:
<log>
	<log_overwrite>No</log_overwrite>
	<log_to_file>Yes</log_to_file>
	<log_filename_path>$ProgramsDir\hardware.log</log_filename_path>
	<log_option>Simple</log_option>
</log>

About section: This sections takes care of gui related settings.

===> <hide_legacy_devices>No</hide_legacy_devices> -> Possible settings are Yes or No. This should hide legacy/degrade devices from View.
===> <fade_in_effect>No</fade_in_effect> -> Possible settings are Yes or No. Gives fading effect, not realy useful.
===> <hide_views>No</hide_views> -> Possible settings are Yes or No. This should be only used if you don't want to see the Devices populated to Devices View, Advanced View and Error View. Only use this if you have all your settings configured properly and you know you don't want to see it. This can speed up program by about 6-10 seconds depending on CPU.



$date => returns the current date
$computername => returns the current computer name (YHP001, HOME01, SOMECOMP)
$WindowsDir => returns the full path to Windows Director (C:\Windows, D:\Win, C:\WinXP)
$ProgramDir => returns the full path to Program Directory (D:\Programs\ProHardware, E:\Drivers, C:\TestDir)
$MyDocumentsDir => returns full path My Documents Directory (C:\Documents and Settings\<some_user>\My Documents)
$TempDir => returns full path to Temp directory (C:\Temp)
$SystemDrive => returns drive letter along with : (C:, D:, E:)

RELATIVE => returns drive letter without : (C, D, E). It's drive letter relative to where program is located.
CDROM => returns drive letter without : (D, E, F, G). It's drive letter of CDROM.
REMOVABLE => returns drive letter without : (D, E, F, G). It's drive letter of all USB devices and alike.


The use of program is standard mode:
1. Set the right stuff in hardware.xml (drivers location, can have subdirs etc).
2. Start the program. Removal of Unknown devices should start (in Automatic start or requires a button in Manual start)
3. Redetection of removed devices should start.
4. After windows finishes installing drivers you should be told so. You can then safely click the Exit button.

NOTE: In Automatic version program will close itself when done.

Attached Files


Edited by MadBoy, 01 December 2009 - 06:51 AM.



How to remove advertisement from MSFN

#2
Bâshrat the Sneaky

Bâshrat the Sneaky

    aka Wim Leers

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,214 posts
  • OS:none specified
  • Country: Country Flag
Looks very useful!

#3
No_NaMe

No_NaMe
  • Member
  • 1 posts
upss. I am from turkei and Megaupload.com not work (All ip's blocked) :) Please change download link. i want try this program ;)
Thank you...

#4
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
@No_NaMe -> here you go, server changed. Hope you will like the proggy.

@Bâshrat the Sneaky --> tnx ;) hopefully will have more functions in it soon. already added some more.

#5
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
Added support for 64bit systems.. which might be usefull for some. It needs testing so would be nice to get some response if it works or not ;p Also if anyone could tell me if in Windows 64 the paths are the same for:
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Driver Signing", "Policy",
"HKEY_CURRENT_USER\Software\Microsoft\Driver Signing", "Policy"
"HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows NT\Driver Signing", "BehaviorOnFailedVerify"
just in 64bit registry or something changed. As for 0.2.2 version until i know more on this issue Drivers Signing behaviour does the routine from 32bit system. I will update asap if anyone can confirm if keys haven't changed or have changed their paths.

Edited by MadBoy, 19 March 2006 - 05:13 AM.


#6
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
All works?? Something doesn't work? I need some info about this, else i can't do much besides developing it further..

#7
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
GUI ADDED, check it out :)

#8
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
Found little bug (check changelog). Fixed app is ready for download 0.3.1. I also noticed that the program can only work once on given machine. After it removes "Unknown" devices first time some weird process happens that they are not marked as Unknown anymore even when system doesn't find any drivers for them. In Device manager they are still as Unknown but Devcon doesn't care anymore. Not realy sure why. I'll try to investigate the problem and let you guys know. So far i tested it on Win2k / XP and it seems to work (although you can't start it more then once if all drivers weren't in specified dir, since it will just say nothing to remove).

#9
donjuan

donjuan

    Newbie

  • Member
  • 19 posts
What is this man?

Attached File  Image2.jpg   58.5KB   993 downloads

#10
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
An error ;) Seems that you've a lot of dirs in dirs for Drivers.. lemme check if i will find that error and i'll up the fixed version for you. Althought you should use 0.3.1 but i think it has that bug aswell. Lemme check.. and i'll get back to you. Hopefully i will get some time today to do it.

#11
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
@donjuan - please try the new version 0.3.2 and lemme know if bug is gone.

#12
reuphong

reuphong
  • Member
  • 7 posts
What is it for ?, can you tell more detail about : how to use ?, and how it works ?

#13
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
I thought the first post was enough explanation. But lets give it one more try.. I have divided instalation into 3 phases:
1. Automatic instalation of Windows (which is covered preety much on MSFN)
2. Instalation of drivers after first login to system (this program covers this phase)
3. Instalation of applications (wrote program which installs all programs unattended, detects which server to use, with nice GUI etc but it's too personalized as it is to release it - maybe later)

Okey so basically you put hardware.exe and hardware.ini on CD (or usb driver or wherver you wish but remember to set right settings in hardware.ini). Then you also put on that CD directory with all drivers you need. So it would look like:
E:\hardware.exe
E:\hardware.ini
E:\Drivers
E:\Drivers\VGA
E:\Drivers\AUDIO
E:\Drivers\ETC

So after you're done with 1st phase (windows instalation), you login to system, insert CD with drivers (2nd phase) and start hardware.exe.. it should delete all unknown devices in your system.. set the right paths into registry so windows will have easy way to find it without your interaction, redetect removed unkown devices.. And that's it. You should by now have every drivers filled.

NOTE1: be sure to put drivers in clean format (it doesn[t support packed drivers or self-extracting), at least not at the moment. If it will be needed, it can be included.

NOTE2: hardware.exe / .ini not nessecary have to be in same place as drivers, so they can be put anywhere on CD or HDD.

#14
donjuan

donjuan

    Newbie

  • Member
  • 19 posts

@donjuan - please try the new version 0.3.2 and lemme know if bug is gone.


This time it works but it does not remove the unknown devices.My language is Turkish by the way which are "bilinmeyen aygıt" in device manager.Is there a way you can fix this program because I want to use your prog with driverpacks from beshrat , on systems with unknown drivers.This is an hope giving utility...
Thanks in advance..

Attached File  Image2.jpg   77.14KB   638 downloads

#15
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
Get this program. Unpack it. copy devcon.exe into some easy accessible place. Go to Start/Run and type CMD there. Then find devcon.exe and do "devcon findall =Unknown" and tell me what output you have there. Later on you can check with "devcon findall =bilinmeyen" or devcon findall =bilinmeyen aygıt but i realy doubt the language matters here. I know i'm missing something to make sure it detects unknown devices correctly. I'll test some here and will wait for replay from you. Tnx for testing btw.

#16
Scrapple

Scrapple

    Newbie

  • Member
  • 46 posts
This seems handy! But I would appreciate the source-code...

Written in AutoIT, isn't it?

Thanx!

#17
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
Yes, it's written in autotit. But i wouldn't like to release it, at least not yet as there is a lot more to cover with this program. I don't want all the work i have put it in .. to be lost within a few minutes. If you're wondering if there's malicious code.. well there isn't. But i guess i can't realy convince you, if you think so.

#18
Scrapple

Scrapple

    Newbie

  • Member
  • 46 posts
Well, I'm not the suspicious kind, but I do hate reinventing the wheel because I'd like to adapt some of your prog to work in conjunction with seupcopyoeminf.exe.

So what I mean by that, is doing a scan of all present hardware devices and integrating only the needed drivers. That way you won't need a devicepath setting, which is linked to 4096 chars.

Another thing is the skinning/GUI. (less importance)

I don't really care about having credit for any program, so I'd gladly give my extra source back to you to perhaps use the new ideas.

#19
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
Well copyoeminf.exe is great proggy and i can add it to my program without big problem. It has one big disadvantage (that's why i decided to go with device path instead). It copies every inf .. including those that won't be used. I tried it few times with all the drivers from bashrat (think it was his drivers package). Over 700mb. And i ended up few waiting few minutes, or more waiting and watching screen as each .inf is getting copied one by one. Of course it can be used for much smaller amount of drivers and it will work fine and as fast. If you want i can 'add' copyoeminf.exe in some next version within days. Or if you know the routine how copyoeminf works (since i am not sure if all it does is going thru drivers dirs and copying nfo or also doing something else. When i get that info it shouldn't be problem to reproduce it in autoit and add it as option to choose if you wanna use setdevicepath or copyoeminf routine. Just another variable in hardware.ini.

Atm i have bigger problem that needs to be solved and when it gets solved i can preety much add more things into it. Devcon behaviour is a bit unpredictable to me. "devcon remove =Unknown" works the first time it's started (even on polish system). Then devcon rescan .. rescans devices. It's all fine and works. But if by accident it won't find drivers for any of those removed devices.. devcon doesn't care anymore. Running "devcon remove =Unknown" second time won't show any results (and in device manager you can clearly see unknown device, just it seems invisible for devcon). Maybe you can help on this?

#20
Scrapple

Scrapple

    Newbie

  • Member
  • 46 posts
Ok man, no problemo, just solve your current problems and build things from there.

About the devcon output... I don't know about that, but I think the devcon sourcecode is included in the DDK or the Platform SDK... so maybe this could help you...?

I do have one question for you: How do you set non-WHQL to ignore from AutoIt?

In batch I tried:
reg add "HKCU\SOFTWARE\Microsoft\Driver Signing" /v Policy /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\Driver Signing" /v Policy /d 00 /f
reg add "HKLM\SOFTWARE\Microsoft\Non-Driver Signing" /v Policy /d 00 /f

But that didn't work... auto-clicking it to "Ignore" from the XP-GUI "driver signing options" from within autoit is an option, but I'd like to know the "under the skin" way... :-)

Edited by Scrapple, 29 March 2006 - 11:52 AM.


#21
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
I'm not sure it works thou :P Haven't been able to test it (only few comps so far). It uses all info i could find on some forums here..
Func DriverSigningOff(); Sets Driver Signing to OFF.
	RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Driver Signing", "Policy", "REG_BINARY", "00")
	RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Driver Signing", "Policy", "REG_DWORD", "0")
	RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows NT\Driver Signing", "BehaviorOnFailedVerify", "REG_DWORD", "00000000")
EndFunc

Func DriverSigningOn(); Resets Driver Signing to DEFAULT.
	RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Driver Signing", "Policy", "REG_BINARY", "01")
	RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Driver Signing", "Policy", "REG_DWORD", "1")
	RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows NT\Driver Signing", "BehaviorOnFailedVerify", "REG_DWORD", "00000001")
EndFunc

Edited by MadBoy, 29 March 2006 - 11:53 AM.


#22
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
@donjuan
no need for more testing for now. I know where the problem is. Seems that when devices are removed from device manager by either hand (not 100% sure but think so) or devcon status from Unknown (device with problems: 28) is changed to Device with problems: 01 and is not longer marked as Unknown. So it will take me some time to redo the devcon search function and the whole process of device removal. Hopefully i will get some time at work to do this ;) next version then should be language independant.

#23
donjuan

donjuan

    Newbie

  • Member
  • 19 posts

@donjuan
no need for more testing for now. I know where the problem is. Seems that when devices are removed from device manager by either hand (not 100% sure but think so) or devcon status from Unknown (device with problems: 28) is changed to Device with problems: 01 and is not longer marked as Unknown. So it will take me some time to redo the devcon search function and the whole process of device removal. Hopefully i will get some time at work to do this ;) next version then should be language independant.


Thank u very much in advance.Your tool will be very usefull in my opinion, especially for unknown devices in presetup systems.Looking forward to your newer version..

#24
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
@donjuan - I think i fixed it. But it needs testing. Pls report if it works. Check changelog for details. As for presetup stage, as i understand you mean the stage while the windows is still being installed, my program hasn't been tested for that issue so you need to report on that. The thing here is that Devcon isn't used when Unattended is set to On because windows detects new devices by default so doesn't need devcon to do it's job. So it does all the things that non-unattended option without Devcon Remove/Rescan. Plus there's no GUI for unattended mode. I might add it but need some reports how this version works atm.

#25
MadBoy

MadBoy

    Advanced Member

  • Member
  • PipPipPip
  • 467 posts
  • OS:none specified
  • Country: Country Flag
New version is out. I rushed it a bit but thought i would share it before i end up starting a lot of changes to GUI and other stuff. So without further ado...
Download version 0.3.6 (Current with GUI)

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

Possible changes in next versions:
- Option to have copied drivers to C:\Drivers (or other dir you choose) and then using it
as the main driver directory. Mighty be usefull for ppl who like to leave the drivers
on hdd, and for use with pyron's method.
- Completly redo of GUI. As someone said GUI isn't good enough which i knew on begining,
but wanted to have something easy and done fast so i could see the progress going on.
So the project will have new GUI soon. Better, nicer. Maybe special GUI for congfiguration.
- Waiting for other ideas and problems.

Changelog for 0.3.6
- Added REMOVABLE drives to be autodetected (you can use it instead of CDROM or drive letter)
- Added function that will create hardware.ini automagically if there is no hardware.ini present (usefull ;p)
- Added option that opens Device Manager while devices are being removed/detected.
- Added option to use either RegistryDevicePath or SetupCopyOemInf by pyron


Would be nice if someone would give his opinion about this, especially about Driver Signing. Couldn't realy found good solution.




2 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


    Bing (1), Baidu (1)


How to remove advertisement from MSFN