?
Solved

mounting "c:\program files" on a different partition

Posted on 2003-03-27
9
Medium Priority
?
310 Views
Last Modified: 2010-04-13
I want to mount "c:\program files" as a seperate partition. What I'd like to do is:

create the other partition
copy "c:\program files" into it
delete "c:\program files\*"
mount the other partition as "c:\program files" using the Computer Management tool.

Now programs think they're in the default location (which keeps them happy) without messing with the OS partition (which keeps me happy).

Problem is by the time everything's running the directory is locked (I think IE/Explorer is using it).

Anyone know how to get around this?

(while I'm at it, I'd like to move "c:\doc&settings" as well....)
0
Comment
Question by:sprinkmeier
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 

Accepted Solution

by:
Idem earned 1500 total points
ID: 8223262
I think the only way i can think of doing this is using a linux resque disk boot with it, mount the windows partition this will allow u to copy / move the partition without windows locking anything, then happily move the DIR to the second partition (after mounting it ) and that should do it.
OR you could copy the folder into another DIR and then boot in WIN2K and then move it to the new partition after which point all programs to access it from the new partition, then delete the old Folder.
Hope it helps.
Thanks
Medi
0
 
LVL 9

Expert Comment

by:MSGeek
ID: 8224253
Sounds like you are trying to free space on the C: drive, is that correct?  You cannot just move existing installed programs or the documents and settings folder.  There is a way to map a directory to a volume on a seeprate physical disk or partition and have the OS still think it's on the same drive.  Please clarify.
0
 
LVL 7

Expert Comment

by:YarnoSG
ID: 8224516
You CAN change your default "Program Files" and "Documents and Settings" Registry entries, but for ALREADY INSTALLED software, it will be more tricky.  Many programs reference the environment variables, but many do not.  you will have to edit every direct reference to c:\program files & c:\progra~1 to match your new configuration.

The default locations for those settings are:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
-AND are referenced by the vaules at:-
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

The value names are pretty obvious.  What is NOT obvoius is that they are of REG_EXPAND_SZ type, which cannot be edited by Windows 2000's REGEDIT.exe, but can by REGEDT32.exe (this was FINALLY fixed in Windows XP, ref my article @ http://www.ntfaq.com/Articles/Index.cfm?ArticleID=14738).

You should use REGEDT32 if you are going to edit these values.  
You should then move the directories
and then you should use REGEDIT to search for and correct any references to "C:\Program Files" AND "C:\progra~1"


HOWEVER, it is important to note that an FDISK may be less painful, as FDISK fixes everything.

-HTH
-Steven Yarnot
http://yarnosg.home.insightbb.com
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 7

Expert Comment

by:YarnoSG
ID: 8224525
Oh, and lets not forget those pesky .INI files that far too many sofware developers still use; hunt for those and correct their references too.

The Backup/FDISK/Rebuild/Restore option is looking better all the time...

-Steve
0
 
LVL 2

Author Comment

by:sprinkmeier
ID: 8235654
Idem, much as I like LINUX I'd rather not use it to mess with NTFS partitions. Idea is good, though. No reason why I can't put on a temporary second windos partition and use that.

MSGeek, I'm trying to seperate OS, apps and data into seperate partitions (<flamebait> it's one of those 'relaibility and stability' things, no wonder windos doesn't like it :-)

VarnoSG, I know about changing the fedault, but I also know that some programs are too braindead to check what the default it, so I'd rather keep stuff in c:\...... Also, I don't want to have c:\prog /AND/ d:\prog.

I was hoping there was something like single-user mode in UN*X (safe mode locks stuff too).

I guess worst case is moving as much as I can, copying the rest and then do the mnounting. There'd be a few 'hidden' files left on the C partition, but that's life.
0
 
LVL 2

Author Comment

by:sprinkmeier
ID: 8410993
Other than using a second windos partition rather than a LINUX one I think this is the best way.

Thanks.
0
 

Expert Comment

by:dementg
ID: 8579510
I just tried to do the same thing, and I think I've found a procedure that works:

1.  Have the desired partition already mounted under some drive letter, assuming D: here

2.  Boot into "Safe Mode with Command Prompt".  This won't load IE, which is curious given Bill's assertion that IE can't be separated from the OS...

3.  go to C:\ and type 'cd progra~1'.  Make sure this sends you to "Program Files".  If it doesn't, figure out what DOS 8.3 pathname sends you to "Program Files".  Make a note of it.

4.  rename "Program Files" to "oldProgFiles".  The new name MUST be different in the first 8 characters.  This is to make sure the DOS 8.3 pathname will also be changed.

5.  make the new directory: 'mkdir "Program Files"'.

6.  type 'cd progra~1', or whatever DOS 8.3 pathname you found in step 4.  Make sure it sends you to the new directory you just created.  If not, remove the directory.  Make some dummy directories as needed, then create the real one.  One way or another get the correct DOS 8.3 pathname to be associated with the new "Program Files" directory you are trying to make.

7.  type 'mountvol'.  Read the list and find the VolumeID for the desired partition.  This is why you need it to be mounted somewhere already.

8. type 'mountvol "C:\Program Files" <VolumeID>'  VolumeID starts with \\?\, its not just the numbers inside the braces.

9. xcopy everything from oldProgFiles to "Program Files" using /S /E /V options.  I had an "access denied" error doing this, somehow resolved it by going to D: (which is mapped to the same partition), then typing
      xcopy C:\oldProgFiles\*.* .\*.* /S /E
my only guess is the longer destination pathname of "C:\Program Files\*.*" got too long for xcopy to handle it.  (?)  I didn't use /V but I should have.

10. 'exit' from the prompt and reboot.  It seemed to freeze on me when I did this (must not have liked me putting the prompt in full screen).  just use ctrl-alt-del->shutdown if that happens.

11. deny access to Everyone on "oldProgFiles", as an extra way to make sure it isn't getting used.

12. keep the old folder around and watch the log for a while, and test out your programs that were installed under program files.
----------------

Note that we're mounting the partition so that it inherits the same DOS 8.3 pathname as well as the full name.  If the DOS 8.3 name ends up different, some programs will have issues.  I have a problem with Symantec Antivirus right now because I didn't think about the 8.3 pathname issue when I did this.
0
 
LVL 2

Author Comment

by:sprinkmeier
ID: 8586965
nice one dementg!

happy to give you points if you want them, looks to me you earned them ;-)
0
 

Expert Comment

by:dementg
ID: 8595960
Unless they're burning a hole in your pocket, then don't worry about it.  I'm not sure I'd end up using them, I'm not really an active user of this site (at least not yet).  I had some trouble finding any info about this topic, so once I figured it out I was just anxious to post something about it.

It would sure be nice if microsoft would let you set up mount points during the install phase, like all the real OS's do.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
"Any files you do not have backed up in at least two [other] places are files you do not care about."
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question