Jump to content

how can i change the boot drive letter ( BartPE +xpe)


lyh728

Recommended Posts


Well acctually you can't

it's hardcoded in the code according to MS

Correct.

You would have to Hack it to change it.

Some advice... Change all your hard coded drive letter values to %SYSTEMDRIVE% instead. Then you never have to worry about it.

Chris

i know %SYSTEMDRIVE%, if pe run from cdrom , X: will be ok

but i like to put winpe on the harddisk

when pe start , the original c: will be x:

original d: be c: now

can u tell me x: hardcoded in which file? i guess it is in ntoskrnl.exe, but i can not find that

Link to comment
Share on other sites

Well acctually you can't

it's hardcoded in the code according to MS

Correct.

You would have to Hack it to change it.

Some advice... Change all your hard coded drive letter values to %SYSTEMDRIVE% instead. Then you never have to worry about it.

Chris

Actually, I was just about to start a topic on this very subj. As I read the msgs in the thread, it suddenly dawned on me how to do this. One needs a batch script to boot the WINNT32 installer and in the batch script, one needs to change the SYSTEMDRIVE environment variable to the drive where the XP installation directory is. I'm not sure if this will work (probably will have to redefine SYSTEMDRIVE prior to booting WINNT32 and put it back to its original def after WINNT32 exits.) However, you'd have to change the SYSTEMDRIVE def via the registry, bec trying to change it using a simple scripted env variable (via the SET cmd) won't work. HTH....Jet

Link to comment
Share on other sites

If i get your basic problem right. It is that you need to know where your original c: drive went?

I can think of a few ways to handle this.

The simplest one is to use a %targetdrive% in your scripts or whatever. In your startup script you will have to check if ofr example c:\boot.ini exists. If it does targetdrive should be set to c: if it doesn't check for x:\boot.ini if that exists. If that exists set targetdrive to X.

Link to comment
Share on other sites

  • 1 month later...
If i get your basic problem right. It is that you need to know where your original c: drive went?

I can think of a few ways to handle this.

The simplest one is to use a %targetdrive% in your scripts or whatever. In your startup script you will have to check if ofr example c:\boot.ini exists. If it does targetdrive should be set to c: if it doesn't check for x:\boot.ini if that exists. If that exists set targetdrive to X.

i just want to harddisk driver layout as normal

i write a script , change the driver layout as xp sp1

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...