Re: Sysprep mass storage section with DriverPacks Mass Storage

this is an updated TEST version

http://dev.driverpacks.thesneaky.com/dr … 73test1.7z

an even bigger cartload of new drivers now have INI, the three iastor sys files renamed/and INF with internal references done for the change/and no OVERLAP in iastorxx, and some more fixes.

we have a working system for overlap in excell, but it will still require manual work because the drivers we download decide what we have in INI anyway.

The answer was 42?
Kind regards, Jaak.

Re: Sysprep mass storage section with DriverPacks Mass Storage

sad
I am similar inexact have explained what to rename in iastor??.inf

this line from [Strings] section
*PNP0600.DeviceDesc = "Intel AHCI Controller"
must be
*PNP0600.DeviceDesc = "Intel AHCI Controller ??"
because it used in service's Display name.


lines look kind of this
AddService = iaStor, %SPSVCINST_ASSOCSERVICE%, iaStor_Service_Inst, iaStor_EventLog_Inst
from section [*.Services]
must be
AddService = iaStor??, %SPSVCINST_ASSOCSERVICE%, iaStor_Service_Inst, iaStor_EventLog_Inst


IMHO, sysprep needs some kind of tricky mass storage drivers set, with non-overlapped drivers' and services' names.
Sysprep 'installs' these drives, so at boot, all they are loaded. But, pnp-setup will search drivers at all. And, searched drivers haven't to be same, what used in sysprep....

May we have driverpack with three parts inside?
1. drivers, not overlapped with other,
2.drivers, overlapped with other, in original form,
and 3. drivers, overlapped with other, modified to be non-overlapped.

Sysprep needs parts 1 and 3, pnp - parts 1 and 2.

Er?

Last edited by torrero (2007-07-14 05:08:31)

Re: Sysprep mass storage section with DriverPacks Mass Storage

I am tempted to ask "you wanna make them?"

one thing is clear, there WILL ALWAYS be overlap in the Packs, because there are drivers for 2003 / 2000 / XP which have THREE drivers for same hardware, and one can easily see they will have same HWIDs in them.

I mentioned we currently have an Excell file what we started to use to see the duplicates in the INI in.
With proper annotations in it, this is a good worksheet to see what is used for what.
You can thank Mr EchoPlatoon for the work done on that.
The Excell file may even be made accessible to the users of DriverPacks.
--------------

I think I see what you mean by the service display name
("friendly-name")
I had no idea that this could be a problem in sysprep.
One learns something new every day.

I'll look, and may upload an updated testversion soon.

The answer was 42?
Kind regards, Jaak.

Re: Sysprep mass storage section with DriverPacks Mass Storage

thanks for the edit.. the example was what I thought you meant.

The answer was 42?
Kind regards, Jaak.

Re: Sysprep mass storage section with DriverPacks Mass Storage

torerro?

it is your lucky day.
sorry, bad link.

Last edited by jtdoom (2007-07-16 04:43:31)

The answer was 42?
Kind regards, Jaak.

Re: Sysprep mass storage section with DriverPacks Mass Storage

done 55/62/75
like this

[iaStor_Inst.Services]
AddService = iaStor75, %SPSVCINST_ASSOCSERVICE%, iaStor_Service_Inst, iaStor_EventLog_Inst

[iaStor_mobl_Inst.Services]
AddService = iaStor75, %SPSVCINST_ASSOCSERVICE%, iaStor_mobl_Service_Inst, iaStor_EventLog_Inst

will pack up, and update file on server.
I want to work on that Nvidia mess too.

any help on that?

The answer was 42?
Kind regards, Jaak.

Re: Sysprep mass storage section with DriverPacks Mass Storage

he he, you know, one of the testpacks of two months ago failed, it had changes like this.., But what I had done was use search and I replaced a lot more, so it probably got messed up..

feedback by people who know what makes it tick like a swiss clock, would be very welcome.

The answer was 42?
Kind regards, Jaak.

