Jump to content

Having Windows Keep The Drivers


X-Savior

Recommended Posts

@Beagz

BINGO! that did the trick.

Thank you so much :thumbup:thumbup

Edit:

Just tested yours as well Nazgul and it worked like a charm. Thanks :thumbup

It's even smart enough to filter duplicate entries.

I like this ALOT!!

Edited by erik_demon
Link to comment
Share on other sites


Small bugfix to my own code:

  findstr /L /I /B "%%I" "%output%" > NUL

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

Link to comment
Share on other sites

.inf files just went out the window. :)

@ECHO OFF
set output=result.txt
set tempfile=tempfile.txt

if 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"
)
popd
goto EOF
:EOF

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

Link to comment
Share on other sites

@Bashrat

Yeah 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 :thumbup

Edited by erik_demon
Link to comment
Share on other sites

@ Nazgul

I 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 off
dir /s /a:d /b >dirs.txt

set files=%cd%\files.txt
set infs=%cd%\inffiles.txt
set stage2=%cd%\driverlist.txt
set final=%cd%\drivers.txt

if 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!

@erik

so is this useful or is the other method working now?

Link to comment
Share on other sites

Well, I'm not erik, but... :P

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.

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.

:)

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

@ X-Savior

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

Link to comment
Share on other sites

@Beagz

so 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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...