Jump to content

Forcing system drive letter to C:/


jbuzzard

Recommended Posts

hi guys,

Seems that when installing from a slipstreamed nlite cd, the drive letter comes out random. I'm wondering whether there is a feature, or whether a feature could be included, to force the system to place the system drive letter as C:.

A minor thing, i know, but it does cause some problems when trying to install badly written programs.

Cheers

Link to comment
Share on other sites


It is possible to exactly define the drive letters before the Windows XP installation.

It is possible to choose your drive letters without such silly things as removing hard drives or deleting partitions.

It is even possible to put "Program Files" and "Documents and Settings" on different physical drives so Windows runs faster.

See the solution outlined at the link below:

http://www.msfn.org/board/profiles-directo...me-t125819.html

Edited by zomos
Link to comment
Share on other sites

It is possible to exactly define the drive letters before the Windows XP installation.

It is possible to choose your drive letters without such silly things as removing hard drives or deleting partitions.

It is even possible to put "Program Files" and "Documents and Settings" on different physical drives so Windows runs faster.

See the solution outlined at the link below:

http://www.msfn.org/board/profiles-directo...me-t125819.html

Many years ago i used to change the location of documents and settings, all inclusive local system service /network / all accounts.

However just 4-5 years ago i no longer noticed any benefit to this approach. It is also not as easy as you seem to think it is IF one dont like to have D:\ or whatever partition letter windows setup will create for that partition. It IS also dependent on the harddrives order connecting.

While a solution can always be put forth manual and has been an option since forever, what you write of is nothing new at all.

Link to comment
Share on other sites

It is possible to choose your drive letters without such silly things as removing hard drives or deleting partitions.

sometimes if you have multiple hard drives in the machine (and usb sticks) the usb sticks will try and take the C: and D:, meaning you install to E: on a hard drive..

Link to comment
Share on other sites

The drive letter ordering IS NOT DEPENDENT on the "harddrives order connecting" with my method.

Windows uses partition signatures to assign drive leters.

Drive and Partition order just does not matter for letter assignment because migrate.inf persistently overrides the default values proposed by Windows.

The utility I had written to generate migrate.inf copies the current drive assignments WHATEVER THEY ARE set to in the PE (including USB drives).

These assignemts in migrate.inf are later used by the text mode setup, REGARDLESS of "harddrives order connecting".

If the "Program Files" and "Documents And Settings" are on a different physical drives Windows will run much faster because the I/O can be done in parallel on multiple physical drives.

The same statement is not true for different partition on the same physical drive.

Apparently you had not read the outline of my method nor tried it.

Zomos

It is also not as easy as you seem to think it is IF one dont like to have D:\ or whatever partition letter windows setup will create for that partition. It IS also dependent on the harddrives order connecting.
Link to comment
Share on other sites

Yes, I wrote it.

No, MkMigrateInf.cmd nor MkMigrateInf2.cmd did not work for me because:

1) It does not produce a full migrate.inf with all the current drive assignments

2) It does not handle backslashes correctly

3) It does not wrap the lines for long values like in a real migrate.inf

4) It produces invalid migrate.inf file if there are non REG_BINARY values in the registry (as with some RAID systems)

5) It uses REG.EXE that does not work without LSASS - when nobody is loged on (e.g.: PicoXP)

On the cosmetic side: MakeMigrateInf.exe is smaller and faster than Reg.exe + MkMigrateInf.cmd and there is only one file to distrubute.

When I enable the command line parsing, MkMigrateInf.exe can be renamed to Reg2Inf.exe and used to export any Registry Key as an *.inf file ( in INF format ).

That was its primary purpose to start with.

Zomos

P.S.

Reg.exe cannot export from registry in INF format.

Did you write the MkMigrateInf.exe?

Why?

Edited by zomos
Link to comment
Share on other sites

Thanks for clarification. :)

1) It does not produce a full migrate.inf with all the current drive assignments

Sure, it is designed to do just one drive.

2) It does not handle backslashes correctly

Can you please give an example?

3) It does not wrap the lines for long values like in a real migrate.inf

But does this create a problem or is it only a "look" problem? :unsure:

4) It produces invalid migrate.inf file if there are non REG_BINARY values in the registry (as with some RAID systems)

Didn't know that, thanks for the heads up. :)

5) It uses REG.EXE that does not work without LSASS - when nobody is loged on (e.g.: PicoXP)

