MSFN Forum: SOLVED: drivers from CD - MSFN Forum

Jump to content



  • 24 Pages +
  • « First
  • 9
  • 10
  • 11
  • 12
  • 13
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

SOLVED: drivers from CD possible even without winnt.sif! Rate Topic: ***** 1 Votes

#201 User is offline   Biggles 

  • Group: Members
  • Posts: 3
  • Joined: 16-September 04

Posted 24 September 2004 - 05:11 AM

My first post on this site so pardon any bloopers.

Congrats Pyron and contributors for a good alternative to relying completely on WINNT.SIF. I've just got it working under VMware and now 'live' on a real PC.

I thought I should contribute something so here are some tips re batch files that may help others;

1/
I was suprised to find that even at the early stage at which presetup.cmd is executed, advanced batch file capabilities are operative. I have been able to use "SetLocal EnableExtensions EnableDelayedExpansion" to good end to do things like rename CD drives to the letters I prefer using such as R: (CD Reader drive) & W: (CD writer drive). It also gets them out of the way for me to create more partitions rather than having HDD partitions & CD drives jumbled together. Assigning the CD drive letters via Pyron's technique is more elegant than fixing up registry entries after Windows setup has completed.

2/
Instead of discretely specifying parameters, use %* to refer to all parameters. For example:

Quote

start /wait setup.exe %*
This approach is more robust as one doesn't need to know how many parameters are actually used. (I'm not sure how %1 to %4 were chosen by Pyron, using %* avoids needing to know.)

3/
To log parameters to file I use the above (2/) as follows:

Quote

echo %*>>A:\MyLogFile.txt



#202 User is offline   Biggles 

  • Group: Members
  • Posts: 3
  • Joined: 16-September 04

Posted 24 September 2004 - 05:18 AM

Does anyone know if Pyron's technique works with Windows 2003 Server?

#203 User is offline   evilvoice 

  • Ditchy McAbandonpants
  • PipPipPipPipPip
  • Group: Members
  • Posts: 946
  • Joined: 27-January 04

Posted 24 September 2004 - 05:21 AM

I may be wrong, but I believe since w2k3 uses almost the exact same install process, this method will work for w2k3 also...I may be wrong as I dont know what functions pyrons setup calls on, but it should work...Also, wanted to say thanks for the nice tips.

#204 User is offline   evilvoice 

  • Ditchy McAbandonpants
  • PipPipPipPipPip
  • Group: Members
  • Posts: 946
  • Joined: 27-January 04

Posted 24 September 2004 - 05:26 AM

one question, Biggles, if you noticed what I typed above you about presetup being %0 and -newsetup being %1, how would you make it so that %0 is not passed to setup.exe, using %* in your example...would there be a way to tell %* to start at 1 and count up, because you may encounter other errors having presetup.cmd being passed as the first variable..

#205 User is offline   Pyron 

  • Junior
  • Pip
  • Group: Members
  • Posts: 84
  • Joined: 04-December 03

Posted 24 September 2004 - 08:50 AM

Maybe some clarification:
%0 has to contain the path to the script. This is a feature of Windows and has nothing to do with my setup.exe.
%* will omit %0, as %0 is really a special case and rarely needed at all.

I still don't understand where you got that %0 from, evilvoice.

--
Pyron

#206 User is offline   evilvoice 

  • Ditchy McAbandonpants
  • PipPipPipPipPip
  • Group: Members
  • Posts: 946
  • Joined: 27-January 04

Posted 24 September 2004 - 11:16 AM

from bitmonster...check what he told me to put into presetup.cmd
I put it in...and it showed what was ran...the only thing is that he had me start at %0 and goto %9...well, %0, according to my log file is presetup.cmd...so using %* will work fine?

#207 User is offline   Thauzar 

  • 4th Star Learner
  • PipPipPip
  • Group: Members
  • Posts: 415
  • Joined: 10-August 04

Posted 24 September 2004 - 06:02 PM

I may look like a complete id*** but at least I tried something before posting.

I wanted to check if I had svcpack issues too since I used this method on my unattended cd, to realise that yes, so I tried the new setup pyron released on page 20, still not working

