MSFN Forum: Drivers Instalation in Post-Install stage (New Method) - MSFN Forum

Jump to content



  • 31 Pages +
  • « First
  • 7
  • 8
  • 9
  • 10
  • 11
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Drivers Instalation in Post-Install stage (New Method) Updated: 1.XII.2009 version 2.0.0.28 Rate Topic: -----

#151 User is offline   kickarse 

  • the free techie
  • PipPip
  • Group: Members
  • Posts: 227
  • Joined: 26-April 05
  • OS:XP Pro x86
  • Country: Country Flag

Posted 11 October 2006 - 06:28 AM

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?


#152 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 464
  • Joined: 21-February 05

Posted 11 October 2006 - 06:41 AM

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

#153 User is offline   kickarse 

  • the free techie
  • PipPip
  • Group: Members
  • Posts: 227
  • Joined: 26-April 05
  • OS:XP Pro x86
  • Country: Country Flag

Posted 11 October 2006 - 07:08 AM

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?

This post has been edited by kickarse: 11 October 2006 - 07:14 AM


#154 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 464
  • Joined: 21-February 05

Posted 11 October 2006 - 07:14 AM

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

This post has been edited by MadBoy: 11 October 2006 - 07:16 AM


#155 User is offline   kickarse 

  • the free techie
  • PipPip
  • Group: Members
  • Posts: 227
  • Joined: 26-April 05
  • OS:XP Pro x86
  • Country: Country Flag

Posted 11 October 2006 - 07:29 AM

Good idea's and I'll work on that asap!

It's all in there properly... It's not a huge deal I suppose. But I cant wait till the next version :)

This post has been edited by kickarse: 12 October 2006 - 08:22 AM


#156 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 464
  • Joined: 21-February 05

Posted 12 October 2006 - 08:56 AM

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?

#157 User is offline   kickarse 

  • the free techie
  • PipPip
  • Group: Members
  • Posts: 227
  • Joined: 26-April 05
  • OS:XP Pro x86
  • Country: Country Flag

Posted 12 October 2006 - 09:05 PM

Will do and thanks!!! :D

I'll check it out tomorrow... :thumbup

Is Time_to_start in milliseconds?

This post has been edited by kickarse: 13 October 2006 - 06:28 AM


#158 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 464
  • Joined: 21-February 05

Posted 13 October 2006 - 11:36 AM

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

#159 User is offline   kickarse 

  • the free techie
  • PipPip
  • Group: Members
  • Posts: 227
  • Joined: 26-April 05
  • OS:XP Pro x86
  • Country: Country Flag

Posted 16 October 2006 - 07:16 AM

I still get the problem but only with one of the drivers now... BUT that's okay. It's working well now :)

#160 User is offline   kickarse 

  • the free techie
  • PipPip
  • Group: Members
  • Posts: 227
  • Joined: 26-April 05
  • OS:XP Pro x86
  • Country: Country Flag

Posted 17 October 2006 - 10:55 AM

I thought you might be interested in this here...

http://www.microsoft...ll/DIFxtls.mspx

:sneaky:

#161 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 464
  • Joined: 21-February 05

Posted 18 October 2006 - 05:46 AM

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.

#162 User is offline   Lost Soul 

  • Snap ... Crackle ... Pop
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,746
  • Joined: 12-December 03

Posted 18 October 2006 - 09:16 PM

@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,,

#163 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 464
  • Joined: 21-February 05

Posted 19 October 2006 - 03:21 AM

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

#164 User is offline   Lost Soul 

  • Snap ... Crackle ... Pop
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,746
  • Joined: 12-December 03

Posted 19 October 2006 - 10:55 AM

sounds nice ,, ill definatly keep an eye out on your works, they sound very promising,,,, so patience is always a virtue

#165 User is offline   The Glimmerman 

  • Member
  • PipPip
  • Group: Members
  • Posts: 132
  • Joined: 03-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 28 October 2006 - 08:56 AM

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


#166 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 464
  • Joined: 21-February 05

Posted 28 October 2006 - 01:50 PM

Yes well that code is from older version which had bugs :| It was changed couple of times ;p

Anyways when you remove "&" from $DirOutputOnce &= $DirData you break it for sure :)

&= --> Concatenation assignment. e.g. $var = "one", and then $var &= 10 ($var now equals "one10")
In other words. New variable is being added to end of the current value. So it's nessecary.

Btw. have you tested new version of my program (0.6.7) in registrydevicepath method? I believe the limitation of 4096 chars isn't realy in place on WindowsXP and Windows 2003. As you can notice in log after all drivers get added i measure the line in registry and it says 12000 chars here! So check it out. Maybe it will work.


And how your code would be any diffrent then mine? If my code in Pro-S Hardware Standard hangs for you why my code in your use would be any diffrent? Or maybe you use SetupCopyOEMInf.exe from pyron and not my program (as you should know it has that function builtin in it? maybe it won't hang your system).

Edit:

I thought about it and it seems you clearly didn't tried to use my program :P Try it first in both modes and check if it works :)

This post has been edited by MadBoy: 28 October 2006 - 01:52 PM


#167 User is offline   MadBoy 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 464
  • Joined: 21-February 05

Posted 28 October 2006 - 02:09 PM

You're main mistake was here. $path_to_drivers is used inside the loops and you had it diffrent then the value u used in Run Command. It seems to work. I also commented out DllCall as i don't like integrating drivers when i test. However make sure to test out my program :P It's realy good

$path_to_drivers = "C:\Windows"
$DirOutput = Run(@ComSpec & " /c DIR /A:D /S " & $path_to_drivers, '', @SW_HIDE, 2)

#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 = "C:\Windows"
$DirOutputOnce = 0

		$DirOutput = Run(@ComSpec & " /c DIR /A:D /S " & $path_to_drivers, '', @SW_HIDE, 2)
		While 1
			$DirData = StdoutRead($DirOutput)
			If @error Then ExitLoop
			If $DirData Then
				$DirOutputOnce &= $DirData
			Else
				Sleep(10)
			EndIf
		WEnd
		$DirOutputOnce = StringStripWS($DirOutputOnce, 3)
; 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]
						$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)


#168 User is offline   The Glimmerman 

  • Member
  • PipPip
  • Group: Members
  • Posts: 132
  • Joined: 03-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 28 October 2006 - 06:44 PM

Thx MadBoy

I will try your program and the code.
But I use the oemcopy thing before driver detection in the setup In winnt.sif as "DetachedProgram" I thought your programm doesn't work unattendedly?

#169 User is offline   The Glimmerman 

  • Member
  • PipPip
  • Group: Members
  • Posts: 132
  • Joined: 03-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 28 October 2006 - 08:13 PM

The code doesn't work.
$DirSplit is empty. And the path has directories with inf files.
It goes directly to the message "No drivers were integrated"

I will check your app tommorow It's late here in amsterdam. :)

#170 User is offline   romsempire 

  • Newbie
  • Group: Members
  • Posts: 47
  • Joined: 08-November 05

Posted 29 October 2006 - 01:01 AM

Hi Madboy,
in these days I have tested lastest version of your application.
I have tested about 10 PCs with windows XP Pro, it works great.
I have put it with BTS Driverpack on my portable USB hard drive.
If necessary I modify ini file for path and it can recognize almost every hardware.

I have only find a little problem with a RAID controller.
It seems very difficult to recognize.

I have read you want create a client server version of your application, is it right?

I wait your answer

THX for your marvellous work

Share this topic:


  • 31 Pages +
  • « First
  • 7
  • 8
  • 9
  • 10
  • 11
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy