Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Forgotten Setup Secrets Revealed

- - - - -

  • Please log in to reply
35 replies to this topic

#1
gosh

gosh

    gosh 2.0

  • Patrons
  • 2,347 posts
  • OS:none specified
  • Country: Country Flag
Part 1: Not loading unnessary setup files during boot process

Question: Even after using programs to customize your unattended install, what is the most annoying part about setup?

Answer: Easy, text mode!

Despite advances in customizing windows xp setup, one part has remained elusive: the beginning. How frustrating is it to cut in half the time it takes to install windows, yet you still have to sit at the text mode screen that says, "loading windows setup, loading Adaptec SCSI controller,etc". That has always annoyed me. I've never owned anything Adaptec, so why do i have to wait as windows setup loads a bunch of SCSI drivers for Adaptec??? Booting from CD could take a couple minutes as you wait for setup to load it's drivers (I counted 80 in all).

In the past i have loosely described methods to try to reduce this wait time. Now i reveal for the first time how to reduce text mode setup's wait time by over 50%

How does text mode work when you boot from CD or run setup from a GUI and reboot?

When you boot from CD setupldr.bin starts the setup process. This is the "blue screen" you see booting from CD.

Setupldr.bin is hard coded to load core files such as the HAL, Kernel, Keyboard driver. It then loads setupreg.hiv, which is a registry hive file. The key part about the .hiv file is it has a mini copy of the CurrentControlSet, which loads all your drivers. This hive file is later merged with several .inf files to compose the initial registry (or in the case of an upgrade the registry is split and merged with the .inf files).

Setupldr.bin is then hard coded to load various sections from txtsetup.sif that have .load, such as:

[SCSI.Load]
[Display.Load]
[Hal.Load]

These sections specify what drivers to load during setup. Txtsetup.sif also specifies the name of the drivers, that you see at the bottom of the blue screen when you boot from CD. Such as:

[MouseDrivers.Load]
mouclass = mouclass.sys
mouhid = mouhid.sys

[MouseDrivers]
mouclass = "Mouse Class Driver"
mouhid = "HID Mouse Filter Driver"


In this case, setupldr.bin will load mouclass.sys and mouhid.sys and at the bottom of the screen you'll see "mouse class driver" and "hid mouse filter driver".

Like i mentioned, XP Setup loads 80 files (!) booting from cd, which takes a long time. And some files such as SCSI drivers you might never need. So the question becomes: Is there any easy way to tell setup not to load unwanted drivers that you don't need booting from the XP CD?

Tell setup not to load files

Looking through setupldr.bin, i saw "load" and "noload" mentioned twice. This got me thinking: If setupldr.bin looks for sections that have [xxx.load] in them to load files, maybe you can make a [xxx.noload] section so setup doesn't load those files. I wasn't that far off.

Looking at the txtsetup.sif for NT4 i found the following for [SCSI.Load]

;
; List of scsi miniport drivers we are to load and where
; they get copied to if installed. Note that the shortname
; must be the same as the service name in the driver load list.
;
; <shortname> = <miniport_filename>,<directory>
;
[SCSI.Load]
mkecr5xx = mkecr5xx.sys,4,noload
aic78xx = aic78xx.sys,4
mitsumi = mitsumi.sys,4,noload

Which implies you can tell setup not to load a file by adding ,,noload to a file.

Attached to this post is a copy of my txtsetup.sif for XP SP2 Pro. the only thing i changed in this file is i added noload. Search the file for noload and you'll see what i mean. Using this method i reduced the files XP Setup loads from 80 to 42. Reducing the load time by about 50%. No more waiting for drivers you don't need such as a Toshiba Floppy drive driver.

My custom txtsetup.sif stops setup from loading these drivers:

FAT support (i only use ntfs so what's the point of loading FAT?)
NO SCSI (i dont have any SCSI drivers)
No Toshiba floppy support (i dont have a toshiba)
NO Compaq support (i dont own a compaq so why would i want compaq drivers??)

However if you wanted to you could probably reduce the drivers down even more, maybe down to 20 (out of the original 80). My txtsetup.sif does NOT remove support for:

Floppy
Uniproccessors/multiprocessors/etc
Different HAL's
USB support
Intel support (i think virtual machines use intel so i left it even though i use AMD)

There is also a second way to speed things up even more...

Part 2: Expand needed files

By default XP setup will expand any files it needs on the fly into memory. The problem with this is when you are installing from CD this could be a big performance hit on setup, and it'll take up more memory. One way to avoid this performance hit is by expanding the files setup needs.

Steps:

1. Run i386\winnt32.exe /noreboot
2. Once done you'll have a folder called $WIN_NT$.~BT - this has the files used to boot/start setup
3. Any compressed files in this folder (ending in an understore, such as file.sy_) expand. Such as expand -r cdfs.sy_. Once every file is expanded copy them back into the i386 folder, and delete any compressed versions (such as cdfs.sy_). Now when you boot from CD setup will run the files directly from cd, instead of expanding them into memory.

Testing


I tested using a default install of XP SP2 Pro, using the txtsetup.sif attached. I made an ISO, burned to CDRW, then booted my computer from it and did a clean install on a new partition. I formated it NTFS - Quick. I had no problems during the install. Nothing was logged in setuperr.log. Installing from hard drive i only had a 2-3 second wait as setup loaded the 42 drivers i specified. Booting from cd it took about a minute to load the drivers but i didn't time it.


Conclusion

Using both methods will probably speed up booting from CD by over 50%. With further customizations it could be even greater. These methods combined with GUI setup customizations such as nlite will greatly speed up the booting process.

I have a feeling this method will become very popular simply because it's very easy to use and has no bugs. Since no files are removed from the CD, you don't need to worry about setup at a later point needing a file.

Attached Files




How to remove advertisement from MSFN

#2
Arie

Arie

    One Man Army

  • Member
  • PipPipPipPipPip
  • 835 posts
Thank you for your posting :) Currently having a look at all this. Very interesting. Haven't tested all this yet, but I have followed your posting in regards to the $WIN_NT$.~BT folder for a start. I was wondering though if I could do the same in regards to the $WIN_NT$.~LS folder; expanding the files and placing those in the I386 folder to speed up the installation process?
Not trying to pretend the enemy that I am.

#3
ccl0

ccl0

    Member

  • Member
  • PipPip
  • 243 posts
someone has made an addon that does all of this link

#4
gn!uz

gn!uz
  • Member
  • 6 posts
Arie, do you have a link for the article regarding $WIN_NT$.~LS and $WIN_NT$.~BT? I'm currently trying to figure out how to preserve the i386 folder in the .~LS folder so it can function as a local installation source... Having 2 i386 folders is not that efficient!

Thanks for the info Gosh! Very interesting

#5
Arie

Arie

    One Man Army

  • Member
  • PipPipPipPipPip
  • 835 posts

someone has made an addon that does all of this link

Thank you for the link, but I don't want to use any scripts others have written when I can do the same myself fine as well ;) I only use HFSLIP and RogueSpear's Microsoft .NET Framework packages, everything else is done by myself and I would like to keep it that way ;)
Not trying to pretend the enemy that I am.

#6
Arie

Arie

    One Man Army

  • Member
  • PipPipPipPipPip
  • 835 posts

Arie, do you have a link for the article regarding $WIN_NT$.~LS and $WIN_NT$.~BT?

I honestly have no idea what you're on about in regards to "the article"?! See the top post in this thread in regards to the $WIN_NT$.~BT folder. As for expanding the files in $WIN_NT$.~LS and adding those to my installation source, this is something which I'm figuring out myself. I hope though that "gosh" can answer my questions as it will save me the work of testing; there is no need to reinvent the wheel of course ;)
Not trying to pretend the enemy that I am.

#7
ccl0

ccl0

    Member

  • Member
  • PipPip
  • 243 posts

someone has made an addon that does all of this link

Thank you for the link, but I don't want to use any scripts others have written when I can do the same myself fine as well ;) I only use HFSLIP and RogueSpear's Microsoft .NET Framework packages, everything else is done by myself and I would like to keep it that way ;)



well i didnt specifically post the link for you. i posted it for whoever might read the topic and want to try to implement this, but lacks the skill with how to do it.

#8
gosh

gosh

    gosh 2.0

  • Patrons
  • 2,347 posts
  • OS:none specified
  • Country: Country Flag
Arie:

You could expand the i386 folder for faster processing, but some files such as the .cab files need to be compressed. I tried it once and got too many errors and gave up.

cclo: thanks for that link.

It's good that people are willing to look at new ways to do old things.

-gosh

#9
Arie

Arie

    One Man Army

  • Member
  • PipPipPipPipPip
  • 835 posts
I'll give it a try and see what I come up with. If I get it properly working, I'll write a simple batch to automate it and I'll upload it for all. But first I need to get my SP2.CAB missing error solved which I get with HFSLIP ;(
Not trying to pretend the enemy that I am.

#10
merrell

merrell
  • Member
  • 3 posts
Seeing as how I am always that .01%, I will not be telling my setup to skip loading anything. However, since my installation is already about 850MB, I might as well expand a bunch of stuff so I will not waste the majority of a DVD.

#11
damian666

damian666

    creator of the vistapack

  • Developer
  • 678 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag
Hi there, i have read this, and decided to make a little utility that can do all that stuff on the txtsetup file.
its the first release, so check it out and let me know.
it needs work on the gui, but the main fucntion works great.
takes out the hassle of searching and replacing stuff.

text setup modifier 1.0

let me know.

damian666
Posted Image

#12
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,076 posts
  • OS:none specified
  • Country: Country Flag

Hi there, i have read this, and decided to make a little utility that can do all that stuff on the txtsetup file.
its the first release, so check it out and let me know.
it needs work on the gui, but the main fucntion works great.
takes out the hassle of searching and replacing stuff.

text setup modifier 1.0

let me know.

damian666


It's interesting, thanks. :)

But it just makes a few mods.

I am no programmer, and I have NO idea whether the following is possible or not, or whether it would be excessively difficult to do the same in a "portable", possiblu running from PE too,program, but I can maybe describe how ideally an all purpose program like this should work, based on a spreadsheet based one (yeah, I know, but still MUCH better than the 60 Mb of .Net stuff and libraries that need to be installed to run a "Hello, world" program).
Basically I read the entire content of TXTSETUP.SIF, order it along a more "logical" order (at least to me) of sections than the original one, then add a structured category "tag" for each entry depending on the section it is and its contents and a "flag" to disable (by adding a ";" at the beginning) then I check or uncheck either "catgories" or "items" tags and export as .txt the second sheet in the spreadsheet containing formulas that extract the data from first one.

I have tried this approach on a (VERY limited project) minimizing Recovery Console:
http://www.911cd.net...o...20983&st=18
and this (small scale) approach is rather handy and does speed up testing considerably.

Maybe if the same or similar approach is used in a "real" program, it could be very useful on larger things like a "full" install, PE builfing or whatever, even .ini files that use this
[Section]
Item=value

:unsure:

I dream about something that looks more like a filesystem (as seen in Explorer "Explore") or as the Registry (as seen in Regedit.exe) with structured tickboxes near "directories" ([Sections]) and "files" (Items)... possibly such an app already exist and I never happened to find it...:blink:

jaclaz

#13
damian666

damian666

    creator of the vistapack

  • Developer
  • 678 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag
hi man, thanx for the heads up.
i am only making this for the first time, so expect a lot of changes and stuff.
i also want to make it a lot more usefull, more entries and stuff...
and about that gui thingy, could you make a mockup for me to show what you mean?
then i can see if i can make it ok?

see you later dude

