erik_demon Posted April 17, 2005 Posted April 17, 2005 (edited) @BeagzBINGO! that did the trick.Thank you so much Edit:Just tested yours as well Nazgul and it worked like a charm. Thanks It's even smart enough to filter duplicate entries.I like this ALOT!! Edited April 17, 2005 by erik_demon
Nazgul Posted April 17, 2005 Posted April 17, 2005 Small bugfix to my own code: findstr /L /I /B "%%I" "%output%" > NULWithout the /B files like text.txt were said to be duplicates if result.txt already contained something like atext.txt. Now they must match from the beginning of the line.
Beagz Posted April 17, 2005 Posted April 17, 2005 hey nazgul,can you add a filter to leave out all the .inf files? since these don't need to be listed in the driver.inf.
Bâshrat the Sneaky Posted April 17, 2005 Posted April 17, 2005 OK, I don't know if you guys noticed, I think not, but please check this newly stickied topic: http://www.msfn.org/board/index.php?showtopic=43795I think it's better, because it's already fully operational, plus it's very easy in use.What do you guys think?
Nazgul Posted April 17, 2005 Posted April 17, 2005 .inf files just went out the window. @ECHO OFFset output=result.txtset tempfile=tempfile.txtif exist "%output%" del /q "%output%"call :traverse "%cd%"goto EOF:traverse pushd %~f1 for %%I in (*) do ( if not exist "%output%" echo %%I>"%output%" findstr /L /I /B "%%I" "%output%" > NUL if errorlevel 1 echo %%I>>"%output%" ) for /d %%I in (*) do ( call :traverse "%%I" ) popdgoto EOF:EOFif exist %output% ( findstr /L /I /E /V .inf "%output%">"%tempfile%" del /Q "%output%" ren "%tempfile%" "%output%")I also slightly modified the previous code, because I was getting a blank space at the end of each line in result.txt. Removing those spaces from my code solved that.
erik_demon Posted April 17, 2005 Posted April 17, 2005 (edited) @BashratYeah I have been watching that topic two. And I must say that it looks very promising!!EDIT:After reading it some more I have to say that this is not only promising, it is GREAT Edited April 17, 2005 by erik_demon
Beagz Posted April 18, 2005 Posted April 18, 2005 @ NazgulI don't know why but when I run your script I get result.txt files in nearly every directory. also I believe line 12 which is if not exist "%output%" echo %%I>"%output%"should be if not exist "%output%" echo>"%output%"meanwhile I did get this to work. and it also gives me a list of .inf files so that it can be used.@echo offdir /s /a:d /b >dirs.txtset files=%cd%\files.txtset infs=%cd%\inffiles.txtset stage2=%cd%\driverlist.txtset final=%cd%\drivers.txtif exist "%infs%" del /q "%infs%"if exist "%files%" del /q "%files%"if exist "%final%" del /q "%final%"for /f %%a in (dirs.txt) do ( dir %%a\*.inf /b >>"%infs%")for /f %%b in (dirs.txt) do ( dir /a:-d /b >> "%files%" %%b findstr /L /I /E /V .inf "%files%">"%stage2%")for /f %%c in (%stage2%) do ( if not exist "%final%" echo >"%final%" findstr /L /I /B "%%c" "%final%" > NUL if errorlevel 1 echo %%c>>"%final%")I borrowed a lot from you so I do not take much credit for this. thanks!@erikso is this useful or is the other method working now?
Bâshrat the Sneaky Posted April 18, 2005 Posted April 18, 2005 Well, I'm not erik, but... Already 1 positive report... another advantage is that also monitor and printer drivers are installed!!! That's something we haven't been able to achieve with the OemPnPDriversMethod in a correct way.
erik_demon Posted April 18, 2005 Posted April 18, 2005 If schalti's method works like I thing it will, than his method is far more superior than mine. I haven't tested it yet but I most definitly will give it a try
schalti Posted April 19, 2005 Posted April 19, 2005 Well, I'm not erik, but... Already 1 positive report... another advantage is that also monitor and printer drivers are installed!!! That's something we haven't been able to achieve with the OemPnPDriversMethod in a correct way.<{POST_SNAPBACK}>Actually ANY driver that has an INF file can be integrated this way. I just checked a few ZYXEL Modems, a TV card from Hauppauge, a special interface card from Siemens for their HICOM telephony solution, a few video, LAN and sound drivers, every driver integration seems to work.
Bâshrat the Sneaky Posted April 20, 2005 Posted April 20, 2005 I know. But ONLY THESE TWO types of devices didn't get installed properly. That's why I mentioned them All others install without any problem...N.B.: in fact I even forgot two: sometimes USB devices didn't install properly either!
X-Savior Posted April 22, 2005 Author Posted April 22, 2005 Hey Guys,Been Really buys lately. Just catching up. Good work everyone. The one like command has really tuned into something else.Now as far as Schalti, I will look into this shortly.Currently I am a little confused though. Our Method works with ANY drivers including monitors and Printers. At least the way I have been doing it, a little easier than Erik's. I don't create the CAB after. I use Bashrat's for Mass Storage only and then use my CAB for everything else. Works Perfect. But, I will read soon about this new method.Well, I read it and I am still not convinced it is any better. Just more complicated.
Beagz Posted April 23, 2005 Posted April 23, 2005 @ X-Saviorso if I were to take the driver pack files and expand them, then compress them all into a .cab file then integrate that into the windows CD it would work fine?sorry I am sure I need to reread through all of this.
erik_demon Posted April 23, 2005 Posted April 23, 2005 @Beagzso if I were to take the driver pack files and expand them, then compress them all into a .cab file then integrate that into the windows CD it would work fine?you also have to edit Drvindex.inf, add all the .INF files to the %systemroot%\inf folder and add the necessary lines to txtsetup.sif and dosnet.inf
Recommended Posts