Re: Sysprep mass storage section with DriverPacks Mass Storage

done 55 / 62 / 75 like this

[iaStor_Inst.Services]
AddService = iaStor75, %SPSVCINST_ASSOCSERVICE%, iaStor_Service_Inst, iaStor_EventLog_Inst

[iaStor_mobl_Inst.Services]
AddService = iaStor75, %SPSVCINST_ASSOCSERVICE%, iaStor_mobl_Service_Inst, iaStor_EventLog_Inst

these changes did NOT work on a live test from DISC
(it worked on three machines, but not on fourth..)
That means these changes were NOT enough.

If you can make the changes to INFs and they work for SYSPREP, then it must also be tested from a DISC on a live machine with hardware that uses the driver.
There will be no other way to get this in a release.

Last edited by jtdoom (2007-07-16 04:49:29)

The answer was 42?
Kind regards, Jaak.

Re: Sysprep mass storage section with DriverPacks Mass Storage

I never knew there were somuch problems with the intel massstorage drivers... sad
Hope you guys find a good solution.

Re: Sysprep mass storage section with DriverPacks Mass Storage

and via, and all these others which use same INF name/same SYSname
sad

The answer was 42?
Kind regards, Jaak.

Re: Sysprep mass storage section with DriverPacks Mass Storage

the INF name, is easy.. rename it..
but, same SYS..
If we rename the SYS, the INF must be edited.
The copyfiles list, is easy enough.

What torrero says, sorta made sense. The description of the driver in registry..
but, it is not easy to make that happen and one wrong line will break the driver.

I tried.
If there is Anyone who makes a set of iastor that works for sysprep and from Disc, we can use you.

The answer was 42?
Kind regards, Jaak.

Re: Sysprep mass storage section with DriverPacks Mass Storage

Ok, just to make sure I get it right:

The problem with the current intel massstorage drivers is that one driverset doesnt support all the ich(x) versions.
Mainly, the older ich5 isnt supported anymore with the latest Intel Matrix Storage Manager.

At my work this isn't really a problem as we don't have any pc's that use that ich5 driver.
And we only use hardware which use the newer intel massstorage drivers.

So, if I would remove all the massstorage drivers from my sysprep, add the latest Intel Matrix Storage Manager Driver
in D\3\M\In\1 directory and point to these drivers in the [SysprepMassStorage] section of my sysprep, it would be a solution for me?

Last edited by Skillz (2007-07-18 19:13:05)

Re: Sysprep mass storage section with DriverPacks Mass Storage

Hi
mass storage should NOT be put in 3rd party folder.

( in D\3\M\In\1 ...)

The answer was 42?
Kind regards, Jaak.

Re: Sysprep mass storage section with DriverPacks Mass Storage

I put the drivers in C:\D\3\M\In\1 and my [SysprepMassStorage] part in sysprep.inf contains the following lines:

PCI\VEN_8086&DEV_2653&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_27C1&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_27C5&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_2681&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_2821&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_2829&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_2922&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_27C1&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_27C5&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_2681&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_2821&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_2829&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_2922&CC_0106=C:\D\3\M\In\1\iaahci.inf
PCI\VEN_8086&DEV_282A&CC_0104=C:\D\3\M\In\1\iastor.inf
PCI\VEN_8086&DEV_2822&CC_0104=C:\D\3\M\In\1\iastor.inf
PCI\VEN_8086&DEV_27C6&CC_0104=C:\D\3\M\In\1\iastor.inf
PCI\VEN_8086&DEV_2682&CC_0104=C:\D\3\M\In\1\iastor.inf
PCI\VEN_8086&DEV_27C3&CC_0104=C:\D\3\M\In\1\iastor.inf
PCI\VEN_8086&DEV_282A&CC_0104=C:\D\3\M\In\1\iastor.inf
PCI\VEN_8086&DEV_2822&CC_0104=C:\D\3\M\In\1\iastor.inf
PCI\VEN_8086&DEV_27C6&CC_0104=C:\D\3\M\In\1\iastor.inf
PCI\VEN_8086&DEV_2682&CC_0104=C:\D\3\M\In\1\iastor.inf
PCI\VEN_8086&DEV_27C3&CC_0104=C:\D\3\M\In\1\iastor.inf

