changing some system variables?

RubasznyRumcajs

New member
Local time
3:01 PM
Messages
4
hi
I'm new to Windows OS, and I've just installed Windows 7 (64bit, ultimate if that matters) on my hardrive. My disk is partitioned like that:

C: 30Gb
D: 80GB
E: 400GB

all those partitions are formatted in NTFS. I would like to change default installation directories (from C:/Program Files (x86) - for 32bit apps and C:/Program Files for 64bit) to D:/program_files/32bit and D:/program_files/64bit
how can i do it? i know: most installers give me a choice of choosing a directory into which they will install application- but it has some disadvantages:
1. i have to manually chose directory
2. some apps don't have that option, they install default into C:/Program Files

I have also a question: i'd like to move C:/Users/ into E partition, but change it in way that would enforce programs (like IE e.g.) to respect it, for example: all downloaded by IE files would be saved (automatically, without my ingerention) to E:/Users/szymon/Downloads - so system wouldn't try to save them on C drive- i'd like to keep it as clean as possible, all 'external' (i.e.- installed by me, not by windows update system) apps would be installed on D:/program_files/* directories and all user data (music, videos etc) would be stored on E drive (so they could 'survive' reinstallation of system etc)

I'd be happy if someone could help me with those problems

Sincerely
szymon
 

My Computer

OS
Windows 7/Linux
I think you may be able to do that using NTFS Junction points (just as Windows already does it with folders like "Documents and Settings" and "Application Data").

First you may have to change your Program Files directory using regedit (in order to be able to rename the current one).

See if this works:
Changing the Program Files directory in XP and Vista « Chris’s Tech Blog
 

My Computer

Computer Manufacturer/Model Number
Too many to list.
OS
XP, Seven, 2008R2
CPU
AMD, Intel, VIA
Motherboard
Various
Memory
Corsair, Kingston, etc.
Graphics Card(s)
ATI, NVIDIA
Monitor(s) Displays
Samsung
Hard Drives
Maxtor, Western Digital
Keyboard
qwerty
Internet Speed
22 Mb/s @ home, 1 Gb/s @ server
Other Info
All of my systems still run fastest on XP 32-bit for the most part. Win7 is fun to play with, but I still prefer XP for raw speed, security, and functionality.
thank you for answer.
unfortunatelly, it seems that i've broke my system (well... i forgot to make a copy of registry :~), so it seems that i'll have to reinstall it, but meanwhile: could you inform me what is a difference between symbolic link to directory and directory junction? ths distinction isn't clear for me :| which one will be more proper to use in my case (i.e: data should be- physically- stored on D drive, while system /i.e: native windows tools and 3rd party installers/ would work like it would be on C drive.

sincerely
szymon
 
Last edited:

My Computer

OS
Windows 7/Linux
default shortcuts:
- files with lnk extention that describes the target (path, parameters).
- you cannot run common tasks on the target (edit, print), only launching is supported.
- Alt+Enter on lnk file -> does not return target's properties.
- changing the target's path/filename -> orfaned lnk file.
- Browse for folder dialog -> lnk to a directory does not appear like a directory.
- work across network, hard disks, partitions.
- a lnk to regedit.exe or to the Windows folder -> not that much different than a batch file with "c:\windows\regedit.exe" or "cd C:\Windows" inside.

symbolic links and directory symbolic links:
- evolution of the default shortcuts.
- no mandatory lnk extention.
- you can run common tasks on the target (edit, print) besides launching.
- changing the target's path/filename -> orfaned sym link.
- appear as directories in a Browse for folder dialog.
- work across hard disks, partitions but not over the network.

directory junctions:
- are just like directory symbolic links but the OS hides the fact that are not real directories. This is what you need for your task.

hard links:
- files exclusive, replicating files without wasting space, the OS treats the replicated target like a real file.
- any content changes are reflected to both target and hard linked file.
- renaming/moving the target will not result in an orfaned hard-linked file.
- on Alt+Enter will return the target's properties.
- work across same partition only.
- a good usage example would be when editing a DVD menu, and you create a backup, ver1, ver2... folders. You only need to edit the ifo files. It would waste alot of disk space if you are not using hard links to the movie vob files instead of real copies. Another example would be to run an executable with different credentials (run as administrator) or compatibility options (run in 640x480 res).

So...

You need a file and folder unlocker program. I recommend FFUnlocker for now. Open it. Press the litle Dir button after the Search for input box. Browse to Program Files. Press the Search button. Kill the processes in the lower pane, one by one, pressing Search again after each time, until nothing remains.

Stuff like antiviruses cannot be killed so easy, you need to remove them from the Windows startup using programs like Autoruns from Microsoft. Let's say you have Avira Antivir. Open Autoruns, remove the check on every item that has Avira GmbH as Publisher (items in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and HKLM\System\CurrentControlSet\Services). A reboot is needed.

Go to Program Files and rename it to program_files. If it works, it's unlocked. Now you can move it to your new destination, D:\.
Note: It's better to use back slashes ("\") for paths in Windows!
Type cmd at the startmenu search box.
>cd\
>mklink /J "Program Files" "D:\program_files"
Now restore the disabled antivirus/other programs with Autoruns, and reboot. You should have an working system that does what you want.

My example is for 32bit of Windows 7, so you need to adapt it for 64bit (easy task for you, I suspect :cool:).

No need to do the same for Users, because you can change Downloads, Favorites, Links, My Documents, My Pictures, My Videos, Saved Games, Searches by typing %userprofile% at the start menu search box, and for each of the mentioned items in the now opened explorer window, right click - choose Properties (Alt+Enter), choose Location and modify there. Automatic move is supported.

You should think about what happens when you do this. I believe that your programs will run slower and trash more, prefetching will not work as it should, you will have two locked volumes instead of one, fragmentation levels will increase ...etc. all these because you split the system files over two partitions on a single hard disk.

My recomandation is to not follow this path.
If an application does not offer a destination choice to the user, it's either a system application or a bad written one, and you should attempt to fix the application, not the OS.
How many applications are you installing each day, that you find it so hard to choose another path? There are ways to make this faster by using copy&paste or directory symbolic link/junction on the Desktop pointing to your new programs path, that way when browsing for folder it will be in the first level behind Desktop and will require fewer clicks to get to.
A good practice is to separate only the applications you need, that are portable enough, not everything that gets thrown inside Program Files.
 

My Computer

Computer Manufacturer/Model Number
Foxconn
OS
Windows 98SE
CPU
E2180
Motherboard
Foxconn 945P7AD
Memory
Geil 2x1GB DDR800
Graphics Card(s)
Palit 8800GS 384MB
Sound Card
Realtek 861
Monitor(s) Displays
Samsung 795DF CRT
Screen Resolution
1280x960
Hard Drives
Maxtor 80GB SATA1
PSU
FSP ATX-400PNF
Case
TLA-570A
Cooling
Schyte Mugen
Keyboard
Logitech ps/2 Black Internet Keyboard
Mouse
MSL4 (A4Tech inside)
Internet Speed
10mbit
Back
Top