damian666

edit: btw there is a bug in the last option, to rename the multiboot entry, it doesnt include "" which makes it error out.
will fix next version.

Edited by damian666, 11 February 2008 - 04:44 AM.

Posted Image

#14
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,076 posts
  • OS:none specified
  • Country: Country Flag
I can do better than that, get this Shareware program (one month Trial) which I just found:
INI EDITOR 2001
http://phristov.4mg.com/inieditor.html

Download and screenshot:
http://www.winsite.c...?19000000036985


Direct download :
ftp://ftp.monash.edu.au/pub/winxp/sysutil/INIED2K1.ZIP

And use it to open a (expanded) TXTSETUP.SIF (NOT a compressed TXTSTETUP.SI_) and you'll get what I mean.

If we could have a similar tool that "understands" lines prefixed by ";" and represents them as
"greyed out", plus something like a "related items" window, conceived in such a way that when you select a "key value" it parses its contents and shows other occurrencies of the same "key name" and "key value", we would have, as I see it, the perfect tool to tweak besides .ini, also .inf and .sif files.

Also a "duplicate sections" merger would be needed, since I have found that some sections ARE duplicated:
W:\OFS\TOOLS\wimb>find /n "[SourceDisksFiles]" txtsetup.sif

---------- TXTSETUP.SIF
[189][SourceDisksFiles]
[10817][SourceDisksFiles]
[10849][SourceDisksFiles]
[10890][SourceDisksFiles]
[16251][SourceDisksFiles]

jaclaz

#15
damian666

damian666

    creator of the vistapack

  • Developer
  • 678 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag
thanx man, i will take a look, it can be easely done, what you want with the ";".
thats easy.
i use autoit btw
just that you know, so if it finds a ";" it will grey out the option?
and it will use the noload thingy from gosh to set them?
or is that only for sif files.
we can let the program determine the type of file and then open the right tools for it sort of speak.

what you think?

damian666

btw, can you post me a txtsetupfile.sif here?
i dont have one on me...

Edited by damian666, 11 February 2008 - 06:31 AM.

Posted Image

#16
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,076 posts
  • OS:none specified
  • Country: Country Flag

btw, can you post me a txtsetupfile.sif here?
i dont have one on me...


Here you can find in the attachment a very small one (for RC):
http://www.911cd.net...o...20983&st=18

jaclaz

#17
damian666

damian666

    creator of the vistapack

  • Developer
  • 678 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag
ok man, thanx, i did try te program... i hate shareware!!!
but i did see your point, so tell me .
should i make it for .sif only? which will be easyer.
or a lot of files? like ini inf and stuff?
and, should i take the look of that program and go on from there or make one from scratch?
and some help would be great dude.
i never have wrestled with this stuff so...

damian666
Posted Image

#18
kickarse

kickarse

    the free techie

  • Member
  • PipPip
  • 227 posts
  • OS:XP Pro x86
  • Country: Country Flag
Now if only I could adapt this setupldr.bin to change the hal on a syspreped machine!
http://drop.io/wanderingit -- download DriverGeek (formally DriverForge) and FindHWIDS

#19
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,076 posts
  • OS:none specified
  • Country: Country Flag
@damian666

Actually, .ini, .inf and .sif files present the same "basic" structure, i.e.:

[Section]
Item=value

with just a few minor changes, for example the linked to .ini viewer seems not to "like" items inside double quotes, but I guess that can be easily fixed, in other words, if it will work for .sif files then it will work also for .ini and .inf ones ;).


About helping you, I am afraid I am the latest person on this board with programming knowledge, exception made for a few small batches....

.... but I know AutoIt has a treeview feature, so it should be possible to write this thingie in AutoIt language.

jaclaz

#20
damian666

damian666

    creator of the vistapack

  • Developer
  • 678 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag
well, then i will just try some stuff man.
check back next week or so to see if i ave made a start ok?

see ya

damian666
Posted Image