And it looks like its working.

Why can't I put them in the C:\D\3?

Re: Sysprep mass storage section with DriverPacks Mass Storage

A hack solution, that seems to be extensible, for those comfortable with creating a WinPE environment (see FixIDE at the bottom), can be found here.

Modifiable WinPE environments can be found here and here.

Last edited by johnk963 (2007-07-20 05:58:47)

Re: Sysprep mass storage section with DriverPacks Mass Storage

Love the script Skillz!

Everything seems to work well with 7.11 drivers too!

I use this in conjunction with Vernalex's Sysprep Driver Scanner

Run Vernalex Scanner on directories you want (I usually only do Chipset, CPU, MassStorage and LAN; because Sound and Graphics usually screw everything up)

Sysprep.inf
--------------
; NOTHING IN OEM PNP DRIVERS SECTION

[Sysprep]
    BuildMassStorage=Yes

[SysprepMassStorage]

Sysprep.01.bat
------------------

sysprep.exe -bmsd

----------------------------------------> Builds the current driver list


HWIDS.bat
-------------

REM Created by Skillz on Driverpacks.net Forums
rem %1 is path to MassDriverPacks Folder
IF "%1"=="" GOTO EOF
IF NOT EXIST %1 GOTO EOF

SETLOCAL ENABLEDELAYEDEXPANSION
SET STDOUT=%cd%\HWIDS.TXT
TYPE>%STDOUT% 2>NUL

::traverse drivers path
CALL :TRAVERSAL %1

GOTO EOF

:TRAVERSAL
PUSHD %1
for /f %%f in ('Dir /b *.inf') do (
 for /f "eol=- tokens=2 delims=," %%i in ('find /i "pci\ven" %%f') do (
  for /f "tokens=*" %%j in ("%%i") do (
    for /f "tokens=1* delims=_" %%k in ("%%j") do (
      if /i "%%k" EQU "PCI\VEN" (
        for /f "usebackq tokens=1* delims=; " %%a in ('%%j') do (
          echo %%a=%cd%\%%f>>%STDOUT%
        )
      )
    )
  )
)
)

FOR /F %%I IN ('DIR /AD /OGN /B') DO (
CALL :TRAVERSAL %CD%\%%I
)
POPD
GOTO EOF

:EOF

HWIDS.bat
-------------

HWIDS.cmd D\M

------------------------------> Put both HWIDS.bat and HWIDS.cmd at the root of C:

The file created will be called HWIDS.txt at root C:, copy the whole list into the Sysprep file under the section [SysprepMassStorage] after the Syspreped switch -BMSD imported drivers.

REMEMBER ALWAYS CREATE TWO IMAGES, one for BASE and one for SYSPREP.

Re: Sysprep mass storage section with DriverPacks Mass Storage

Note 1: I posted this same message on the MSFN forum at http://www.msfn.org/board/Request-Scrip … 43413.html , which is the thread from spring 2005 hosting the original HWIDS.CMD script. I posted it there at the request of IcemanND, the author of the INF scanning engine in this script. Thanks for the original, IcemanND!

Note 2: If someone knows how to change IcemanND's script to filter out the tab characters that sometimes got through the original script, then the dependency on SED.EXE will go away.

---
I have taken the HWIDS script and improved it by solving several weaknesses in the original.  The main caveat is it now requires SED.EXE, a free/GPL tool from http://gnuwin32.sourceforge.net/packages/sed.htm , to be somewhere on the system path.  I used SED to remove the tab characters that Skillz reported in an earlier post. The list of improvements is in the code below.

