Creating an Unattended Install folder on the Hardrive

S

Stephen Wright

I want to create an unattended installation folder on my harddrive that I
can
simply run from DOS whenever I need to reinstall Windows XP. I have followed
the instructions in all the documentation supplied by Microsoft carefully
and
I have tried both the "install from CD" option and the "create a
distribution
folder" option, but neither one works.

When I try to create a distribution folder setupmgr creates the folder then
promptly deletes it before closing. Yes, I can get it back using software
that can recover deleted files, but I shouldn't have to and I can't be sure
that everything is right with this as this very strange behaviour. I can
only think that I am running into some kind of undocumented copy protection
scheme, because I have only a single user licence. So I have given up for
the
time being on creating a distribution folder. I guess it probably isn't
necessary in my case.

So then I create the unattend file using the Install from CD option and then
make a few manual changes. Here is my unattend file at present:

;SetupMgrTag
[Data]
AutoPartition=0
MsDosInitiated="0" Tried "1" here too, but it didn't change anything.
UnattendedInstall="Yes"
[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=No
TargetPath=\WINDOWS
[GuiUnattended]
AdminPassword=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
EncryptedAdminPassword=Yes
AutoLogon=Yes
AutoLogonCount=10
OEMSkipRegional=0
TimeZone=150
OemSkipWelcome=1
[UserData]
ProductID=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
FullName="Any User"
OrgName="None"
ComputerName=ROOM16
[Display]
BitsPerPel=32
Xresolution=1024
YResolution=768
Vrefresh=85
[RegionalSettings]
LanguageGroup=1
SystemLocale=00000409
UserLocale=00000809
InputLocale=0409:00000409
[Branding]
BrandIEUsingUnattended=Yes
[Proxy]
Proxy_Enable=0
Use_Same_Proxy=1
[Identification]
JoinWorkgroup=MSHOME
[Networking]
InstallDefaultComponents=Yes
[SetupMgr]
DistFolder=C:\WinXPsp1

This files is named Unattend.txt and it is place in the i386 folder. that I
have copied to my harddrive and renamed WinXPsp1. If I start the windows
installation by running setup.exe that is located in the root of the CD even
when the files are all copied to a folder on my hard drive or I boot from
the
CD there is no problem and the Unattend.txt file that is located in the i386
folder is followed. But when I try to boot into DOS and run winnt then I
just get a lot of errors stating that setup was unable to copy such and
such a file: retry, ignore, or quit setup.Why can't I can't I successfully
run setup from dos using Winnt.exe? And one other question that is sure to
show my limited understanding of DOS - How can I see all the command line
options for a DOS executable using the /? switch when the list of command
line options is longer than one screen, such as for winnt.ext? The list just
flies by and one sees only the last page. I have tried to find some other
switch or something. This is most frustrating.

My command line to start the installation is: winnt /s:C:\WinXPsp1
/u:C:\WinXPsp1\unattend.txt

I have my harddrive partitioned with a 2 GB FAT32 primary partition and 3,
38 GB NTFS partitions. I want to be able to chose the installation directory
at the beginning of GUI mode setup. as I am unable to see the NTFS portions
in DOS of course. I am booting from a basic Windows XP DOS boot disk.

I am going through the instructions on the third party sites that I have
found references to on this forum, but none of them have anything to say
about this type of installation. They only discuss installation form a
server over a network or installation from a CD. Why can't my own hard drive
be the server?

Thank you everyone for any help you have to offer.
 
S

Stephen Wright

Oh, not even a comment. Well, either no one knows the aswer to my questions.
I find this unlikely. Maybe I have touched on an unspeakable subject, such
as attempting to violate the MS user agreement in some way. I don't think I
am, but then i have of course read it carefully. Please inform me. I can't
immagine that no one else has tried to do what I am trying to do. Help would
be greatly appreciated. If I am deemed to be beyond help also please inform
me. I am sure I will get to the bottom of this evenually, but sooner rather
than latter would be nice.

Stephen Wright said:
I want to create an unattended installation folder on my harddrive that I
can
simply run from DOS whenever I need to reinstall Windows XP. I have
followed
the instructions in all the documentation supplied by Microsoft carefully
and
I have tried both the "install from CD" option and the "create a
distribution
folder" option, but neither one works.

When I try to create a distribution folder setupmgr creates the folder
then
promptly deletes it before closing. Yes, I can get it back using software
that can recover deleted files, but I shouldn't have to and I can't be
sure
that everything is right with this as this very strange behaviour. I can
only think that I am running into some kind of undocumented copy
protection
scheme, because I have only a single user licence. So I have given up for
the
time being on creating a distribution folder. I guess it probably isn't
necessary in my case.

So then I create the unattend file using the Install from CD option and
then
make a few manual changes. Here is my unattend file at present:

;SetupMgrTag
[Data]
AutoPartition=0
MsDosInitiated="0" Tried "1" here too, but it didn't change anything.
UnattendedInstall="Yes"
[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=No
TargetPath=\WINDOWS
[GuiUnattended]
AdminPassword=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
EncryptedAdminPassword=Yes
AutoLogon=Yes
AutoLogonCount=10
OEMSkipRegional=0
TimeZone=150
OemSkipWelcome=1
[UserData]
ProductID=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
FullName="Any User"
OrgName="None"
ComputerName=ROOM16
[Display]
BitsPerPel=32
Xresolution=1024
YResolution=768
Vrefresh=85
[RegionalSettings]
LanguageGroup=1
SystemLocale=00000409
UserLocale=00000809
InputLocale=0409:00000409
[Branding]
BrandIEUsingUnattended=Yes
[Proxy]
Proxy_Enable=0
Use_Same_Proxy=1
[Identification]
JoinWorkgroup=MSHOME
[Networking]
InstallDefaultComponents=Yes
[SetupMgr]
DistFolder=C:\WinXPsp1

This files is named Unattend.txt and it is place in the i386 folder. that
I
have copied to my harddrive and renamed WinXPsp1. If I start the windows
installation by running setup.exe that is located in the root of the CD
even
when the files are all copied to a folder on my hard drive or I boot from
the
CD there is no problem and the Unattend.txt file that is located in the
i386
folder is followed. But when I try to boot into DOS and run winnt then I
just get a lot of errors stating that setup was unable to copy such and
such a file: retry, ignore, or quit setup.Why can't I can't I successfully
run setup from dos using Winnt.exe? And one other question that is sure to
show my limited understanding of DOS - How can I see all the command line
options for a DOS executable using the /? switch when the list of command
line options is longer than one screen, such as for winnt.ext? The list
just flies by and one sees only the last page. I have tried to find some
other switch or something. This is most frustrating.

My command line to start the installation is: winnt /s:C:\WinXPsp1
/u:C:\WinXPsp1\unattend.txt

I have my harddrive partitioned with a 2 GB FAT32 primary partition and 3,
38 GB NTFS partitions. I want to be able to chose the installation
directory at the beginning of GUI mode setup. as I am unable to see the
NTFS portions in DOS of course. I am booting from a basic Windows XP DOS
boot disk.

I am going through the instructions on the third party sites that I have
found references to on this forum, but none of them have anything to say
about this type of installation. They only discuss installation form a
server over a network or installation from a CD. Why can't my own hard
drive be the server?

Thank you everyone for any help you have to offer.
 
P

Patrick J. LoPresti

Stephen Wright said:
Oh, not even a comment. Well, either no one knows the aswer to my
questions. I find this unlikely. Maybe I have touched on an
unspeakable subject, such as attempting to violate the MS user
agreement in some way.

Most people have no desire to do what you are trying to do. Copying
the installation media to your hard drive is inferior to using a
CD-ROM or a network install in almost every way. For example, what
happens when your hard drive fails? What happens when you get a new
machine?
So then I create the unattend file using the Install from CD
option and then make a few manual changes. Here is my unattend
file at present:

;SetupMgrTag
[Data]
AutoPartition=0
MsDosInitiated="0" Tried "1" here too, but it didn't change anything.

"0" is definitely what you want.
UnattendedInstall="Yes"
[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=No

If you need to add third-party drivers ($OEM$ mechanism), you will
need to set OemPreinstall=Yes. Should work without it, though.

\WINDOWS is the default for TargetPath, so I would just omit it.
[SetupMgr]
DistFolder=C:\WinXPsp1

I do not know what this setting does, which means I can guarantee you
do not need it here.

Please be more specific. What is the error message, precisely? Which
file? What error number, if any? Does this error happen instantly,
or after some files have been copied, or after all of the files have
been copied and the machine reboots the first time?

What does "dir \winxpsp1\winnt.exe" say?

"winnt /? | more" should do the trick, assuming you have a copy of
"more.exe" in your path.

Since DOS can only see the FAT32 partition, this means your
SystemDrive is 2 GB and always will be.

winnt.exe begins by making a full copy of the installation media on
the target drive. (Remember that it is intended for use with CD-ROM
or, more commonly, network installs.) Then it uses that copy to
install the system, then finally deletes the copy. So you need enough
space to hold THREE copies of Windows, and I doubt 2 GB is going to
cut it.

I do not think this unattend.txt file is going to do that, since you
specified a TargetPath and UnattendMode=FullUnattended. You probably
want UnattendMode=DefaultHide and... Well, I am not sure how to make
it prompt for the installation directory, since TargetPath normally
defaults to \WINDOWS for an unattended install.

It can be, in theory.

Have you tried just running "winnt.exe /s:..." without specifying an
unattend.txt file?

- Pat
 
S

Stephen Wright

Thank you very much for taking time to reply.

Patrick J. LoPresti said:
Most people have no desire to do what you are trying to do. Copying
the installation media to your hard drive is inferior to using a
CD-ROM or a network install in almost every way. For example, what
happens when your hard drive fails? What happens when you get a new
machine?

Well, if I have it on my hard drive I don't have to find the CD and I have
found that hard drives don't fail as often as CD's. If fact I have never had
a hard drive fail, but I have a backup on another hard drive. It will also
install faster from the hard drive. If I get a new machine I will move my
hard drive to the new machine. I wish to avoid creating CD-R's that will
probably be out of date in a few months. As for a network install I must
have another computer and set up network drivers in DOS. Also how about
being able to test an unattended install before burning it to disk without
using software like "Virtual PC" and "Virtual Drive"?
So then I create the unattend file using the Install from CD
option and then make a few manual changes. Here is my unattend
file at present:

;SetupMgrTag
[Data]
AutoPartition=0
MsDosInitiated="0" Tried "1" here too, but it didn't change
anything.

"0" is definitely what you want.

Thanks, I saw Microsoft's documentation that says setup will fail at the
beginning of GUI setup mode if this is not "0".
UnattendedInstall="Yes"
[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=No

If you need to add third-party drivers ($OEM$ mechanism), you will
need to set OemPreinstall=Yes. Should work without it, though.

\WINDOWS is the default for TargetPath, so I would just omit it.
[SetupMgr]
DistFolder=C:\WinXPsp1

I do not know what this setting does, which means I can guarantee you
do not need it here.

This entry was added by SetupMgr when I sellected "Yes, create or modify a
distribution folder".
Please be more specific. What is the error message, precisely? Which
file? What error number, if any? Does this error happen instantly,
or after some files have been copied, or after all of the files have
been copied and the machine reboots the first time?

It happens right away, don't actually copy any files at all. The names
mentioned are the main boot files for Windows XP.

What does "dir \winxpsp1\winnt.exe" say?


Well, it lists the file (winnt.exe), size, date, etc. as expected.

03/04/2003 09:21 84,939 WINNT.EXE
1 File(s) 84,939 bytes
0 Dir(s) 13,217,341,440 bytes free
"winnt /? | more" should do the trick, assuming you have a copy of
"more.exe" in your path.

Ah! thanks a bunch, should have thought of that!
Since DOS can only see the FAT32 partition, this means your
SystemDrive is 2 GB and always will be.

winnt.exe begins by making a full copy of the installation media on
the target drive. (Remember that it is intended for use with CD-ROM
or, more commonly, network installs.) Then it uses that copy to
install the system, then finally deletes the copy. So you need enough
space to hold THREE copies of Windows, and I doubt 2 GB is going to
cut it.

It will. Each one is not more than 500 MB. But I want to choose the install
partition like when Windows setup is run from Windows. When I run setup from
Windows I choose not to upgrade then advanced options and put a check mark
in the box that says "Allow me to choose the install partition" I just want
to be able to do this from DOS. So I can run set up on a computer that
doesn't already have Windows installed and to get around problems like I
have at present. I have the SP2 Beta installed, and I want to install the
SP1 but when I run SP1 from Windows it doesn't allow me to choose not to
upgrade like it normally would. It just states that Windows XP SP1 is
incompatible with the version of Windows currently installed on my system
and then exits.
I do not think this unattend.txt file is going to do that, since you
specified a TargetPath and UnattendMode=FullUnattended. You probably
want UnattendMode=DefaultHide and... Well, I am not sure how to make
it prompt for the installation directory, since TargetPath normally
defaults to \WINDOWS for an unattended install.

Okay, I'll check on this unattend mode. Sorry, I meant to say installation
"partition", not "directory".
It can be, in theory.

Okay, well thanks for all your comments. It seems that I am not to far off
and it is just that this isn't commonly done. I keep all my other programs
on hard drive and I just want to do the same with Windows. I will persist.
But I notice that you have not responded to my questions about the problem
of the network distribution folder being created and then deleted by
SetupMgr.
 
P

Patrick J. LoPresti

Stephen Wright said:
[SetupMgr]
DistFolder=C:\WinXPsp1

I do not know what this setting does, which means I can guarantee you
do not need it here.

This entry was added by SetupMgr when I sellected "Yes, create or modify a
distribution folder".

I have never used SetupMgr. I just copy the i386 directory from the
Windows CD and create the unattend.txt file by hand.

It should not matter; the [SetupMgr] section has no effect on the
unattended installation, according to:

http://www.microsoft.com/resources/.../2003/all/techref/en-us/w2k3tr_r_setupmgr.asp
It happens right away, don't actually copy any files at all. The
names mentioned are the main boot files for Windows XP.

With no error code at all? That is odd.
It will. Each one is not more than 500 MB.

They take more on a FAT partition than they do on CD or NTFS. A 2G
FAT partition has a 32k cluster size, so the on-disk space taken by
each file gets rounded up to a multiple of 32k. With thousands of
files, it adds up.

Still, it should not fail until the drive fills up...
But I want to choose the install partition like when Windows setup
is run from Windows. When I run setup from Windows I choose not to
upgrade then advanced options and put a check mark in the box that
says "Allow me to choose the install partition" I just want to be
able to do this from DOS.

You can't. From DOS, you must install onto a FAT partition and then
specify "FileSystem=ConvertNTFS" in your unattend.txt file. You
cannot install onto an NTFS partition directly.

As far as I know, anyway.
But I notice that you have not responded to my questions about the
problem of the network distribution folder being created and then
deleted by SetupMgr.

That is because I have never used SetupMgr :).

- Pat
http://unattended.sourceforge.net/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top