#21
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,076 posts
  • OS:none specified
  • Country: Country Flag
@all

It seems like the other day was "wish" day on boot-land and Nuno Brito :thumbup has started working on this app, there is already a fully working (but still missing some asked for features) release here, ninf 1.1, enjoy:
http://www.boot-land...?...ic=3960&hl=


@damian666
It seems like there is not anymore need for your work, but thank you very much for your offer to do it :), I am sure I can find some other interesting project for you :whistle: , should you still be willing to write something for the community ;), again, thanks for your kind offer.

jaclaz

#22
damian666

damian666

    creator of the vistapack

  • Developer
  • 678 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag
hi jaclaz, well, ok man, they beat me to it :D
its ok, we will find another project soon!!

thanx for the support and see you around man.

damian666
Posted Image

#23
Arie

Arie

    One Man Army

  • Member
  • PipPipPipPipPip
  • 835 posts
I'm trying to write a batch script which extracts all installation files (I will later change this to only the ones used during the whole installation process) and which changes my TXTSETUP.SIF. So far I've come up with the following, for use with HFSLIP.

HFSLIP_POST_SPEEDUP_ALPHA.CMD
@ECHO OFF

IF NOT DEFINED HFSVER (
	SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
	IF NOT EXIST HFTOOLS CD..
	IF NOT EXIST HFTOOLS\HFSPEEDUP.INI (
		ECHO.&ECHO Please make sure you are running this program
		ECHO from the HFSLIP or the HFSLIP\HFTOOLS folder.
		ECHO Press any key to quit.&PAUSE >NUL&GOTO :EOF
	)
	IF NOT EXIST SOURCESS\I386\TXTSETUP.SIF (
		ECHO.&ECHO Unable to find SOURCESS\I386\TXTSETUP.SIF.
		ECHO Please make sure to run HFSLIP first.
		ECHO Press any key to quit.&PAUSE >NUL&GOTO :EOF
	)
	IF NOT EXIST HFTOOLS\MUNGE.EXE (
		ECHO.&ECHO Unable to find HFTOOLS\MUNGE.EXE.
		ECHO Please verify that the file exists.
		ECHO Press any key to quit.&PAUSE >NUL&GOTO :EOF
	)
	IF EXIST SOURCESS\I386\TXTSETUP.BAK (
		DEL /F/Q SOURCESS\I386\TXTSETUP.BAK
	)
)
IF NOT DEFINED HFSVER CLS
ECHO.&ECHO Expand compressed setup files to speed up boot process...
FOR /F %%I IN ('DIR SOURCESS\I386\*.*_') DO EXPAND -R SOURCESS\I386\%%I
FOR /F %%I IN ('DIR SOURCESS\I386\*.*_') DO DEL /F/Q SOURCESS\I386\%%I
ECHO.&ECHO Do not load unnessary setup files during boot process...
MUNGE HFTOOLS\HFSPEEDUP.INI -i -a SOURCESS\I386\TXTSETUP.SIF
GOTO :EOF
:EOF

