Jump to content

Drivers Instalation in Post-Install stage (New Method)


MadBoy

Recommended Posts

Thanks for all the comments. I would advice you to wait for the new version which will have some "problems" resolved and some things fixed. However since you asked a lot of questions i will try to answer ;)

1. And for the log file, how do you intend to write to the $programdir$ if this was burned on a CD?

- It is up to you to set the path correctly. What i put there is default for using from PenDrive or any other device. However the code has error proof logging. It will check if it can write to the path specified in the config and if it can't do that it will try to write the log to $ProgramDir (in your case it would do exactly same thing) and if that errors out too it will write the log to C:\. If you have any suggestions how to make it work diffrent way feel free to advice how you would like it to be taken care of. However keep in mind that new version that will be out soon has some significant changes on this aswell. But that is another story.

2. "There are no devices marked for removal. If you think this is an error correct config file with proper PROBLEM ID's.". Why is this even comming up? Why does there even have to be a device marked for removal to begin with?

- When the program started it was simple tool to remove devices that have no drivers. In Windows devices that have no drivers or have other kind of problems are marked with a problem ID. Program lists all devices and then checks for their Problem ID. Each problem ID has diffrent meaning. If i remember correctly of the top of my head Problem ID 1 and 22 are for missing driver. On the first page there's a link to Microsoft Web site explaining every problem id and possible match. The problem id's in example are the ones that i found out by experience ;) Feel free to remove anything you wish ;) However if you leave the field empty the default ones, hardcoded will be used.

3. Can't seem to get the 'update drivers' feature working. I run the app on a machine I know needs updates but it doesn't even do anything, comes up with the same error about no devices marked for removal. Im not trying to do that, I just want to update drivers...

- As the program in the begining was mostly suppoed to fix devices that require driver and update feature was added recently you will have to use force_run option in the config file to ignore the check for devices that have errors only. This should make the program to skip the check and follow up doing other procedures.

4. EDIT: Does the 'drivers_copy_path' accept environment variables? I do not wish to hard code the path but rather have it %systemdrive% or %windir% etc

- At the moment it doesnt. However new version will.

5. "...but it is looking for the C:\Drivers folder, not the C:\Test\UniversalDriverDisk\Drivers folder...."

As you are using RELATIVE value it only means that drive letter is relative not the whole path. So the relative for your program means C: and then you have to enter the path which in your case would be

\Test\UniversalDriverDisk\Drivers. I suggest waiting for new version which will be built a bit diffrently.

As the program was started i had no knowledge at coding at all. I just simply found some batch file that was doing something and couldn't understand a thing and i needed some realy good solution for my work. So i started digging up and found AutoIt. Posted the batch and asked for porting the batch file to autoit. Noone helped :) Suprise suprise it wasn't such an easy job as it looked. So i started doing it by myself. Now after some time i am coding a bit better and understand basics so the coding is going much better and the features are good aswell. However in the code there are many things from the old code and it takes time to replace them. What seemed to be great solution at time now is just bad code that even i can't understand why i put it like that ;)

Link to comment
Share on other sites


Just noticed your EDIT: *EDIT: I realize why now, nicely done. Question though, devices I have intentionally disabled, (error code 22), will they be updated or skipped or what?

Simply don't put code 22 in problem id's field in config and it will skip removal of that device. The problem ID's are only used if you want to 'remove' that device prior to drivers instalation. When using UpdateAll drivers feature the problems id's aren't taken into consideration.

Link to comment
Share on other sites

This is it. The day has come. 2.0.0.17 was released today with new options and heavily redesigned core. This will most likely bring bugs not seen before and so i advice you to test this program heavily on test envirovment before running on production. I didn't had much chance to test it so it may not even work *SIGH* so i advice you to keep backup of old version and configs. Reread the first page for changes in .XML. You won't be able to use old one as the changes are preety significant. Please ask if something is unclear or needs additional description. When reporting bugs try to make screenshot, send a log and describe what happens.

To do list:

- Fix _UpdateStatusBar icons (wth is going on)

- Fix any bugs that come in a way

- Add window managing for Ignore Unsigned drivers

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

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

Link to comment
Share on other sites

nice! thanks..

quick question about networking, does it have to map the drive to use it over the network, or can i select NO to mapping, and simply enter paths where needed?

e.g

<share_configuration>

<use_mapping>No</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>\\Servername\drivers\hardware_database.db</drivers_database_path>

<drivers_directory_path>RELATIVE:\unpacked</drivers_directory_path>

<drivers_packed>No</drivers_packed>

would that work?

the drivers would actually be on

\\Servername\drivers\unpacked

and the .exe would be ran from

\\Servername\Drivers