now 3 things (and it's both a mistake from me)
1- do svcpack.inf supposed to run before runonceex? if so it doesn't work
2- i repacked svcpack.inf to svcpack.in_ with makecab, and overwrote the original file, maybe it's that
3- my svcpack.inf is wrong (this is strongly my opinion)

[Version]
Signature="$Windows NT$"

[SetupData]
CatalogSubDir="i386\Updates"

[ProductCatalogsToInstall]

[SetupHotfixesToRun]
test.cmd


test.cmd is my test cmd file it contains
@ECHO OFF
CLS
ECHO.
ECHO TEST TEST TEST
PAUSE

EXIT


Oh and don't ask me if i modified dosnet.inf, I added the OptionalSrcDirs or whatever we have to add, followed the unattended guide. Nothing less, nothing more


So please if someone could tell me what's wrong it might me helpfull to others too

#208 User is offline   evilvoice 

  • Ditchy McAbandonpants
  • PipPipPipPipPip
  • Group: Members
  • Posts: 946
  • Joined: 27-January 04

Posted 24 September 2004 - 11:41 PM

need more under version
[Version]
Signature="$Windows NT$"
MajorVersion=5
MinorVersion=1
BuildNumber=2600


#209 User is offline   Pyron 

  • Junior
  • Pip
  • Group: Members
  • Posts: 84
  • Joined: 04-December 03

Posted 25 September 2004 - 02:46 AM

@evilvoice: sorry, I didn't see that in bitmonsters post. Then it is clear to me of course. I am sure %* will work instead of %1 %2 %3 %4, I will test it and change the guide accordingly.

--
Pyron

#210 User is offline   Biggles 

  • Group: Members
  • Posts: 3
  • Joined: 16-September 04

Posted 25 September 2004 - 03:32 AM

@evilvoice: Per Pyron's comment, %* skips %0 and passes %1 thru %9 plus further entries past %9 that would normally be accessed via the Shift command. ie it's a grab all (except for %0)

Further tip:
Using %~dp0 returns the drive & path of where the script file is located. This is handy when referencing other files in the same directory as the script without having to explicitly specify the path inside your script (ie use where the script and other files are not in the current directory).

#211 User is offline   evilvoice 

  • Ditchy McAbandonpants
  • PipPipPipPipPip
  • Group: Members
  • Posts: 946
  • Joined: 27-January 04

Posted 25 September 2004 - 04:57 AM

@Pyron...also, I did some things to presetup.cmd to allow watchdriversigning to revert to what its supposed to be, according to MS (as you posted in your first thread)...Ill post it here what I added to presetup.cmd if you would like to add it to the one on the first post.

REM +=======================================================+
REM | Reset DriverPolicy                                      |
REM |-------------------------------------------------------|
reg add "HKCU\Software\Microsoft\Driver Signing" /v Policy /t REG_DWORD /d 1
reg add "HKCU\Software\Policies\Microsoft\Windows NT\Driver Signing" /v BehaviorOnFailedVerify /t REG_DWORD /d 1
reg add "HKLM\Software\Microsoft\Driver Signing" /v Policy /t REG_BINARY /d 01
REM +=======================================================+


this is at the very end of the file.

#212 User is offline   Thauzar 

  • 4th Star Learner
  • PipPipPip
  • Group: Members
  • Posts: 415
  • Joined: 10-August 04

Posted 25 September 2004 - 05:22 PM

evilvoice, on Sep 24 2004, 11:41 PM, said:

need more under version
[Version]
Signature="$Windows NT$"
MajorVersion=5
MinorVersion=1
BuildNumber=2600

ok, i didn't know if this had changed for SP2, do you think it could be caused by the fact that I recab my svcpack.inf to svcpack.in_ ? normally I would have deleted the .in_ and replaced it with a .inf.

I am currently installing to test, will edit later. If negative, I'll try with the %* thing


EDIT: seemed to get stuck during the peripherics installation process, I don't like that, maybe i'm not patient (was at 100%, reading once in a while from the cd but no hd activity for over 10 minutes) so I decided to retry with an .inf just to be sure, anyway it's not a couple of bytes that will bother. More edit later

EDIT2: this time it did not get stuck, but svcpack was not run, time to try the %* i guess :no:

EDIT3: even with %* it continued to runonceex... what am I doing wrong? I got the latest setup.ex_ from last page or the one before, I posted my presetup.cmd below so you can check, and my testing method is explained on last page. Normally at svcpack.inf it should run the test.cmd file and this file makes a command window open saying TEST TEST TEST before pausing. So I can't miss it! Anyway check my code it's on the previous page! and I added the missing version lines. If you need more info PM me please


Just to be sure I got everything right (sorry if it makes a long post)
REM +=======================================================+
REM | Finding CDROM driveletter                             |
REM |-------------------------------------------------------|
set tagfile=\WIN51
for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist "%%i:%tagfile%" set CDDRIVE=%%i:
REM +=======================================================+



REM +=======================================================+
REM | We should be already in system32, this is just to be  |
REM | sure                                                  |
REM |-------------------------------------------------------|
%SystemDrive%
cd %SystemRoot%\system32
REM +=======================================================+



REM +=======================================================+
REM | Trick Windows into identifying the original setup.exe |
REM | deleting the setup.exe will not work, just rename it  |
REM |-------------------------------------------------------|
if exist setup.exe ren setup.exe setupold.exe
if exist setupORG.exe ren setupORG.exe setup.exe
REM +=======================================================+



REM +=======================================================+
REM | Do other stuff like copying useful tools (optional)   |
REM | or extract softwares like .NetFramework (optional)   |
REM |-------------------------------------------------------|
cd %Systemdrive%\install\Applications
%CDDRIVE%\$OEM$\bin\7za.exe x -y -aoa %CDDRIVE%\$OEM$\NetFrameworkSP1.7z
REM +=======================================================+



REM +=======================================================+
REM | If you are using compressed drivers unpack them here: |
REM |-------------------------------------------------------|
%SystemDrive%
cd \
%CDDRIVE%\$OEM$\bin\7za.exe x -y -aoa %CDDRIVE%\$OEM$\drivers.7z
REM +=======================================================+



REM +=======================================================+
REM | Scanning for driverdirectories                        |
REM | ONLY USE ONE OF THE FOLLOWING COMMANDS, NOT BOTH!     |
REM |-------------------------------------------------------|
REM | This one is for uncompressed drivers on the CD        |
REM %CDDRIVE%\OEM\bin\SetDevicePath.exe %CDDRIVE%\OEM\drivers
REM | This one is for your unpacked drivers on your HD      |
%CDDRIVE%\$OEM$\bin\SetDevicePath.exe %SystemDrive%\drivers
REM +=======================================================+



REM +=======================================================+
REM | Enable installation of unsigned drivers               |
REM |-------------------------------------------------------|
start %CDDRIVE%\$OEM$\bin\WatchDriverSigningPolicy.exe
REM +=======================================================+



REM +=======================================================+
REM | Prepare later installations (optional)                |
REM |-------------------------------------------------------|
REM SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REM REG ADD %KEY%\998 /V 1 /D "%CDDRIVE%\OEM\bin\t-13_install.cmd" /f
REM REG ADD %KEY%\999 /V 1 /D "REG ADD %KEY%\zzz999 /V 1 /D %CDDRIVE%\OEM\bin\postinstall.cmd /f" /f
REM
I REM all those lines cause I do my RunOnceEx stuff during cmdlines.txt
+=======================================================+



REM +=======================================================+
REM | Finally start the installation with the originally    |
REM | given parameters                                      |
REM |-------------------------------------------------------|
start /WAIT setup.exe %1 %2 %3 %4
REM
as I said, I will try with %* later
+=======================================================+



REM +=======================================================+
REM | Cleanup                                               |
REM RD /Q /S %SystemDrive%\drivers
REM | Reset DevicePath                                      |
REM %CDDRIVE%\$OEM$\bin\SetDevicePath.exe %SystemRoot%\Inf
REM
I voluntarily let the drivers on the drive
+=======================================================+

#213 User is offline   evilvoice 

  • Ditchy McAbandonpants
  • PipPipPipPipPip
  • Group: Members
  • Posts: 946
  • Joined: 27-January 04

Posted 25 September 2004 - 11:36 PM

[SetupData]
CatalogSubDir="i386\Updates"


is supposed to be
[SetupData]
CatalogSubDir="\i386\Updates"


i know, stupid...but seriously, if you dont have the \ before i386. it wont work, now why didnt MS include it, who knows.

#214 User is offline   Bâshrat the Sneaky 

  • aka Wim Leers
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,214
  • Joined: 29-October 03
  • OS:none specified
  • Country: Country Flag

Posted 26 September 2004 - 03:17 AM

evilvoice, on Sep 26 2004, 07:36 AM, said:

[SetupData]
CatalogSubDir="i386\Updates"


is supposed to be
[SetupData]
CatalogSubDir="\i386\Updates"


i know, stupid...but seriously, if you dont have the \ before i386. it wont work, now why didnt MS include it, who knows.

So did you get svcpack.inf to work now?

#215 User is offline   Pyron 

  • Junior
  • Pip
  • Group: Members
  • Posts: 84
  • Joined: 04-December 03

Posted 26 September 2004 - 04:17 AM

@evilvoice:
Thanks, I really forgot that.

--
Pyron

#216 User is offline   evilvoice 

  • Ditchy McAbandonpants
  • PipPipPipPipPip
  • Group: Members
  • Posts: 946
  • Joined: 27-January 04

Posted 26 September 2004 - 05:53 AM

@Bashrat, yes, i got it to work, but Thauzar is having problems with it, but i dont think its cause of pyrons method....but we will see.

#217 User is offline   Thauzar 

  • 4th Star Learner
  • PipPipPip
  • Group: Members
  • Posts: 415
  • Joined: 10-August 04

Posted 26 September 2004 - 09:51 AM

As I said before, I want to test svcpack.inf
[Version]
Signature="$Windows NT$"
MajorVersion=5
MinorVersion=1
BuildNumber=2600

[SetupData]
CatalogSubDir="\i386\Updates"

[ProductCatalogsToInstall]

[SetupHotfixesToRun]
test.cmd


Test.cmd is in I386\UPDATES folder
@ECHO OFF
CLS
ECHO.
ECHO TEST TEST TEST
PAUSE

EXIT


And presetup.cmd looks like this
REM +=======================================================+
REM | Comment out what you don't need. These are mostly     |
REM | examples to give you an idea of how it all works.     |
REM +=======================================================+



REM +=======================================================+
REM | Finding CDROM driveletter                             |
REM |-------------------------------------------------------|
set tagfile=\WIN51
for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist "%%i:%tagfile%" set CDDRIVE=%%i:
REM +=======================================================+



REM +=======================================================+
REM | We should be already in system32, this is just to be  |
REM | sure                                                  |
REM |-------------------------------------------------------|
%SystemDrive%
cd %SystemRoot%\system32
REM +=======================================================+



REM +=======================================================+
REM | Trick Windows into identifying the original setup.exe |
REM | deleting the setup.exe will not work, just rename it  |
REM |-------------------------------------------------------|
if exist setup.exe ren setup.exe setupold.exe
if exist setupORG.exe ren setupORG.exe setup.exe
REM +=======================================================+



REM +=======================================================+
REM | Do other stuff like copying useful tools (optional)   |
REM | or extract softwares like .NetFramework (optional)    |
REM |-------------------------------------------------------|
cd %Systemdrive%\install\Applications
%CDDRIVE%\$OEM$\bin\7za.exe x -y -aoa %CDDRIVE%\$OEM$\NetFrameworkSP1.7z
REM +=======================================================+



REM +=======================================================+
REM | If you are using compressed drivers unpack them here: |
REM |-------------------------------------------------------|
%SystemDrive%
cd \
%CDDRIVE%\$OEM$\bin\7za.exe x -y -aoa %CDDRIVE%\$OEM$\drivers.7z
REM +=======================================================+



REM +=======================================================+
REM | Scanning for driverdirectories                        |
REM | ONLY USE ONE OF THE FOLLOWING COMMANDS, NOT BOTH!     |
REM |-------------------------------------------------------|
REM | This one is for uncompressed drivers on the CD        |
REM %CDDRIVE%\OEM\bin\SetDevicePath.exe %CDDRIVE%\OEM\drivers
REM | This one is for your unpacked drivers on your HD      |
%CDDRIVE%\$OEM$\bin\SetDevicePath.exe %SystemDrive%\drivers
REM +=======================================================+



REM +=======================================================+
REM | Enable installation of unsigned drivers               |
REM |-------------------------------------------------------|
start %CDDRIVE%\$OEM$\bin\WatchDriverSigningPolicy.exe
REM +=======================================================+



REM +=======================================================+
REM | Prepare later installations (optional)                |
REM |-------------------------------------------------------|
REM SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REM REG ADD %KEY%\998 /V 1 /D "%CDDRIVE%\OEM\bin\t-13_install.cmd" /f
REM REG ADD %KEY%\999 /V 1 /D "REG ADD %KEY%\zzz999 /V 1 /D %CDDRIVE%\OEM\bin\postinstall.cmd /f" /f
REM +=======================================================+



REM +=======================================================+
REM | Finally start the installation with the originally    |
REM | given parameters                                      |
REM |-------------------------------------------------------|
start /WAIT setup.exe %1 %2 %3 %4
REM +=======================================================+



REM +=======================================================+
REM | Cleanup                                               |
REM RD /Q /S %SystemDrive%\drivers
REM | Reset DevicePath                                      |
REM %CDDRIVE%\$OEM$\bin\SetDevicePath.exe %SystemRoot%\Inf
REM +=======================================================+



Now I just tried with the same svcpack.inf but with the %* thing and it was not run before runonceex, so I added back the %1 %2 %3 %4 to test it again... Are you sure we can test svcpack.inf with a .cmd file? I guess yess but damnit i'm so tired of retying... hope this works this time. Look at the code, it should all be ok now with my svcpack.inf corrected

#218 User is offline   evilvoice 

  • Ditchy McAbandonpants
  • PipPipPipPipPip
  • Group: Members
  • Posts: 946
  • Joined: 27-January 04

Posted 26 September 2004 - 10:08 AM

honestly, it wasnt presetup.cmd causing my problems, it was setup.exe (pyrons version)...so looking at your presetup.cmd isnt gonna do anything persay...your svcpack.inf should work correctly now that it looks like it is supposed to.

#219 User is offline   Thauzar 

  • 4th Star Learner
  • PipPipPip
  • Group: Members
  • Posts: 415
  • Joined: 10-August 04

Posted 26 September 2004 - 10:16 AM

Well I guess it's not working, tried again and still got all the way through runonceex without getting the test window. I am positive I downloaded pyron's setup from page 19-20 whatever the latest one he posted to help evilvoice. I'll try downloading it AGAIN, and test AGAIN, with the same parameters, same svcpack and %1 %2 %3 %4

any other suggestions?

EDIT: added this before testing again
echo %0>c:\test.txt
echo %1>>c:\test.txt
echo %2>>c:\test.txt
echo %3>>c:\test.txt
echo %4>>c:\test.txt
echo %5>>c:\test.txt
echo %6>>c:\test.txt
echo %7>>c:\test.txt
echo %8>>c:\test.txt
echo %9>>c:\test.txt

#220 User is offline   evilvoice 

  • Ditchy McAbandonpants
  • PipPipPipPipPip
  • Group: Members
  • Posts: 946
  • Joined: 27-January 04

Posted 26 September 2004 - 10:32 AM

try this...move pyrons setup.ex_ out of i386, rename setupORG.exe to setup.exe - makecab setup.exe and run...presetup.cmd wont run because pyrons setup.exe was not used...if svcpack.inf runs here, then its something dealing with pyrons presetup.cmd or setup.exe...if it does not run, then it is something else...

Share this topic:


  • 24 Pages +
  • « First
  • 9
  • 10
  • 11
  • 12
  • 13
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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



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