HFSPEEDUP.INI
"fat	  = fastfat.sys" "fat	  = fastfat.sys,,noload"
"mps_up		 = halapic.dll" "mps_up		 = halapic.dll,,noload"
"mps_mp		 = halapic.dll" "mps_mp		 = halapic.dll,,noload"
"syspro_mp	  = hal.dll" "syspro_mp	  = hal.dll,,noload"
"cpqarray = cpqarray.sys,4" "cpqarray = cpqarray.sys,4,noload"
"aha154x = aha154x.sys,4" "aha154x = aha154x.sys,4,noload"
"sparrow = sparrow.sys,4" "sparrow = sparrow.sys,4,noload"
"symc810  = symc810.sys,4" "symc810  = symc810.sys,4,noload"
"aic78xx  = aic78xx.sys,4" "aic78xx  = aic78xx.sys,4,noload"
"i2omp = i2omp.sys,4" "i2omp = i2omp.sys,4,noload"
"dac960nt = dac960nt.sys,4" "dac960nt = dac960nt.sys,4,noload"
"ql10wnt = ql10wnt.sys,4" "ql10wnt = ql10wnt.sys,4,noload"
"amsint = amsint.sys,4" "amsint = amsint.sys,4,noload"
"asc = asc.sys,4" "asc = asc.sys,4,noload"
"asc3550 = asc3550.sys,4" "asc3550 = asc3550.sys,4,noload"
"mraid35x = mraid35x.sys,4" "mraid35x = mraid35x.sys,4,noload"
"ini910u = ini910u.sys,4" "ini910u = ini910u.sys,4,noload"
"ql1240 = ql1240.sys,4" "ql1240 = ql1240.sys,4,noload"
"aic78u2  = aic78u2.sys,4" "aic78u2  = aic78u2.sys,4,noload"
"symc8xx  = symc8xx.sys,4" "symc8xx  = symc8xx.sys,4,noload"
"sym_hi  = sym_hi.sys,4" "sym_hi  = sym_hi.sys,4,noload"
"sym_u3  = sym_u3.sys,4" "sym_u3  = sym_u3.sys,4,noload"
"asc3350p = asc3350p.sys,4" "asc3350p = asc3350p.sys,4,noload"
"abp480n5 = abp480n5.sys,4" "abp480n5 = abp480n5.sys,4,noload"
"cd20xrnt = cd20xrnt.sys,4" "cd20xrnt = cd20xrnt.sys,4,noload"
"ultra = ultra.sys,4" "ultra = ultra.sys,4,noload"
"adpu160m = adpu160m.sys,4" "adpu160m = adpu160m.sys,4,noload"
"dpti2o = dpti2o.sys,4" "dpti2o = dpti2o.sys,4,noload"
"ql1080 = ql1080.sys,4" "ql1080 = ql1080.sys,4,noload"
"ql1280 = ql1280.sys,4" "ql1280 = ql1280.sys,4,noload"
"ql12160 = ql12160.sys,4" "ql12160 = ql12160.sys,4,noload"
"perc2 = perc2.sys,4" "perc2 = perc2.sys,4,noload"
"hpn = hpn.sys,4" "hpn = hpn.sys,4,noload"
"cbidf2k = cbidf2k.sys,4" "cbidf2k = cbidf2k.sys,4,noload"
"dac2w2k = dac2w2k.sys,4" "dac2w2k = dac2w2k.sys,4,noload"
"toside   = toside.sys" "toside   = toside.sys,,noload"
"lbrtfdc  = lbrtfdc.sys" "lbrtfdc  = lbrtfdc.sys,,noload"
"floppy = sfloppy.sys" "floppy = sfloppy.sys,,noload"

The problem is that the expand section in the batch script doesn't work. I'm doing something wrong, probably something stupid even, but I can't figure out what. The second problem is that the MUNGE command doesn't quite work; it stops half way through, so it doesn't change all my entries above and another thing is that it changes something like "floppy = sfloppy.sys,blah,blah" to "floppy = sfloppy.sys,,noload,blah,blah", whereas it should only change the exact sentence "floppy = sfloppy.sys" to "floppy = sfloppy.sys,,noload".

Stuck here, so I hope that someone can help me on my way again a bit.
Not trying to pretend the enemy that I am.

#24
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,530 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

First of all I'd suggest you at least try using the /b switch with your dir command.

<Edit>
Also I hope you realise that if any file fails to correctly expand it would be deleted in the next step!

