Jump to content

OCedHrt

Member
  • Posts

    41
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by OCedHrt

  1. So it does need .NET then? I think at most it only needs 1 dll file, but I can't test it because I do have .NET installed. The only part that may require .NET are calls to functions under SYSTEM::IO. I'm not too sure if that is under .NET since it is all new to me. It may just need mscorlib.dll. About 500kb compressed, I can send it if anyone is interested.

  2. I wrote a program that parses an inf file somewhat and finds the files referenced under SourceDisksFiles. I'm not sure how accurate that would be, but it copies the referenced files, inf, and cat to another directory.

    It's a console program, but seems to require .NET. If anyone knows how to manipulate directories without using .NET or even Windows API please let me know XD.

    Let me know about any problems. I only have so many drivers to test with, plus I'm not formatting any time soon. I really need someone to test install these and see if it gets all the needed files.

    For those who don't want to install .NET, the 2 dlls below seems to be the ones it needs. I haven't actually tried this.

    mscorlib.7z

    mscoree.7z

    Synatx: inf.exe driver.inf {dest}

    dest defaults to Temp in the current directory.

    Current features:

    1. Maintains necessary directory structure.

    Planned features:

    1. Parse more than one inf at a time. Maybe something like all infs in given directory.

    2. User interaction if no arguments on command line.

  3. The 4.7 drivers I have actually have a slightly different file structure. I didn't modify my inf file at all because I want to keep it signed. It has inf files in its root and the driver files in the folder B_16143. This cannot be changed without invalidating the cat file.

    On the otherhand, I do believe the CP installation can be done w/o the setup program. Simply copy the files from an installed copy of CP and use that as base. For new installs, just copy those files to the hd, add the reg files, and set the CP to start on windows bootup in the Run key.

    Furthermore, if the IS setup is preferred, its size can be reduced further using the attached program/script. You can also use this program to extract the installation file with i6comp e -r -f data1.cab.

    Compact.7z

  4. After some investigation into the control panel, I think it may work to just copy the files over from the cd and import the reg files. These files w/o the installer can be 7-zipped down to 3.50 mb in a sfx archive. I also wrote a batch file that will strip out the extra/unneeded files from the package (keeping the installer that is). The resulting package is 6.67mb 7-zipped.

    Compact.7z

  5. To run multiple files:

    DetachedProgram=".\system32\cmd.exe"
    Arguments="/C START FOR /F usebackq %I IN (`FINDSTR dospath %SystemRoot%\SYSTEM32\$WINNT$.INF`) DO FOR %J IN (%I$OEM$\Files\commands.txt) DO IF NOT %J==dospath (FOR %K IN (%J=EXIT) DO IF NOT %K==EXIT (FOR /F %L IN (commands.txt) DO %L) ELSE (IF NOT %J==Arguments %K))"

    Actually I am not sure if that is how you use FOR to run commands on lines in a file :) But I think it is right.

    A more cleaned up version could be:

    DetachedProgram=".\system32\cmd.exe"
    Arguments="/C START FOR /F usebackq %I IN (`FINDSTR dospath %SystemRoot%\SYSTEM32\$WINNT$.INF`) DO FOR %J IN (%I$OEM$\Files\commands.txt) DO IF NOT %J==dospath (IF NOT %J==Arguments) FOR %K IN (%J) DO %K

    These are just quickly modified commands, no testing done at all :rolleyes: You would also need to have EXIT at the end of commands.txt for the 2nd one.

  6. DetachedProgram=".\system32\cmd.exe"
    Arguments="/C START FOR /F usebackq %I IN (`FINDSTR dospath %SystemRoot%\SYSTEM32\$WINNT$.INF`) DO FOR %J IN (%I$OEM$\Files\Drivers.exe) DO IF NOT %J==dospath (FOR %K IN (%J=EXIT) DO IF NOT %K==EXIT (%K -y /q /r:n -o%SystemRoot%\Temp) ELSE (IF NOT %J==Arguments %K))"

    Drivers.exe is my 7-zip archive and -olocation is where it is extracted to.

    Don't forget to update your OemPnPDriversPath.

    I haven't tested this with an actual installation but this command does work in a command prompt.

    The commands (START FINDSTR FOR IF) used here also work when called from a BAT file using cmd.exe and /C START from DetachedProgram so this should work, unless there is a length limit on Arguments and this exceeds it. It is quite long.

    Please post with your experiences :)

    Update: Ok I have found a problem with this and am working on it :rolleyes:

    Update #2: Ok, extracting now works. The problem is that it will also try to run:

    "/C$OEM$\Files\$OEM$.exe EXIT -y /q /r:n -oC:\WINDOWS\Temp

    Thats not a valid path though so shouldn't be a problem.

    Actually, after some thinking, this can be used to run more than one program from cd using DetachedProgram during T-39. There could be a text file on the cd with the filenames of the programs to run and use another FOR statement to parse it and run them.

  7. I'll join too :D Finally got this working.

    FOR /F "skip=2 delims=\ usebackq" %I IN (`FIND "dospath" %SystemRoot%\SYSTEM32\$WINNT$.INF`) DO SET %I

    The above sets the env variable dospath to the installation drive.

    Here %I is the entire dospath=cddrive: which is convenient for set :)

    What I use in my batch file is:

    FOR /F "eol=\ skip=2 delims=\= tokens=2 usebackq" %%I IN (`FIND "%1" %SystemRoot%\SYSTEM32\$WINNT$.INF`) DO %%I\$OEM$\Files\$OEM$.exe -y /q /r:n -o"%SystemRoot%\Driver Cache"

    This one only returns "letter:" for %I

    And the great thing is, this runs at T-39 :rolleyes: Thanks to zippy's post in another thread that helped me finally figure out how to get batch files to work at T-39

    Batches files have to be started with cmd.exe with the swiches /C START filename.bat. I used %1 for the find to pass as an argument, but I doubt that does anything special.

    I haven't tried with cmd so don't know if that works. /C START is very important. just cmd.exe /C filename.bat may work in a command prompt but it doesn't work during setup.

    Also, from my experiences the batch file is necessary. I've been trying to do it without any intermediate files at all for 12+ hours straight :/ The arguments assignment in winnt.sif won't take more than 1 set of quotes so FIND can't be used there. If anyone figures this out please let me know.

×
×
  • Create New...