MadBoy Posted May 18, 2007 Author Posted May 18, 2007 oldo: gimme some time and it will be implemented hopefully i won't have destroy half of code to implement this. I'm planning some more things in future just it takes time as i am busy coding MultiCopier to be able to copy directory with files to multiple servers into same place (on those servers) for easy spreading of packages in Altiris Also i have lost some work that i did on addon for Hardware Installer that would create db of .inf files with corresponding HW_ID's so my program would read this and use only inf's that are nessecary to system and not all of them. This should speed up instalation process a lot. Anyway i'll start working on it again if i get some time.
MadBoy Posted May 19, 2007 Author Posted May 19, 2007 (edited) Here you go @oldo, that will be 200Euro's please. Hehe just kidding (/me dreams). I tried to make it as error proof as possible but i might have broken something. Added around 100 lines of code so excuse me As always report errors and I should fix them asap.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 iconThis is example how it loooks. For more information how to use more of additional options check 1st post.[LOG]Logging_to_file=YesLogging_option=AdvancedLog_file_name=hardware.logLog_path=&ProgramDirDOWNLOAD REMOVED DUE TO BUG - Come check later. Edited June 20, 2007 by MadBoy
oldo Posted May 20, 2007 Posted May 20, 2007 Great stuff, thankyou! Just for completeness, how much trouble is it to do add a &Systemdrive option for Log_path?
MadBoy Posted May 20, 2007 Author Posted May 20, 2007 Great stuff, thankyou! Just for completeness, how much trouble is it to do add a &Systemdrive option for Log_path?I will hopefully add it in next version with maybe few additional variables and checks for stability.
kickarse Posted May 21, 2007 Posted May 21, 2007 (edited) For use with the Devcon switch, do I need to have Devcon in the folder with hardware.exe?I keep having problems with Hardware 0.7.1 not finding the wireless drivers. Weird... Hopefully 0.7.2 fixes it. Edited May 21, 2007 by kickarse
MadBoy Posted May 21, 2007 Author Posted May 21, 2007 For use with the Devcon switch, do I need to have Devcon in the folder with hardware.exe?I keep having problems with Hardware 0.7.1 not finding the wireless drivers. Weird... Hopefully 0.7.2 fixes it.Which devcon switch ? as in plug & play rescan ? There's no need for devcon to be included in the dir, it is attached with my program.
kickarse Posted May 21, 2007 Posted May 21, 2007 (edited) Under [ADVANCED]Plug_and_Play=Internal or DevconI'll check it out and report...In my log it says that "Reboot setting set incorrectly. Only mode 2,6 and 9 are possible!"But my ini file says Reboot=6Also, in version 0.7.2 should we get rid of under [iNFO] Logging_to_file and Logging_Option and put those under [LOG] ?I also get"No active plug & play process has been found after 15 seconds. Terminating." Even though it shows that it found a device and imports the registry devices inf folders.--------------Other thoughts.. what does work.Using a batch script with in conjunction with Devcon (http://support.microsoft.com/kb/311272) and Vernalex's Sysprep Driver Scanner (http://www.vernalex.com/tools/spdrvscn/index.shtml)Script adds drivers to registry, removes bad devices, rescans for new devices, restarts (30 seconds). On restart all devices are installed.Script code:ECHO Importing Drivers into Registryspdrvscn /p c:\D /e inf /d %windir%\inf /a /s /qECHO Installing DevicesDEVCON REMOVEDEVCON RESCANECHO Restarting Computer to Complete Installshutdown -r -c "Rebooting for Driver Installation"Below also works too... without restart...ECHO Importing Drivers into Registryspdrvscn /p c:\D /e inf /d %windir%\inf /a /s /qECHO Installing DevicesRunDll32.exe Syssetup.dll,UpdatePnpDevicedriversECHO This process can take up to 10 minutes depending on devices that need installation Edited May 21, 2007 by kickarse
MadBoy Posted May 22, 2007 Author Posted May 22, 2007 @kickarse:you're right about the reboot i missused OR and should be AND in one place, i'll fix it. As for the plug_and_play i'll check it out. As for [LOG] you should remove those 2 fields from [iNFO].the only way i see the message"No active plug & play process has been found after 15 seconds. Terminating." Even though it shows that it found a device and imports the registry devices inf folders.to be there when 'devcon rescan' or the process of finding new devices isn't running correctly or when there were no devices removed at all (this can happen as the tool might show you that the device has a problem of lets say 24) and it doesn't remove that (unless you specifically tell it to under the [ADVANCED] section). Maybe that was the problem here? If you are sure that the device was removed you could try going to device manager and pressing "rescan & redetect) and see if the device pops up there? If it does means my tool sucks Lemme know and i'll try to fix some nasty bugs i surely have included
kickarse Posted May 22, 2007 Posted May 22, 2007 (edited) Do you mean go into device manager and right click on the computer icon and click "Scan for Hardware Changes"?What I do know on the problem laptop (model is dissimilar but the brand is the same as the others I have) is that it sees that there is a device that has a problem.But, alas, I don't have that laptop to play with. I'll see about getting the same model from someone else today. What I do know is that once I import the INF locations into the registry and runRunDll32.exe Syssetup.dll,UpdatePnpDevicedriversAfter a couple minutes the devices that weren't installed are now.And thanks again! Edited May 22, 2007 by kickarse
MadBoy Posted May 22, 2007 Author Posted May 22, 2007 Do you mean go into device manager and right click on the computer icon and click "Scan for Hardware Changes"?Yes that's what i meant. If after you press that and windows will find new devices then it means my program didn't worked as it should (and then i can investigate why with additional information from you). If it doesn't find any devices then that means there were no devices removed by my program or the device is no longer available for the system (even thou it was removed, that can happen to USB or other devices that once were in the system and are no longer there so the system actually can't find them). What I do know on the problem laptop (model is dissimilar but the brand is the same as the others I have) is that it sees that there is a device that has a problem.What i need from you is to know the code of the problem, device that has that problem and your settngs in [ADVANCED] then i will be able to tell if it's my programs fault or it's wrong settings of program or the device is no longer in system (as in devices that start with ACPI and couple of others might be gone from system). RunDll32.exe Syssetup.dll,UpdatePnpDevicedriversI am unaware of that. What does that line do? Same thing like Devcon Rescan? Does it only re runs Plug & Play Rescan or does it do something more like finding the newest driver it can find in given path's and update all system drivers (even those that are already installed in system) to newest version? That would be preety nice and i could implement this in my app. Lemm know
MadBoy Posted May 22, 2007 Author Posted May 22, 2007 command1CODERunDll32.exe Syssetup.dll,UpdatePnpDeviceDriversis same ascommand2CODEDEVCON updateni <inf> <hwid>This command is equivalent to devmgmt.msc (Device Manager), click on the device, right click, Update Drivers...command1 updates all devices instead of only the one specified with hwidinfs files have to be integrated first with Pyron's SetupCopyOEMInf.execommand2 uses specified inf file and update only specified hwidWow, this seems to be nice command and actually i need to investigate this even more as this can add a lot functionality to my proggy if it realy does what this guys says.
kickarse Posted May 22, 2007 Posted May 22, 2007 I see you answered your own question Yeah it should be the same as DEVCON RESCAN
MadBoy Posted May 22, 2007 Author Posted May 22, 2007 (edited) @kickarse: i see you haven't read correctly Devcon rescan only does Rescan of P&P and that basically means pressing the button in device manager and that's it. While the command you pasted and i checked it goes thru all devices in system and checks their INF's version and then compares to INF's that it has in DevicePath in Registry if it finds newever version of drivers it will update the system driver to new one!!!!!! This is very good news because some ppl wanted this!! and this might save me a lot of time at least for this feature. Just compare times of rundll32.exe (in TaskMgr). When you run devcon rescan it's just couple of seconds (if you don't have any devices that are unknown to system). With the code you posted (there's small typo thou in it, small letter D) it runs looong time and that's why i am preety sure it does what it does Edit: so either you misunderstood what command Devcon Rescan does (very simle task) and wanted it to do a lot more then it could or you haven't read correctly info i pasted Edited May 22, 2007 by MadBoy
kickarse Posted May 22, 2007 Posted May 22, 2007 (edited) Heh, I'm surprised you're awake since you're in Poland. Isn't it like 1am?Okay here's the dealMy hardware.ini file is:[ADVANCED]Registry_path=BeginThe error is on the device:PCI\VEN_8086&DEV_4223&Subsys_10008086&REV_05Problem ID 01 (I thought this is just enumerating how many devices were in the system that weren't installed yet)-------------------Now, I just redid the same exact machine, but logged in as local admin instead of the domain admin (as I usually do) and it detected the drivers and installed them properly.-------------------It's good that code adds that extra step for getting the latest drivers.Also, how do you get a pc/laptop ready for testing your builds? I keep having to reimage or reinstall... Edited May 22, 2007 by kickarse
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now