Announcement

Collapse
No announcement yet.

How i relocate folders like Program files, profiles, etc

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How i relocate folders like Program files, profiles, etc

    Today i've been redoing my pc, and as I as doing my usual relocating my directories off my C: to my data drive...
    I thought... why not share some of my lil things I do...

    I store my windows profile off on a seperate disk from the others, for the fact I store that much stuff in it, keeping it on the system disk is not efficent.

    First a few things I do when installing windows.
    My drives are actually partitioned like such (physically in this order):
    d: [Data and stuffs] is the first partition, why? outside of the disc, faster
    e: [my profile and shared documents] I keep this on a sepeate partition, no real reason but for isolation
    c: [system] 15gb contains only windows and 1-2 profiles (admin and scott's)

    Like i said e: is really not essentual but I like it like that.

    I'll explain how i moved those 'extra' things in second.
    The things I 'relocate' are actually these
    c:\program files\
    c:\documents and settings\Sirex
    c:\documents and settings\all users\documents

    First let me explain a few things here, you will have to do program files in safemode
    You CAN NOT relocate the entire documents and settings with out loading the drive in another windows install
    you must be using NTFS
    relocated folders look like they are actually on that place but dont count towards your space or expand it (count wise)

    OK so get this here
    Junction v1.05

    Junction from sysinternals, these guys are good, they used to be a sepearte company, but they did so much with windows API that MS now have them in house.

    OK now you have that, put it in c: best place, its easier to work with there.

    Boot into safe mode, (dont have to if you want to not move program files)
    Login as Admin
    Not the profile you want to relocate, as your NTUSER.DAT file will be locked.
    This is also the reason you cant relocate the entire docset folder, system profiles you know XD

    OK so lets start with a user.
    vista its c:\users\
    Create the folder where you want it to be in my case its
    e:\Sirex
    goto c:\documents and settings\Sirex
    cut everything from there to e:\sirex [the folder must be emptied]

    once everything is there and the orig folder is empty
    Start > Run [winkey+r < vista's do this]
    type cmd
    now use this command
    c:\junction "C:\documents and settings\Sirex\" "e:\Sirex\"
    put your paths in " "'s saves issues

    now in windows explorer go back to the docset location, you will see all the files again.
    tada! magic pointer

    to move the shared documents do the same thing but only on this folder
    c:\documents and settings\all users\documents\
    I find this handy as it puts my share in a larger drive while keeping my system drive at the back and small.

    Now program files, same idea as above, except you do a few extra steps.
    Doing these extra things alone won't do the job, a junction will.
    So make d:\program files\
    Move c stuff to d one
    junction "c:\program files\" "d:\program files"

    Now additionally to prevent issues later on in life and to make things nicer for installers
    start > run
    regedit
    find your way to
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion
    In there you will see 2 values we want to fiddle with
    Adjust CommonFilesDir to your new location + \Common Files
    Adjust ProgramFilesDir to your new location

    Now all the installers that do their job will have d:\program files\ automatically.

    This is ment to change the things for windows's lil preinstalled stuff, from expeience overtime i've noticed it does not work quite as good as it should, which is why i now junction off the folder.

    Is a few other things I do, esp on a reinstall like i import my old registry and transplant entries from it into the new one.
    My firefox and thunderbird profiles are not in my user profile but in a sepeate folder (this also mean when i use other pc's on the network i can use the same settings and extensions easy, and access my email from any pc, same settings)

    If i remember any other little things I do to make things easier, or that (well least for me) i'll post them up for you all to have a look at
    Its good to share info like this

    Like i said this will work for any folder, as long as its empty.
    So for those 'OMG it installs in my c:\program files\ and i had no choice" things
    You have one now, you can force it off your c drive!

    btw you can remove junctions by using junction -d "p:\ath\to"




    I'm not insane. I'm just overwhelming!

    ·····••••• Support Cainslair. Donate here!•••••·····
    ·····••••• and get extra options! •••••·····

    #2
    Weeee a symlink it's nice to see Microsoft has finally caught up with 1970's Unix filesystem features

    Comment


      #3
      Doesn't TweakUI do the same thing essentially ? Just give it a different location for your 'My Documents' folder or any other common folder.

      I set up all of the work PCs to redirect the user's home folder from its local location to the users network home folder.
      Oh if a man tried to take his time on Earth and prove before he died what one man's life could be worth, well I wonder what would happen to this world ? - Harry Chapin

      Comment


        #4
        na its totally different.
        even thou i do change the 'where program files is' to save confusion

        What this does is actually points c:\program files\
        to any folder transparently, you could not even tell it was on another drive.

        So even if something wanted c:\program files, it effectivly forces it to install on d:\program files

        Best way to describe it, even mounted a partition into a folder from disk management?
        its like that but folder to folder, and tells windows to read folder X instead of folder Y

        http://en.wikipedia.org/wiki/NTFS_junction_point




        I'm not insane. I'm just overwhelming!

        ·····••••• Support Cainslair. Donate here!•••••·····
        ·····••••• and get extra options! •••••·····

        Comment


          #5
          Ahhh, thanks for the clarification on that, Sirex !! Duly noted !
          Oh if a man tried to take his time on Earth and prove before he died what one man's life could be worth, well I wonder what would happen to this world ? - Harry Chapin

          Comment


            #6
            Reason I do it, i discovered junctions back in 2005 i think it was.
            I dont like things other than my os on my c:
            its easier if i reinstall over the top if something goes wrong as its not wiping out things i've installed.
            esp my user profile, because its safe on another disk.
            When I format only the junction is lost, and not the data.

            If you really wanted to go futher you could do things like preformat a drive, junction off things like %WINDIR%\config which is where your regisistry is stored and event logs etc and other more critical folders.

            But thats really overkill unless you want to keep those things on a seperate HDD for some reason or another.

            Can do docset folder if you preformat a drive essentually..

            Has its uses, like for example, I accidently installed something on my c: by mistake, this thing is a pain to install so i dont really want to have to install twice.
            So i moved it from c: to where I wanted it in the first place, and just used a junction to remap it.

            Yeah reinstalling is an option but this thing has like a zillion install pages... 2mins moving it over 30mins installing?




            I'm not insane. I'm just overwhelming!

            ·····••••• Support Cainslair. Donate here!•••••·····
            ·····••••• and get extra options! •••••·····

            Comment


              #7
              This is good stuff. I am constantly trying how to keep my OS partition clean. I will read up on this when I get some free time.

              BTW how do you get steam to download and install games on another drive?
              [img]https://farm5.staticflickr.com/4373/35734799443_53cb20ef13_z.jpg[/img]


              Killed by CLRs since 2004. WOOT!
              Support Cainslair. Donate here! [url]http://www.cainslair.org/billspaypal.php?[/url]

              Comment


                #8
                I've not found anything in the settings or a reg entry,
                this would do the trick easy just map steamapps to where you want it to go...

                I know you used to beable to tell steam to install the files else where but they seem to have taken that out of it.

                I usually just install steam into the game files folder.




                I'm not insane. I'm just overwhelming!

                ·····••••• Support Cainslair. Donate here!•••••·····
                ·····••••• and get extra options! •••••·····

                Comment


                  #9
                  Word of warning, before someone does this...

                  NEVER delete a junction in explorer, ie my computer
                  if you mapped c:\folder to d:\folder
                  if you delete c:\folder in my computer, it will recurse (ie follow)
                  into d:\folder and remove all those pretty lil files you have in there

                  Vista does not have that issue, because ms implemented junctions better, but XP does this so watch out!




                  I'm not insane. I'm just overwhelming!

                  ·····••••• Support Cainslair. Donate here!•••••·····
                  ·····••••• and get extra options! •••••·····

                  Comment

                  Cain's Lair Forums Statistics

                  Collapse

                  Topics: 26,187   Posts: 269,850   Members: 6,183   Active Members: 7
                  Welcome to our newest member, Fermin13Q.

                  Today's Birthdays

                  Collapse

                  Top Active Users

                  Collapse

                  There are no top active users.

                  More Posts

                  Collapse

                  • Reply to Hi guys!
                    by Evil_T0NY {CLR}
                    I've been Alpha and will be Beta testing the Delta Force game. It's been really getting good reviews! Definitely a good Battlefield feel to it like the...
                    14 Nov 2024, 08:50 PM
                  • Reply to Hope your all OK over there
                    by Apache Warrior
                    We had 17 inches of rain from the storm on November 7, 2024.
                    Apache
                    11 Nov 2024, 07:55 AM
                  • Reply to Hope your all OK over there
                    by Sirex
                    Aye, I'm inclined to agree with that lmao
                    Gone are the days of warm summers and snow filled winters here, nothing but rain and wind for 8mths of...
                    10 Nov 2024, 08:53 PM
                  • Reply to Hope your all OK over there
                    by Apache Warrior
                    Now we have had a lot of flooding in this area and there are still a lot of houses that have not been repaired. Must be the apocalypse.
                    ...
                    8 Nov 2024, 09:23 AM
                  Working...
                  X