On the todo list would be automating the following:
1.) running sysprep -bmsd to insert the official MassStorage drivers into sysprep.inf (easy to do in a batch file)
2.) inserting of the output of this HWIDS script into the correct section of sysprep.inf, after the official drivers list, while verifying duplicate entries are not created in case a driver has been added on a previous insertion. (If someone has a good way of doing this, I'd love to hear it.)

HWIDS.CMD (Inf Scanner)

@echo off
:: Core INF scanning and processing engine created by IcemanND and posted on MSFN Forums
:: at http://www.msfn.org/board/lofiversion/index.php/t43413.html
::
:: Note: I (HK) contacted IcemanND on MSFN on 4/7/2008 and asked him if it would be okay to
:: release this modified version under both the GPL and Creative Commons Attribution licenses.
:: His response was 'Feel free.'
::
:: Reposted by Skillz on Driverpacks.net Forums at http://forum.driverpacks.net/viewtopic.php?pid=11604
:: Modified and expanded by Haudy Kazemi:
:: -improved handling of paths with spaces in them (added quotes around '%cd%' in SET STDOUT line)
:: -added error messages rather than silently exiting
:: -added ability to configure filename of output file
:: -added a check to see whether the output file name already exists to prevent accidental overwriting
:: -cleaned up output and added status and progress information
:: -Skillz reported that tab characters are not removed by the script.  I worked around this problem
::  with this command: sed -T -e "s/	//" hwids.txt > hwids-tabsremoved.txt
::  (tested and found to work correctly using 'GNU sed version 4.1.5' on Windows XP)

IF "%1"=="" GOTO INFO
IF NOT EXIST %1 GOTO FOLDERNOTFOUND
IF "%2"=="" GOTO NOOUTPUTFILE
IF "%3"=="overwrite" GOTO SKIPOUTPUTFILECHECK
IF EXIST "%2" GOTO OUTPUTFILEEXISTS
:SKIPOUTPUTFILECHECK

:: Check for SED.EXE on path (derived from sample code in viewpath.cmd on http://www.ss64.com/nt/path.html )
:: I (HK) contacted Simon Sheppard of ss64.com on 4/7/2008 about using a derivation of his code and
:: releasing it under both the GPL and Creative Commons Attribution licenses.  His response was 'Sure, no problem'.
:: Note: I (HK) have put together a related script called ProgramPath that exposes this search-the-path-for-a-file
:: ability directly on the command line.
::echo the path one line at a time
for %%G in ("%path:;=" "%") do (
 ::echo %%G\sed.exe
 IF EXIST %%G\sed.exe GOTO SEDEXEFOUND
)
GOTO SEDEXENOTFOUND
:SEDEXEFOUND

echo Beginning scan...this may take a few minutes...

SETLOCAL ENABLEDELAYEDEXPANSION
SET STDOUT="%cd%"\%2
SET OUTPUTFILE=%2
TYPE>%STDOUT% 2>NUL

::traverse drivers path
CALL :TRAVERSAL %1

::Use sed to find and remove any tab characters in the output file
::This is a workaround for the problem reported by Skillz
echo Running SED.EXE on %OUTPUTFILE%
sed -T -e "s/	//" %OUTPUTFILE% > %OUTPUTFILE%-tabsremoved.txt
del %OUTPUTFILE% 
ren %OUTPUTFILE%-tabsremoved.txt %OUTPUTFILE%
echo Job completed.
GOTO EOF

:TRAVERSAL
echo Processing %1
PUSHD %1
for /f %%f in ('dir /b *.inf') do (
 echo Processing %1\%%f
 for /f "eol=- tokens=2 delims=," %%i in ('find /i "pci\ven" %%f') do (
  for /f "tokens=*" %%j in ("%%i") do (
    for /f "tokens=1* delims=_" %%k in ("%%j") do (
      if /i "%%k" EQU "PCI\VEN" (
        for /f "usebackq tokens=1* delims=; " %%a in ('%%j') do (
          echo %%a=%cd%\%%f>>%STDOUT%
        )
      )
    )
  )
)
)

FOR /F %%I IN ('DIR /AD /OGN /B') DO (
CALL :TRAVERSAL %CD%\%%I
)
POPD
GOTO EOF

:INFO
echo Inf Scanner 20080407 by Haudy Kazemi
echo Credit is due to IcemanND for the core INF scanning engine, and
echo to Simon Sheppard for his system path parsing example.
echo Dual licensed under the GPL and Creative Commons Attribution License
echo.
echo This script is designed to scan a directory tree containing MassStorage device
echo INFs to find their HWIDs and output them to a file that can then be added into
echo a SYSPREP.INF.  This script should work on any INFs, in case you want to
echo gather a collection of HWIDs for other types of hardware.
echo.
echo HWIDS %%1 %%2 %%3
echo %%1 is the path to folder/tree containing DriverPack MassStorage or other INFs
echo    (e.g. C:\D\M ).
echo %%2 is the name of an output file to store the HWIDS in (e.g. hwids.txt)
echo %%3 should be the word 'overwrite' if you want to replace an existing output
echo    file of the same name
echo.
echo Messages of 'File Not Found' are normal.  They are caused by the script's use
echo of 'dir /b *.inf' coming across folders with no INF files in them.  These can
echo safely be ignored.
goto EOF

:FOLDERNOTFOUND
echo ERROR: The specified folder was not found.
echo Please specify another folder location.
GOTO EOF

:NOOUTPUTFILE
echo ERROR: No output file specified.
echo Please specify the name of an output file to store the HWIDS in (e.g. hwids.txt).
GOTO EOF

:OUTPUTFILEEXISTS
echo ERROR: File overwrite prevented.
echo You chose an output filename that already exists.  Please delete that file,
echo enable overwriting, or choose a different filename.
GOTO EOF

:SEDEXENOTFOUND
echo ERROR: SED.EXE was not found anywhere in the system path.
echo Please make it available on the system path.  It is needed to remove
echo extra tabs in the output file.
echo Note: GNU sed version 4.1.5 is known to work correctly on Windows XP
echo and can be obtained from http://gnuwin32.sourceforge.net/packages/sed.htm
GOTO EOF

:EOF

I call HWIDS.CMD with another script named hwidscan.bat.  This specifies the folder to scan, the name of the output file, and to force an overwrite of the output file if it already exists:
HWIDSCAN.BAT

:: Put together by Haudy Kazemi on 4/7/2008 to automate the HWIDS.CMD scan and update
hwids.cmd c:\drivers\dp\D\M hwids.txt overwrite

In the process of creating the improvements to HWIDS.CMD, I wrote code to verify that SED was available.  Here is that code in a standalone form, called ProgramPath.  It's job is to check to see if a program or file is available somewhere on the system path, and report back any locations it finds.

PROGRAMPATH.CMD

@echo off
if "%1"=="" goto INFO

::echo the path one line at a time
for %%G in ("%path:;=" "%") do (
 ::echo %%G\%1
 IF EXIST %%G\%1 echo %%G\%1
)

goto END

:INFO
:: I (HK) contacted Simon Sheppard of ss64.com on 4/7/2008 about using a derivation of his code and
:: releasing it under both the GPL and Creative Commons Attribution licenses.  His response was 'Sure, no problem'.
:: Based on Simon Sheppard's viewpath.cmd
:: at http://www.ss64.com/nt/path.html
:: and http://www.ss64.org/dl1/ss64win.zip

echo ProgramPath 20080407 by Haudy Kazemi
echo Credit is due to Simon Sheppard for his system path parsing example.
echo Dual licensed under the GPL and Creative Commons Attribution License
echo.
echo Checks to see if a program or file is available on the system path:
echo   PROGRAMPATH %%1
echo where %%1 is the name of the file you want to check for
echo.

:END

Last edited by hkazemi (2008-04-08 06:19:03)