Is possible to install Windows to non-standard directories?

0

2

I would like to install Windows using non-standard directory names, e.g C:\Foo for Windows folder, or C:\Foo\Bar for the System folder.

In theory, it should work as applications should ask the actual path for Windows and System folders with specific APIs (GetWindowsDirectory, GetSystemDirectory, SHGetFolderPath).

I would like to avoid any kind of folder redirection or hardlinks.

Basically, I have two goals:

  1. Test applications to avoid dependencies on hard coded paths
  2. Use nicer folder names, especially System64 for 64 bit stuff instead of System32

Wizard79

Posted 2011-12-09T16:34:51.693

Reputation: 223

3

See Raymond Chen's Old New THing here and here

– kinokijuf – 2011-12-09T17:06:00.343

I know you can make Windows install onto a different drive letter than C:, but I'm unsure whether the Windows directory can be different. – Andrew Lambert – 2011-12-09T18:42:55.443

It is almost certainly not possible to rename the system32 subdirectory. – Harry Johnston – 2011-12-14T00:00:50.007

@HarryJohnston: why? It is hardcoded everywhere? – Wizard79 – 2011-12-14T12:42:17.030

Perhaps not; I suppose in theory it should be relocatable, but there only has to be one bug in the millions of lines of Windows code (not to mention whatever third-party apps are present) to break something. Bottom line: MS decided not to rename it, is it really a good idea to second-guess the people who wrote the OS? :-) – Harry Johnston – 2011-12-14T19:07:06.193

Answers

0

No. Windows must always be installed to drive:/Windows/. This is for app-compatability reasons - i.e. many applications hard-code the path and so Microsoft cannot change the path or allow the path to be changed for fear of breaking all of these legacy applications.

SecurityMatt

Posted 2011-12-09T16:34:51.693

Reputation: 2 857

Sorry, I had to downvote your answer because you're going off topic for two reasons:

  1. You don't say why Windows can't be installed to a different path, you say why you shouldn't do that...
  2. In my question I say that I would like to "Test applications to avoid dependencies on hard coded paths", which is exactly the side effect you mentioned in your answer.
  3. < – Wizard79 – 2012-03-06T16:16:37.787

Well in that case I have to downvote your question, because it's a correct answer. The reason you can't change the \Windows and \Windows\System32 directories are because Microsoft have specifically fixed these strings to avoid breaking all sorts of user-mode applications. If Microsoft let you do this, you'd go complaining to Microsoft when all of your applications broke, and so Microsoft doesn't want this, and so has fixed \Windows and \Windows\system32 for the life-time of windows. For crying out loud, that's precisely the reason why they had to introduce SYSWOW64 in the first place. – SecurityMatt – 2012-03-06T17:11:58.900

SecurityMatt: Your downvote is just a childish revenge. How could a question being wrong? I specifically asked a way to workaround a limitation imposed by Microsoft, in order to achieve the result I very clearly specified; your arguments of breaking the compatibility don't apply here, I'm specifically looking for them in the question. – Wizard79 – 2012-03-12T11:27:26.157

I didn't downvote your question, although I notice that you've downvoted my correct answer. I told you that Microsoft don't let you change your windows directory and I told you why. Seriously, what is your problem? – SecurityMatt – 2012-03-12T17:21:04.737

You wrote "in that case I have to downvote your question". I have no problems. Again, your reply is OT, I just asked if it's possible to install Windows to a different path, you replied that it's not a good idea. I'm not interested if it is a good idea or not, I'm interested to know if it is possible, and how to do it (if it's not possible, why it's not possible, and not why it's not a good idea). Understood? – Wizard79 – 2012-03-13T10:31:00.023

I didn't say it was a bad idea, I said "No. Windows must always be installed to drive:/Windows/". I then told you why it is not possible - the answer is because Microsoft have taken a hard dependency to that directory in order to avoid people changing the directory and then all of their applications breaking and them blaming Microsoft for the failings of non-microsoft programs. – SecurityMatt – 2012-03-13T16:33:48.653

No, that's why it's not allowed by Microsoft, not why it's technically impossible to do... – Wizard79 – 2012-03-14T12:59:04.537

If you're willing to recompile your own Windows, or binary edit the system files, it's possible. For everyone else it's not possible. Anyway, it's clear that you've made up your mind that you're correct and that everyone else isn't, so tbh I'm not sure why you bothered asking the question in the first place. – SecurityMatt – 2012-03-18T13:49:06.313

@Lorenzo you're being immature; please stop arguing. Your question was, "is it possible to install Windows to a non-standard directory," and the correct answer was given to you by SecurityMatt: "No, it's not." That's a valid and correct answer. If you don't like that answer, too bad. It's not his fault that it's not possible. – nhinkle – 2012-03-18T19:25:46.097