Easier way to install XP in a non-default directory?

Discussion in 'other software & services' started by Devinco, Jul 30, 2004.

Thread Status:
Not open for further replies.
  1. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    Hi Everyone,

    As shown on one of the TDS-3 tips of the day, it is a good idea to install windows in a non-default directory (not c:\windows) because many malware are hard coded for c:\windows. After much searching, I finally found that in order to install it to a different directory (on a clean hard drive), I would first have to install it into the default directory (c:\windows). Then run setup again from windows this time, and select the advanced install option. After installing it again, I would delete the duplicate directory (c:\windows).

    Is there an easier way to do this without having to install it twice?
     
  2. Close_Hauled

    Close_Hauled Registered Member

    Joined:
    Apr 24, 2004
    Posts:
    1,015
    Location:
    California
    You do not have to install it twice, just once. Tell it where the first time.

    What I would like to know is how to MOVE the original installation to another directory. I am addressing this security issue now, and I would love to know the answer.

    Close Hauled
     
  3. Robyn

    Robyn Registered Member

    Joined:
    Feb 1, 2004
    Posts:
    1,189
    I am due to do a complete re-install on a new hard drive and am also following the advice in the TDS GUI to install XP to another partition. My friend has just completed this and it has worked perfectly for him - XP loads the boot files to 'C' but the OS has installed where he selected.

    I have had this concern for a while but did note that TDS suggests 'next time you install' so I presumed an previous install could not be moved. Thankfully I am on the 'next time' and am definitely heeding this advice.
     
  4. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    Hi Close Hauled,

    For a clean install, I used the Partition Magic 8 CD to boot and deleted the partitions. When I booted from the XP Pro CD (no SP1 on it) it gave me no options or choices to install to a different directory. I had to complete the install to C:\windows and then run setup again from windows (advanced setup options) to install it to where I wanted it.
    What version of XP Pro did you have?
    Did you install on a clean (unpartitioned) drive?
    Were you given the option to install to a different directory right within the "DOS" setup or did you have to press or do something special?
    On my Windows XP Pro CD, I was given no choice.

    As for moving the whole windows installation, I don't think so. You might be able to change the active partition or use a boot manager in some way. But once it is already installed wouldn't there be a million registry settings to change? Looks like a nightmare. PowerQuest used to have an app called Magic Mover, that moved programs but not Windows.

    Thanks
     
  5. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    Hi Robyn,

    Maybe it is just different versions of the XP Pro CD. Mine (pre SP1) was a real pain to have to do it twice and there was practically no information how to do it anywhere. Make sure your HD is clean (deleted partitions) before you install to make sure there are no baddies hiding. I used the Partition Magic 8 CD to boot from to do this, but I'm sure there are other ways. Be aware also of recordable media (floppies/CD-R/CDRW) that was used or created on other systems if you can't guarantee the security of them. The only driver you may need initially (during the "DOS" part of setup) is a RAID driver disk if you install to a RAID partition. Anyway, you are doing a clean install, so might as well keep it as clean as possible (at least until all your defenses are up).
     
  6. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    Has anybody recently done a clean install (deleted partitions on HD) of WinXP Pro (with SP1)?
    In the "DOS" part of setup, does it give you the option to install to a different directory (not c:\windows)?
    Did you have to do anything special to do that?

    Thanks
     
  7. Close_Hauled

    Close_Hauled Registered Member

    Joined:
    Apr 24, 2004
    Posts:
    1,015
    Location:
    California
  8. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    Thank you for the article Close_Hauled, but the solution still eludes me. It is more detailed and thorough then even Black Viper's WinXP installation article (although BV's has pictures). The informit site itself is also great and has lots of interesting articles.

    I went through that article, Another XP installation guide, and Black Viper's XP installation guide with a fine toothed comb. The details of the problem are hidden within the first article you provided.

    If you already have a 32 bit operating system installed, it's a piece of cake to install to a different directory. Just pop in the CD, choose advanced options, choose the different install directory and then install.

    But this is not what you want to do if you want a truly clean install.
    If the 32 bit OS that you run setup from is compromised, then so might your new "clean" install. Let's say the computer has been compromised with malware and you want (or have) to start clean.

    After a cold boot, you boot up with the WinXP Pro CD and begin the text mode setup. You delete all the partitions then create and format them.
    But you are given no option to install it to a different directory! You can choose a different partition, but it will always be in c:\windows (unless you choose another partition in which case it will be ?:\windows).

    If you read the articles carefully, you will see that the choice for a different directory is only if setup is run after XP (or another 32 bit OS) is already installed.

    Now these articles may not take into account a CD with SP1.
    So when you get a chance, could you please confirm or deny the following:

    Booting from the XP Pro SP1 CD and running the text mode setup. Are you given a choice of what directory to install to?
    Or is it only a choice to install to a different partition?


    If the answer is no choice for directory install, then there are only 3 possibilities for installing to a different directory:

    A. Double install like I was forced to do.

    B. Create a set of setup floppies. I created the 6 disks once and tried setup, but it just froze part way into it. Maybe it will work for you. I don't know if the option to install to a different directory is within the floppy setup.

    C. The last hope has to do with the other XP installation article. If you scroll down to Table 3.5, you will see the switches for Winnt.exe (the text mode setup). There are no direct switches for installing to a different directory. However, there is a /u:answer file switch that Performs an unattended Setup using an answer file. I have no idea how to create or what options are available in an answer file. The different directory install option could possibly be created within an answer file. It is probably just a text file with specific switches. But of course that file would have to be created on an already clean system. You would also need a boot floppy with CD drivers. The answer file could be put on the boot floppy.

    This is one of those things that seems so simple until you actually try to do it. Then it becomes a NIGHTMARE of complexity.
    Thank you Micro$oft :rolleyes: :mad:

    Any help with this deceptively "simple" problem would be greatly appreciated.
     
  9. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    Has anyone clean installed (having first deleted HD partitions) from the WinXP Pro(SP1) CD?
    In the text mode part of setup, do you have the option to install to a different directory (other than c:\windows)?
    I am not referring to a different partition, just a directory of your choosing within the text mode part of setup.
     
  10. Close_Hauled

    Close_Hauled Registered Member

    Joined:
    Apr 24, 2004
    Posts:
    1,015
    Location:
    California
    Because of Norton Ghost, I do not do that many clean installs of XP Pro. But I will do one this week in my lab to find the answer.

    Close Hauled
     
  11. bigc73542

    bigc73542 Retired Moderator

    Joined:
    Sep 21, 2003
    Posts:
    23,934
    Location:
    SW. Oklahoma
    I use partition magic 8 and to change the directory I just go to PM and use tools to change the directory drive letter. Can have it installed on X:\windows if wanted.
     
  12. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524

    Thanks Close_Hauled, I look forward to the results you find! :)
     
  13. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    Hi bigc73542,
    Are you saying that if after I install WinXP Pro to c:\windows, I can do something in Partition Magic 8 that will change it to c:\whatever directory and Windows XP Pro will from then on work normally running in c:\whatever ?
    And all subsequent program installs will also recognize c:\whatever as the WinXP directory?
    What specifically do you need to do to make this magic happen?
     
  14. nick s

    nick s Registered Member

    Joined:
    Nov 20, 2002
    Posts:
    1,430
    I set up a Virtual PC to see and was not given the option to change the default Windows directory (eg. C:\Windows to C:\Winblowz). The setup goes from format, to copying setup files, and then reboots into the graphical interface.

    Nick
     
  15. bigc73542

    bigc73542 Retired Moderator

    Joined:
    Sep 21, 2003
    Posts:
    23,934
    Location:
    SW. Oklahoma
    I see what you are saying said the blind man. When I installed xp pro from install disc not recovery disc the option given was what partition I wanted to use or use entire disc.
     
  16. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    Okay, I see now BigC. It is basically shuffling the drive letters around and leaving a stub partition. I guess that would work, but I really just wanted to have a different directory on the C: partition. Thank you.
     
  17. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    Hi Nick,
    Thank you for trying it out on your Virtual PC (very cool :cool: )!
    This is what is so frustrating. You have to install Windows twice if you want it in something other than c:\windows.
    If you see in Post #8, there seems to be just 2 possibilties left:

    B. Create a set of setup floppies . I created the 6 disks once and tried setup, but it just froze part way into it. Maybe it will work for you. I don't know if the option to install to a different directory is within the floppy setup.

    C. The last hope has to do with the other xp installation article. If you scroll down to Table 3.5, you will see the switches for Winnt.exe (the text mode setup). There are no direct switches for installing to a different directory. However, there is a /u:answer file switch that Performs an unattended Setup using an answer file. I have no idea how to create or what options are available in an answer file. The different directory install option could possibly be created within an answer file. It is probably just a text file with specific switches. But of course that file would have to be created on an already clean system. You would also need a boot floppy with CD drivers. The answer file could be put on the boot floppy. This option is a little above my head, but if it works, I'm willing to learn. :)
     
  18. nick s

    nick s Registered Member

    Joined:
    Nov 20, 2002
    Posts:
    1,430
    Found a sample unattend.txt here: windows xp unattended install.

    One section refers to "TargetPath":

    [Unattended]
    UnattendMode=FullUnattended
    OemSkipEula=Yes
    Setting OemPreInstall=Yes is necessary if you create an $OEM$
    directory under \i386 to copy files to the target PC and/or are using a cmdlines.txt
    file. If you aren't copying files to the target PC or using a cmdlines.txt file,
    then set it to No
    OemPreinstall=Yes
    TargetPath=\WINDOWS
    The 2 lines below are used to convert the file system to NTFS
    and then extend the boot/system partition an extra 4GB.
    FileSystem=ConvertNTFS
    ExtendOEMPartition=4000


    Nick
     
  19. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    GREAT!!! Thank you very much Nick! I appreciate the link also. There is much to learn there.

    I was wondering if I could ask you one more favor?
    Could you please try out on your :cool:Virtual PC:cool: if the setup floppies let you install to a different directory also?

    Thank you
     
  20. nick s

    nick s Registered Member

    Joined:
    Nov 20, 2002
    Posts:
    1,430
    This is what I found regarding floppy installs: Attended Install of Windows XP Professional.

    "Setup will not prompt the user to specify the name of an installation folder unless you are performing an unattended installation or using winnt32 to perform a clean installation."

    Here's a link about Winnt32 installs: Winnt32

    You can find winnt32.exe in your [Install CD]:\I386 directory.

    Nick
     
    Last edited: Aug 3, 2004
  21. Close_Hauled

    Close_Hauled Registered Member

    Joined:
    Apr 24, 2004
    Posts:
    1,015
    Location:
    California
    I was going to run Winnt32 tomorrow and look at those parameters. Thanks for finding this. Now I won't have to.

    If you run "WINNT32 /?", it should show you all of the parameters that you can pass. If only I could have remembered the name of WINNT32, I could have answered this earlier. :oops:

    Close Hauled
     
  22. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    Excellent!! Thank you Nick! :) :) :cool: I finally have an answer!

    So if you want to have a safe clean Windows XP Pro install (delete partitions first) into a non-default directory (for security), you really have only two options:

    (Option A) Double Install
    If you have only one computer or you can not or do not trust other nearby computers. :eek: This would be the most secure as it isolates the install and does not depend on a diskette created on another computer(which could be compromised). It basically involves deleting the HD partitions first, installing Windows XP Pro to C:\windows, run setup again from within windows (winnt32.exe) using New Installation (then Advanced Options), choose a different directory, complete setup , and finally delete the old c:\windows directory.

    For me, deleting the partitions was more involved. I have the Win XP Pro (non-SP1) CD. Because I already had a c:\windows on the hard drive, text mode setup would not let me continue because it detected c:\windows and said it was not an upgrade CD. So I had to first boot from the Partition Magic 8 CD and delete the partitions, then reboot with the Windows XP Pro CD. The WinXP Pro (SP1) CD may be different though and you may be able to delete the partitions (even if you already have a c:\windows) with only the XP Pro CD.

    (Option B) Unattended Setup
    It is much more complicated requiring: Access to a trusted computer, Win 95 or 98 boot floppy with CD drivers, a text file (so called answer file or unattended.txt) that contains the target path where you want to install XP, and the knowledge to create the text file. It is basically a file containing instructions for automating the XP install. There should be enough space left on the diskette to fit the answer file. The reason for the 95 or 98 boot disk is that XP doesn't make boot disks with CD drivers anymore. (note: the 6 XP setup floppies from MS are unecessary; the single 98 boot disk will work for this).
    The benefits are a faster XP install because it doesn't have to wait for you to respond to prompts and you only have to install Windows once. If you are very sure the other computer the diskette is created on is clean and you are willing to take the extra steps and learn then this is a more streamlined approach.

    Again many thanks Nick. :)
     
  23. Devinco

    Devinco Registered Member

    Joined:
    Jul 2, 2004
    Posts:
    2,524
    Yes, but winnt32.exe will only run from a 32bit OS.
    So if you want to start over with a clean disk (say the system is compromised), then you wouldn't want to start the new XP Pro install from the compromised OS.
    It would be better to just delete the partitions first and then run winnt.exe (the text mode setup) which has no switches for a different directory install.
     
  24. Close_Hauled

    Close_Hauled Registered Member

    Joined:
    Apr 24, 2004
    Posts:
    1,015
    Location:
    California
    I will have to go into my lab and find out for sure. I know that you can do it, I just haven't done it in a while. Fortunately, I have a machine that needs a new hard drive. I'll try it on that and get back to you.

    Close Hauled
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.