so the path is "relative"

thanks

Link to comment
Share on other sites

No. You have to map drive to be able to use shares of any kind. Otherwise it would be too dificult to 'verify'.

EDIT: this is because most likely some kind of connection (with credentials) would have to be made first. I am curious where you would prefer to use the share path instead of mapping the drive (which will unmap itself on reboot). I could probably add unmap option to program when quiting program but that will follow up in next version.

Edited by MadBoy
Link to comment
Share on other sites

ok thanks for the explanation..

the server is already logged into from the machines for running of other batch files (program instals/customizations etc)

basically i would prefer to be able to have the .exe and the .db and the unpacked drivers all on the server.

with the mapping option the .exe needs to be ran locally or from a cd/pendrive

Link to comment
Share on other sites

ok thanks for the explanation..

the server is already logged into from the machines for running of other batch files (program instals/customizations etc)

basically i would prefer to be able to have the .exe and the .db and the unpacked drivers all on the server.

with the mapping option the .exe needs to be ran locally or from a cd/pendrive

Well unfortunetly what you have to do is to write .bat file that will be starting the .exe and first mapping the drive etc then with mapping drives turned of in my proggy do the rest. Or just put everything on server. Start it from \\share\sharedir\pro_s-hardware.exe and just make it map the drive (again just this time it will have letter) as you require. Can't seem to find a problem with that?

Link to comment
Share on other sites

tried just setting up a standard "new"config for flashpen, but came up with -

AutoIT error

-line 1

error: array variable has incorrect number of subscripts or subscript dimension range has exceeded

Link to comment
Share on other sites

tried just setting up a standard "new"config for flashpen, but came up with -
AutoIT error

-line 1

error: array variable has incorrect number of subscripts or subscript dimension range has exceeded

Send me your config file please ;) and log..

Edited by MadBoy
Link to comment
Share on other sites

tried just setting up a standard "new"config for flashpen, but came up with -
AutoIT error

-line 1

error: array variable has incorrect number of subscripts or subscript dimension range has exceeded

Send me your config file please ;) and log..

<?xml version="1.0" encoding="utf-8"?>
<settings>
<basic_configuration>
<choice>Automatic</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>No</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>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:\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>5</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>Yes</force_run>
<device_manager>Yes</device_manager>
</options>
</drivers>
<log>
<log_overwrite>No</log_overwrite>
<log_to_file>No</log_to_file>
<log_filename_path>$ProgramDir\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>

Link to comment
Share on other sites

All is fine i just need the log file now and possibly a screenshot of application showing that error (whole application with gui). This way i can see at which point of program it crashes and fix it asap).

Link to comment
Share on other sites

All is fine i just need the log file now and possibly a screenshot of application showing that error (whole application with gui). This way i can see at which point of program it crashes and fix it asap).

I have just found out that some chars can't be properly used in .xml file. For example i tried to use some french apostrophes in window name and it wouldn't let me. So i have to find another way to store the information that is required for Window managing. Unless noone is using other language then English ...

Link to comment
Share on other sites

I have just found out that some chars can't be properly used in .xml file. For example i tried to use some french apostrophes in window name and it wouldn't let me. So i have to find another way to store the information that is required for Window managing. Unless noone is using other language then English ...

I'm using the Dutch version, and we don't use apostrophes in our language. But unfortunately the latest version of the tool generates the following error: Method must be set: SetupCopyOemInf or RegistryDevicePath. Terminating! In the logwindow I see the following line: [16:37:48] - [CONFIGURATION] Wrong settings for Plug And Play Option. Setting method to INTERNAL.

I used the new default configuration supplied in the zip, and altering the requested values did not help :( Is this a bug?

Edited by pSycho-Y2K
Link to comment
Share on other sites

I have just found out that some chars can't be properly used in .xml file. For example i tried to use some french apostrophes in window name and it wouldn't let me. So i have to find another way to store the information that is required for Window managing. Unless noone is using other language then English ...

I'm using the Dutch version, and we don't use apostrophes in our language. But unfortunately the latest version of the tool generates the following error: Method must be set: SetupCopyOemInf or RegistryDevicePath. Terminating! In the logwindow I see the following line: [16:37:48] - [CONFIGURATION] Wrong settings for Plug And Play Option. Setting method to INTERNAL.

I used the new default configuration supplied in the zip, and altering the requested values did not help :( Is this a bug?

Press ENTER on .xml. It should open up in Internet Explorer. If it opens up without problems then send me .xml file + eventually log. If it doesn't open up you should be notified with errors that are in .xml. If there is any inconsistency with XML format my program won't have ability to read it and therefore the function that checks .xml doesn't work.

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