@ECHO OFFIF NOT DEFINED HFSVER (	IF NOT EXIST HFTOOLS CD..	IF NOT EXIST HFTOOLS\HFSPEEDUP.INI (		ECHO.&ECHO Please make sure you are running this program		ECHO from the HFSLIP or the HFSLIP\HFTOOLS folder.		ECHO Press any key to quit.&PAUSE >NUL&GOTO :EOF)	IF NOT EXIST SOURCESS\I386\TXTSETUP.SIF (		ECHO.&ECHO Unable to find SOURCESS\I386\TXTSETUP.SIF.		ECHO Please make sure to run HFSLIP first.		ECHO Press any key to quit.&PAUSE >NUL&GOTO :EOF)	IF NOT EXIST HFTOOLS\MUNGE.EXE (		ECHO.&ECHO Unable to find HFTOOLS\MUNGE.EXE.		ECHO Please verify that the file exists.		ECHO Press any key to quit.&PAUSE >NUL&GOTO :EOF)	IF EXIST SOURCESS\I386\TXTSETUP.BAK (		DEL/F SOURCESS\I386\TXTSETUP.BAK)	CLS)ECHO.&ECHO Expand compressed setup files to speed up boot process...PUSHD SOURCESS\I386FOR /F %%I IN ('DIR/B/A-D *_') DO (	EXPAND -R %%I>NUL 2>&1&&DEL/F %%I)POPD<snip>

</Edit>

#25
Arie

Arie

    One Man Army

  • Member
  • PipPipPipPipPip
  • 835 posts

First of all I'd suggest you at least try using the /b switch with your dir command.

Thank you, forgot all about that :blushing:

<Edit>
Also I hope you realise that if any file fails to correctly expand it would be deleted in the next step!

@ECHO OFFIF NOT DEFINED HFSVER (	IF NOT EXIST HFTOOLS CD..	IF NOT EXIST HFTOOLS\HFSPEEDUP.INI (		ECHO.&ECHO Please make sure you are running this program		ECHO from the HFSLIP or the HFSLIP\HFTOOLS folder.		ECHO Press any key to quit.&PAUSE >NUL&GOTO :EOF)	IF NOT EXIST SOURCESS\I386\TXTSETUP.SIF (		ECHO.&ECHO Unable to find SOURCESS\I386\TXTSETUP.SIF.		ECHO Please make sure to run HFSLIP first.		ECHO Press any key to quit.&PAUSE >NUL&GOTO :EOF)	IF NOT EXIST HFTOOLS\MUNGE.EXE (		ECHO.&ECHO Unable to find HFTOOLS\MUNGE.EXE.		ECHO Please verify that the file exists.		ECHO Press any key to quit.&PAUSE >NUL&GOTO :EOF)	IF EXIST SOURCESS\I386\TXTSETUP.BAK (		DEL/F SOURCESS\I386\TXTSETUP.BAK)	CLS)ECHO.&ECHO Expand compressed setup files to speed up boot process...PUSHD SOURCESS\I386FOR /F %%I IN ('DIR/B/A-D *_') DO (	EXPAND -R %%I>NUL 2>&1&&DEL/F %%I)POPD<snip>

</Edit>

I thought about it, yes, but didn't know how to solve it. Thank you for pointing it out and for posting a solution :)

My current code is as follows, but it now lacks the part which is supposed to change the TXTSETUP.SIF file. I don't know how to change certain strings in that file automatically. Do you have any idea how I can do this? MUNGE.EXE doesn't seem to be a good solution unfortunately.
@ECHO OFF
IF NOT DEFINED HFSVER (
	SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
	IF NOT EXIST HFTOOLS CD..
	IF NOT EXIST SOURCESS\I386\TXTSETUP.SIF (
		ECHO.&ECHO Unable to find SOURCESS\I386\TXTSETUP.SIF.
		ECHO Please make sure to run HFSLIP first.
		ECHO Press any key to quit.&PAUSE >NUL&GOTO :EOF
	)
)
IF NOT DEFINED HFSVER CLS
ECHO.&ECHO Expanding compressed setup files to speed up boot process...
PUSHD SOURCESS\I386
FOR /F %%I IN ('DIR/B/A-D *_') DO (
  EXPAND -R %%I>NUL 2>&1&&DEL /F/Q %%I)
POPD
GOTO :EOF
:EOF

Not trying to pretend the enemy that I am.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN