Jump to content

Drivers Instalation in Post-Install stage (New Method)


MadBoy

Recommended Posts

It's possible that the it's not completely unpacked for the Touchscreen or the Synaptics but as for the Intel drivers I definitely made sure that they were.

So should I have it start first? Before anything? or wait till windows completely loads then run it?

Link to comment
Share on other sites


Well it's up to you to play with it. So far my procedure was like:

1. Install automaticly windows

2. Login

3. Put CD in drive and start the program

4. Wait for it to do it's job

5. Reboot

6. Do other things.

To make sure program will automagically close when done you can check for process in taskmanager "rundll32.exe". If it exists before program starts then it means program will hang on that and won't close. If it doesn't exist and program still doesn't close check for process rundll32.exe and eventually kill it and see what happens.

Does this intel driver comes with BTS Driver Packs? I never had any problem with using those except on Windows 2000 (well my program on WIN2k was acting strange, not the driver packs itself). On Windows XP or Windows 2003 i didn't had much problems. You can always send me log if you want to.

And have you checked Driver's Path in registry? If it's correctly added there? I don't know how it's possible but my program was reporting 7000 or 12000+ lenght of key registry while everyone is saying 4096 is the limit :P

So i wonder if it's allright ":)

Link to comment
Share on other sites

I appreciate your help. I'll send you a log file of it...

Where should I look for the string?

Could I do a batch to end process rundll32 before it starts?

I'm not using the driverpacks only because I want to keep the image slim, should I? Or test with the driver packs instead?

Edited by kickarse
Link to comment
Share on other sites

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

Check here if the path to driver is correct.

And yes you can use batch file to kill process rundll32.exe before my program starts but i think you shouldn't waste your energy on that as my program in next rls should have the ability i wrote in my last posts so it should just skip that .dll. Try doing a test with driver packs (GRAPHICS) and report if it works or behaves the same. If it works maybe it means your "unpacked intel drivers are corrupted or so?".

Edited by MadBoy
Link to comment
Share on other sites

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)

Mmm kickarse.. here you go :P Report problems if you have any, and tell me if issues with your hw are gone now? or still there?

Link to comment
Share on other sites

It's in seconds... (says that on first page ;p). And btw if you want instant answers (or well ASAP answers) don't put new stuff into old post. By doing that i don't get email that new msg is posted on forum :)

Link to comment
Share on other sites

I'll take a look at it. It seems kinda large thou. Anyway.. i would like to have new version tottally built on my code (as in no devcon or that program). Some of functionalities are doable thru DLLCALL's and i found some stuff on MSDN but my experience with AutoIt and MSDN api's is kinda non-existant so it's rather hard to achieve.

Link to comment
Share on other sites

@MadBoy

i think ive finally found a problem with this method,, today i was working on doing a fresh install on a pc thats almost 10 years old,, its sad its a 500 mhz pc with a 10 g hd,, well any ways ,, after i did a fresh install, i tested your latest 6.7 app with bashrats latest driver packs, and the program ran fine, but it says all drivers were there and no need to run program,,

well this is true and not true,, mainly because yes they pc and its perhpriels had its drivers, its deefault drivers on/ from the windows install, but i know for a fact that , that pc has updated drivers that it can have because ive got them all on a disk, i just wanted to test your installer again..

well any ways thats my latest news flash,,, is there any way you can possible set the program to scan for the need on updated drivers and if one is there, the program updates that driver ?

just a thought,,

Link to comment
Share on other sites

I don't think it's a problem to not install NEWEST drivers when one is already installed. Anyway.

It's a bit problematic to add this without a lot of code. First of all program needs to have some kinda database for it to work. Then it gotta compare driver version and do a lot of comparision to not return false-positive.

I must say the program i am slowly working on might have all this new features but it's gonna be a pain to write it, to test it and to realy make it work ;) It's kinda a big project and i have few smaller ones in mind aswell.

So you gotta be very patient ;)

One of the projects i have in my mind is to totally automate Windows configuration. For example:

1. You install Windows from unattended CD where on the end RunOnceExec starts my little program.

2. In that program you type in new computer name, new domain name, users that are supposed to be added to Administrators Group, your login/pass to domain (for domain connection and for security check). You also choose if missing drivers are supposed to be installed (will use my Pro-S Hardware Standard program) and eventually what Applications from profile of your choice should be installed (i haven't yet rlsed that to public but it works nicely in my ex-company, only problem is this program has everything hardcoded so i will have to rewrite it).

3. Hit START and computer from whatever you choose should do all you wanted.. it will restart automagically everytime it's needed and at the end it will send you email and remove itself ;)

Well that's the plan but who knows how much time i need to do it ;)

Link to comment
Share on other sites

  • 2 weeks later...

@ MadBoy

I need your expertise. The script you provided is the script I was looking for.

But I cannot get it to work.

It doesn't do anything. The script you posted hangs on this line:

$DirOutputOnce &= $DirData

I removed the & and script works but doesn't do anything.

I think I know where it hangs. Dirdata and or DirOutputOnce

I hope you can help me.

I need to use this method cause I have 2gb in drivers on my hdd

and the SetupCopyOEMInf.exe method is hanging my system.

Thx

#NoTrayIcon
#include <Constants.au3>
Opt("ExpandEnvStrings", 1)
Opt("WinWaitDelay", 0)
Opt("WinTitleMatchMode",2)

;http://www.msfn.org/board/index.php?showtopic=70209&st=60
$path_to_drivers = "%SYSTEMDRIVE%\WINNT\Drvs\C"
$DirOutputOnce = 0

$DirOutput = Run(@ComSpec & " /c DIR /A:D /S C:\WINNT\Drvs\C", '', @SW_HIDE, 2)
While 1
$DirData = StdoutRead($DirOutput)
If @error Then ExitLoop
If $DirData Then
$DirOutputOnce &= $DirData
Else
Sleep(10)
EndIf
WEnd
MsgBox(0, "DirData", "" & $DirData)
; Remove spaces from output
MsgBox(0, "DirOutputOnce", "" & $DirOutputOnce)
$DirOutputOnce = StringStripWS($DirOutputOnce, 3)
MsgBox(0, "DirOutputOnce Striped", "" & $DirOutputOnce)
; Split output into array
$DirSplit = StringSplit($DirOutputOnce, @CRLF, 1)

$NrCopiedInfs = 0
For $i = 1 To $DirSplit[0]
If StringInStr($DirSplit[$i], $path_to_drivers) Then
$registrystring = StringSplit($DirSplit[$i], ": ", 1)
If $registrystring[0] = 2 Then; Testing amount of elements in array, if more then 2 Exits
If StringInStr($registrystring[2], $path_to_drivers) Then; Making sure that Drivers path exists in string
$drivers_directory = $registrystring[2]
MsgBox(4096, "", "" & $drivers_directory)

$search_ini = FileFindFirstFile($drivers_directory & "\*.inf")
If $search_ini = -1 Then
Else
$dll_exe = DllOpen("setupapi.dll")
While 1
$search_file = FileFindNextFile($search_ini)
$full_path_to_inf = $drivers_directory & "\" & $search_file
If @error Then ExitLoop
$dll_result = DllCall($dll_exe, "int", "SetupCopyOEMInf", "str", $full_path_to_inf, "str", "", "int", 1, "int", 8, "str", "", "int", 0, "int", 0, "str", "")
$NrCopiedInfs = $NrCopiedInfs + 1
; If $logging_option = "Advanced" Then
; If @error = 0 Then
; _AddLineBox("Inf integration passed: " & $drivers_directory & "\" & $search_file)
; $NrCopiedInfs = $NrCopiedInfs + 1
; ElseIf @error = 1 Then
; _AddLineBox("Inf integration failed: " & $drivers_directory & "\" & $search_file)
; ElseIf @error = 2 Or @error = 3 Then
; _AddLineBox("Unknown return type or Function not found in DLL. Tell author about it!")
; EndIf
; EndIf
WEnd
DllClose($dll_exe)
EndIf
FileClose($search_ini)
EndIf
EndIf
EndIf
Next
If $NrCopiedInfs = 1 Then MsgBox(4096, "", "SetupCopyOemInf method completed. " & $NrCopiedInfs & " driver was integrated.",5)
If $NrCopiedInfs = 0 Then MsgBox(4096, "", "SetupCopyOemInf method completed. No drivers were integrated.",5)
If $NrCopiedInfs <> 0 And $NrCopiedInfs <> 1 Then MsgBox(4096, "", "SetupCopyOemInf method completed. " & $NrCopiedInfs & " drivers were integrated.",5)

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