Dec 21 2003, 08:38 AM Post
#1 | |
| Junior ![]() Group: Members Posts: 84 Joined: 4-December 03 Member No.: 10361 OS: none | Major Update 12. Sep 2004 (finally!) You want to install PnP-drivers directly from the CD? Or extract them from an archive before installation? Maybe you want a repair cd without winnt.sif but with custom drivers? All this is possible. NOTE: this only works with drivers that have an .inf! I did some programming in my (rare) spare time and created some custom tools to accomplish the above. This is what you have to do: 1. download the following files: (updated: 12. Sep 2004) SETUP.EX_ ca. 2K presetup.cmd ca. 1K SetDevicePath.exe ca. 12K WatchDriverSigningPolicy.exe ca. 4K In case you are having problems, try this: setup_dbg.exe ca. 5K This works exactly like the above one, except that the window of presetup.cmd is visible, so you can see what is happening. (You have to rename it to setup.exe and cab it yourself) 2. create a directory OEM\bin in the root of your CD-folder and copy WatchDriverSigningPolicy.exe and SetDevicePath.exe into it. 3. go to your I386 directory and uncab SETUP.EX_ like this: CODE expand SETUP.EX_ setupORG.exe 4. copy my SETUP.EX_ to your I386 directory and overwrite the old one. 5. copy my presetup.cmd to your I386 directory. This is an example file which assumes that all user related files reside in \OEM\bin on the CD. Feel free to change it to your needs, I added some comments, shouldn't be too hard. 6. create a directory OEM\drivers in the root of your CD-folder and copy your uncompressed drivers there OR create an archive containing your drivers and put them on the CD, for example OEM\drivers.7z or OEM\data\mydrivers.rar... you get the idea. You can sort them into subdirectories, these will be scanned recursively by SetDevicePath.exe. 7. edit TXTSETUP.SIF directly under [SourceDisksFiles] to include the following entries: CODE setupORG.exe = 1,,,,,,,2,0,0 presetup.cmd = 1,,,,,,,2,0,0 These two are absolutely neccessary, everything else can come from CD later on. Done. This is what happens during installation After the first reboot the installation starts in GUI-mode and executes "setup.exe -newsetup". Well, it *thinks* it does... My setup.exe executes presetup.cmd first (the window is hidden by design) which in turn starts the original setup. It waits till presetup.cmd terminates, then it terminates itself and Windows reboots. So as you might have guessed already, the neat stuff happens in presetup.cmd. The driveletter of the CD is searched first: CODE 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: (thanks to serialsz for the shorter version, slightly modified) Remark: note that the tagfile might be different for you. You might have to change it to '\WIN51IP' or '\WIN51.SP2'. Uncompressed drivers directly on CD If they are uncompressed on the CD, just do it like this: CODE %CDDRIVE%\OEM\bin\SetDevicePath.exe %CDDRIVE%\OEM\drivers The drivers directory on the CD is scanned for subdirectories. The list of subdirectories is then written to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DevicePath. ("%SystemRoot%\Inf" is added in front of it) Compressed drivers from an archive In case you want to use compressed drivers (and who wouldn't want to Unsigned drivers Now comes the tricky part. The installation of unsigned drivers will trigger the usual warning messages. So you may think: "No problem. I just change the 'HKLM\Software\Microsoft\Driver Signing' value in HIVESFT.INF!" Should work, but does not. Windows Setup resets the "Driver Signing" entries when it starts. The following line in presetup.cmd will take care of this issue. CODE start %CDDRIVE%\OEM\bin\WatchDriverSigningPolicy.exe (the 'start' is important, or presetup.cmd will hang!) It installs a notification hook on the "Driver Signing" regkey and changes it back whenever necessary. It changes another key as well: The geniuses at Microsoft implemented a mechanism to disallow the change of the "Driver Signing" keys through regkeys, which is a good thing but at the same time they build a backdoor for circumventing this mechanism. HKCU\Software\Policies\Microsoft\Windows NT\Driver Signing\BehaviorOnFailedVerify (=0) This essentially means that when Windows finds out that the policies have been tampered with, it just does not care... Things to do after the installation: Microsoft recommends to reset the DevicePath to "%SystemRoot%\Inf" after setup: CODE REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion] "DevicePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\ 00,74,00,25,00,5c,00,49,00,6e,00,66,00,00,00 If you used WatchDriverSigningPolicy.exe, you should reset the appropriate keys if you don't want unsigned drivers to be installed without warning: CODE REGEDIT4 [HKEY_CURRENT_USER\Software\Microsoft\Driver Signing] "Policy"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Driver Signing] "Policy"=hex:01 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows NT\Driver Signing] "BehaviorOnFailedVerify"=dword:00000001 (Apparently this does not work at the end of presetup.cmd after the invocation of setup.exe. It seems that Windows is in some weird limbo state there and registry-changes are ignored/reset.) Final notes: Please note that you cannot start all programs in presetup.cmd. The environment is rather limited at this point of the setup. regedit.exe for example does not work, but reg.exe does. taskmgr.exe does not work either. They will work a minute later, when the real setup has started. rundll32.exe works so you can install custom infs. WinRAR-sfx-archives only work with consolemode-sfx-module, 7z-sfx archives work out of the box. (figured out by edmoncu here) BTW, things added to RunOnce will be executed somewhere at mark 34min, parallel to the driver installation. RunOnceEx gets executed at mark 13min, as usual. You can also use AutoIt to automate the installation in case you don't want to use winnt.sif. (for a repair cd) My old version of setup.exe started GUI-setup automatically after presetup.cmd had finished, this new one does not! You have to do it youself at the end of presetup.cmd. This way you can do stuff after setup as well, like cleanup. This version of setup.exe forwards its parameters to presetup.cmd. This means that you should start the installation like this: CODE setup.exe %* (thanks, Biggles, for the shorter version) in case Windows wants to do some special stuff, like ASR (Automated System Recovery). This was mentioned by ovilla2001 here, although he reported the repair option failed, I just assume he meant ASR. (AFAIK "-newsetup" is used by normal and repair setup, only the entries in $winnt.inf$ change)SetupORG.exe must be renamed to setup.exe before installation to resolve a bad signature issue reported by ovilla2001 here, look into the example presetup.cmd to see how this is to be done. -- Pyron |
| | |
![]() |
Dec 18 2006, 04:53 PM Post
#441 | |
| Group: Members Posts: 8 Joined: 18-December 06 Member No.: 118785 |
I also noticed for this following section: 7. edit TXTSETUP.SIF directly under [SourceDisksFiles] to include the following entries: CODE setupORG.exe = 1,,,,,,,2,0,0 presetup.cmd = 1,,,,,,,2,0,0 These two are absolutely neccessary, everything else can come from CD later on. There are different sections with the SourceDisksFiles. Which one do I put those two above entries under? The first one? |
| | |
Dec 19 2006, 05:50 PM Post
#442 | |
| Sonic Group: Patrons Posts: 1583 Joined: 4-December 03 From: France Member No.: 10366 OS: none |
@SBacklin: 1) Choose one file, it can be anything, the file acts as a "marker" only. 2) It's under the first [SourceDisksFiles] only. |
| | |
Dec 20 2006, 03:02 AM Post
#443 | |
| Group: Members Posts: 8 Joined: 18-December 06 Member No.: 118785 |
Thanks for the reply. I ended up using the stuff from Driverpacks.net It worked just fine. My installation and login seemed a bit sluggish. I tried the doing the activation trick listed in the unattended setup guide but, I believe I made an error and that was the only issue. The drivers slipstreaming worked. I just got to work out a couple kinks.
|
| | |
Mar 3 2007, 10:38 AM Post
#444 | |
| Group: Members Posts: 6 Joined: 22-September 05 Member No.: 74031 |
i try this way.but not successful.i will try agian.
|
| | |
Apr 22 2007, 05:11 AM Post
#445 | |
| Group: Members Posts: 2 Joined: 1-February 06 Member No.: 86665 |
hi crazyboot and evilvoice have u guys find the solution yet. i am also having the same problem like u guys, some of my device drivers are not installing, only my 3com lan driver has succesfully insatlled. is the setdevicepath is occuring the problems. This post has been edited by shafaet: Apr 22 2007, 05:13 AM |
| | |
May 31 2007, 06:11 AM Post
#446 | |
| Newbie Group: Members Posts: 18 Joined: 8-February 05 Member No.: 43461 |
Ok I know this is pretty close if not impossible with what can and can't run during presetup but I was wondering if anybody knew a way I could have WPI or a menu similar to WPI start up during presetup (any third party tools or anything that would make it work is not an issue) if anyone knows where I could start looking let me know. So far I've been working with both AutoIt and WPI to try to get one of them to start using Dependency Walker to see what files are required for these programs to work but still no luck. |
| | |
Jun 6 2007, 11:16 AM Post
#447 | |
| Junior ![]() Group: Members Posts: 64 Joined: 2-December 04 Member No.: 37756 |
I want to use those tools to for my network installation of windows XP. However, when setup is copying over the files, I receive a message saying SetupORG.exe cannot be copied and Presetup.cmd cannot be copied. I am assuming an entry in the txtsetup.sif needs to be updated because it is from the network rather than the CD. What else do I need to change in the Presetup.cmd to make this work Thank you |
| | |
Jun 6 2007, 11:23 AM Post
#448 | |
| Cyber Ops Group: Super Moderator Posts: 3090 Joined: 24-September 05 From: Ft Meade, Maryland, USA Member No.: 74319 OS: XP Pro x86 |
Please note that there are other methods of doing this that are explained in other threads within this subforum. You may want to try those if this method doesn't work for you. Pyron hasn't posted here in a very long time so you may get better support from the other projects.
|
| | |
Jun 6 2007, 11:30 AM Post
#449 | |
| Junior ![]() Group: Members Posts: 64 Joined: 2-December 04 Member No.: 37756 |
Thank you very much I will check them out
|
| | |
Dec 29 2007, 05:05 PM Post
#450 | |
| Junior ![]() Group: Members Posts: 91 Joined: 2-December 03 From: Hungary Member No.: 10263 |
This method is working correctly, but I have a little problem with it: I made on my DVD a directory named Drivers. It has many subdirs with extracted drivers of all driverpacks. it is about 1.4 GB. I know, but I have space on the DVD, why I have to extract file to my hard drive? Thats the problem. After presetup.cmd my system is frozen, the DVD drive is working-working, but nothing happens. Interesting: with virtualbox (wmvare like software, but free) it is OK. One time I left my computer to work, after about 1 hour the setup continued and every hardware was recognised correctly. Is it normal? Other: I made a service DVD with BartPE. I made a little change in the PROGRAMS hive: I modified the DevicePath key to point on my DVD/Drivers subdir (and recursively ofc. It is about a 15000 byte long field...). Same as before: during recognising my HW, the system was hunged up, DVD was worked also. I ejected the DVD, but the system was too busy to continue, I think it tried to solve the path of my drivers. No error messages or something similar. Can anyone help me? (Sorry about my english... Maybe everybody understood me! Joc |
| | |
Jan 1 2008, 09:27 PM Post
#451 | |
| Senior Member ![]() ![]() ![]() ![]() Group: Members Posts: 558 Joined: 9-July 04 Member No.: 24238 OS: Vista Ultimate x64 | |
| | |
Feb 19 2008, 09:33 PM Post
#452 | |
| Senior Member ![]() ![]() ![]() ![]() Group: Members Posts: 698 Joined: 12-June 05 From: Sydney, Australia Member No.: 60134 OS: none |
Ever since XP SP2, i've used the method described in this thread but now i want to use it for SP3 but we need a new modified version of setup.exe (setup.ex_) ... does anyone know what is needed to do the mod? Or is there a version for SP3 available anywhere? Cheers for any help. |
| | |
May 27 2008, 07:57 AM Post
#453 | |
| Group: Members Posts: 6 Joined: 26-February 07 Member No.: 128554 |
So unfortunately this method cannot be used with SP3 slipstreamed installation sources as there is no modified exe available. Too bad. |
| | |
May 27 2008, 05:34 PM Post
#454 | |
| Senior Member ![]() ![]() ![]() ![]() Group: Members Posts: 698 Joined: 12-June 05 From: Sydney, Australia Member No.: 60134 OS: none | So unfortunately this method cannot be used with SP3 slipstreamed installation sources as there is no modified exe available. Too bad. I've found the solution ... if you use the DriverPacks Base to slipstream your drivers, one of the methods you can use creates a modded EXE. I've uploaded one people can use as a replacement for this method here: http://soporific.dsleague.com/files/SETUP.rar but ideally, scrap this method and use the Driverpacks method in its entirety. Hope this helps. Sop. |
| | |
Aug 7 2008, 07:28 AM Post
#455 | |
| Member ![]() ![]() Group: Members Posts: 114 Joined: 7-March 04 From: Paris Member No.: 15504 OS: XP Pro x86 |
This is really a good job! I use this trick on every CD I make, for DriverPacks. By the way, I don't like the way driver letter is detected in presetup.cmd : CODE 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: Indeed, if there's a Hard Disk with a WIN51 file at root, then identification is corrupted. One good thing should be that fake setup.exe passes drive letter as argument. This one can detect drive letter from which its launched, easily with windows API. Does anybody have the source of fake setup.exe? I could mod it to suit my own needs. Cheers, Kal |
| | |
Aug 29 2008, 03:53 AM Post
#456 | |
| Junior ![]() Group: Members Posts: 63 Joined: 2-January 04 From: Earth Member No.: 11833 | So unfortunately this method cannot be used with SP3 slipstreamed installation sources as there is no modified exe available. Too bad. I just extract the SETUP.EX_ from Windows XP SP2 to SETUPORG.EXE, which works flawless together with the modified SETUP.EX_ from this page. |
| | |
Aug 29 2008, 03:53 AM Post
#457 | |
| Junior ![]() Group: Members Posts: 63 Joined: 2-January 04 From: Earth Member No.: 11833 |
double post
This post has been edited by booster: Aug 29 2008, 03:53 AM |
| | |
Oct 26 2008, 11:07 AM Post
#458 | |
| Junior ![]() Group: Members Posts: 91 Joined: 2-December 03 From: Hungary Member No.: 10263 |
Sorry, bad post. I solved meanwhile...
This post has been edited by Joc: Oct 26 2008, 11:27 AM |
| | |
Oct 27 2008, 05:58 AM Post
#459 | |
| Group: Members Posts: 6 Joined: 26-February 07 Member No.: 128554 | So unfortunately this method cannot be used with SP3 slipstreamed installation sources as there is no modified exe available. Too bad. I just extract the SETUP.EX_ from Windows XP SP2 to SETUPORG.EXE, which works flawless together with the modified SETUP.EX_ from this page. Ah thanks for the tip. I'll try it out... |
| | |
Nov 8 2009, 11:30 AM Post
#460 | |
| Group: Members Posts: 2 Joined: 29-October 09 Member No.: 265396 OS: XP Pro x86 | So unfortunately this method cannot be used with SP3 slipstreamed installation sources as there is no modified exe available. Too bad. I've found the solution ... if you use the DriverPacks Base to slipstream your drivers, one of the methods you can use creates a modded EXE. I've uploaded one people can use as a replacement for this method here: http://soporific.dsleague.com/files/SETUP.rar but ideally, scrap this method and use the Driverpacks method in its entirety. Hope this helps. Sop. Which method is? And please reupload the file thx! |
| | |
![]() ![]() |
| Lo-Fi Version | Time is now: 24th November 2009 - 03:49 PM |