Good point ! :thumbup

Now it comes to the request part ;).

Can we have in the future a version that accepts command line parameters like:

MkMigrateInf.exe /Drives=C:

that only creates the .inf for C:\

MkMigrateInf.exe /Drives=C:;D:;K:

that creates the .inf for given Drive letters

:unsure:

Can I assume that your .exe is (and will be in next versions) freely redistributable?

It would be nice if we could add it, once the needed feature has been implemented, to the "Install XP from USB" routine. B)

jaclaz

Link to comment
Share on other sites

Maybe, but please convince me that this cannot be done by:

1) First setting the drive letters with MMC/Disk Management

2) Next generating a migrate.inf file based on settings made in pt.1.

After all, with Disk Management, you can remove drive letters and even add letters to partitions that do not have any letters assigned.

Can we have in the future a version that accepts command line parameters like:

MkMigrateInf.exe /Drives=C:;D:;K:

Edited by zomos
Link to comment
Share on other sites

Well, actually the only thing for which migrate.inf is used in the "Install XP from USB" is to be able to assign a letter to the USB stick.

This is the only feature needed (making the migrate.inf for a single drive letter) to replace the .cmd.

But it might be an idea to add in the future the possibility to also add a given drive letter, say E: (instead of C:) for the First Primary Partition of target system, or however be "free" of assigning drive letters at will or for future, at the moment not thinked about, use. :unsure:

In other words, if it's easy to implement multiple letters, do it, it may come handy, if it's in any way difficult or complex, forget about it. :)

jaclaz

Link to comment
Share on other sites

I can do it but the problem I see is how do you want me to identify disks/partitions that do not have any letters assigned ?

A hard disk can have partitions without drive letters and so can a USB disk.

If you want to help me, search the net how to enumerate all of the physical disks attached to the system in User Mode and without WMI (note: I am not interested in enumerating partitions).

Below is an example how to do it in Kernel Mode, but I prefer not to load any drivers to accomplish such simple task.

Enumerating device objects representing disks and partitions

Edited by zomos
Link to comment
Share on other sites

I can do it but the problem I see is how do you want me to identify disks/partitions that do not have any letters assigned ?

A hard disk can have partitions without drive letters and so can a USB disk.

Sure, but I don't see the problem, I mean, let's assume that when one runs your programs has assigned drive letters at least to the drives for which he/she wants an entry in migrate.inf

If you want to help me, search the net how to enumerate all of the physical disks attached to the system in User Mode and without WMI (note: I am not interested in enumerating partitions).

Below is an example how to do it in Kernel Mode, but I prefer not to load any drivers to accomplish such simple task.

Enumerating device objects representing disks and partitions

I would like to , but when it comes to programming, you're taking me out of my field of competence.

There must be systems, however.

There is a current thread with similar (though not migrate.inf related) contents here:

http://www.msfn.org/board/index.php?showtopic=124539&hl=

particularly, see here:

http://www.msfn.org/board/compatible-batch....html&st=22

the John Newbigin version of "dd for windows" has a --list parameter that lists drives very well, though cannot say WHAT it uses.

Sample output:

dd --list>list.txt 2>&1

rawwrite dd for windows version 0.5.
Written by John Newbigin <jn@it.swin.edu.au>
This program is covered by the GPL. See copying.txt for details
Win32 Available Volume Information
\\.\Volume{b0b284c3-8a33-11dd-8781-806d6172696f}\
link to \\?\Device\HarddiskVolume1
fixed media
Mounted on \\.\c:

\\.\Volume{b0b284c4-8a33-11dd-8781-806d6172696f}\
link to \\?\Device\HarddiskVolume2
fixed media
Mounted on \\.\e:

\\.\Volume{80cf88c2-8a34-11dd-813c-806d6172696f}\
link to \\?\Device\CdRom0
CD-ROM
Mounted on \\.\d:

\\.\Volume{5d3e8800-9c1f-11dd-8148-001fc6bb76ce}\
link to \\?\Device\Harddisk2\DP(1)0-0+5
removeable media
Mounted on \\.\r:

\\.\Volume{80cf88c3-8a34-11dd-813c-806d6172696f}\
link to \\?\Device\Harddisk4\DP(1)0-0+f
removeable media
Mounted on \\.\n:

\\.\Volume{80cf88c4-8a34-11dd-813c-806d6172696f}\
link to \\?\Device\Harddisk5\DP(1)0-0+10
removeable media
Mounted on \\.\g:

\\.\Volume{80cf88c5-8a34-11dd-813c-806d6172696f}\
link to \\?\Device\Harddisk6\DP(1)0-0+11
removeable media
Mounted on \\.\h:

\\.\Volume{80cf88c6-8a34-11dd-813c-806d6172696f}\
link to \\?\Device\Harddisk7\DP(1)0-0+12
removeable media
Mounted on \\.\i:

\\.\Volume{98f06d4c-9506-11dd-8147-001fc6bb76ce}\
link to \\?\Device\HarddiskVolume3
fixed media
Mounted on \\.\j:

\\.\Volume{98f06d4d-9506-11dd-8147-001fc6bb76ce}\
link to \\?\Device\HarddiskVolume4
fixed media
Mounted on \\.\k:

\\.\Volume{98f06d4e-9506-11dd-8147-001fc6bb76ce}\
link to \\?\Device\HarddiskVolume5
fixed media
Mounted on \\.\l:

\\.\Volume{98f06d4f-9506-11dd-8147-001fc6bb76ce}\
link to \\?\Device\HarddiskVolume6
fixed media
Mounted on \\.\m:


NT Block Device Objects
\\?\Device\CdRom0
size is 403259392 bytes
\\?\Device\Harddisk0\Partition0
link to \\?\Device\Harddisk0\DR0
Fixed hard disk media. Block size = 512
size is 320072933376 bytes
\\?\Device\Harddisk0\Partition1
link to \\?\Device\HarddiskVolume1
\\?\Device\Harddisk1\Partition0
link to \\?\Device\Harddisk1\DR1
Fixed hard disk media. Block size = 512
size is 320072933376 bytes
\\?\Device\Harddisk1\Partition1
link to \\?\Device\HarddiskVolume2
Fixed hard disk media. Block size = 512
size is 320062063104 bytes
\\?\Device\Harddisk2\Partition0
link to \\?\Device\Harddisk2\DR4
Removable media other than floppy. Block size = 512
size is 134217728 bytes
\\?\Device\Harddisk2\Partition1
link to \\?\Device\Harddisk2\DP(1)0-0+5
Removable media other than floppy. Block size = 512
size is 98671104 bytes
\\?\Device\Harddisk3\Partition0
link to \\?\Device\Harddisk3\DR6
Fixed hard disk media. Block size = 512
size is 320072933376 bytes
\\?\Device\Harddisk3\Partition1
link to \\?\Device\HarddiskVolume3
Fixed hard disk media. Block size = 512
size is 2097414144 bytes
\\?\Device\Harddisk3\Partition2
link to \\?\Device\HarddiskVolume4
\\?\Device\Harddisk3\Partition3
link to \\?\Device\HarddiskVolume5
\\?\Device\Harddisk3\Partition4
link to \\?\Device\HarddiskVolume6
Fixed hard disk media. Block size = 512
size is 41940670464 bytes
\\?\Device\Harddisk4\Partition0
link to \\?\Device\Harddisk4\DR7
\\?\Device\Harddisk4\Partition1
link to \\?\Device\Harddisk4\DP(1)0-0+f
\\?\Device\Harddisk5\Partition0
link to \\?\Device\Harddisk5\DR8
\\?\Device\Harddisk5\Partition1
link to \\?\Device\Harddisk5\DP(1)0-0+10
\\?\Device\Harddisk6\Partition0
link to \\?\Device\Harddisk6\DR9
\\?\Device\Harddisk6\Partition1
link to \\?\Device\Harddisk6\DP(1)0-0+11
\\?\Device\Harddisk7\Partition0
link to \\?\Device\Harddisk7\DR10
\\?\Device\Harddisk7\Partition1
link to \\?\Device\Harddisk7\DP(1)0-0+12

Virtual input devices
/dev/zero (null data)
/dev/random (pseudo-random data)
- (standard input)

Virtual output devices
- (standard output)

Since it is Open Source, you may get some ideas from it's code. :unsure:

jaclaz

Link to comment
Share on other sites

Apparently you had not read the outline of my method nor tried it.

no i haven't i was just saying the default windows behaviour incase it helps save someone else some ball-ache :)

-which in this thread's case is the 'easiest' reply for the thread starter, and anyone that doesn't want to fiddle

Edited by bledd
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...