Question Edit registry with CMD (space in registry path)

wasshup

Prominent
Dec 14, 2017
46
0
530
0
Hi
I'm trying to edit registry using command line. I need command that edits certain value in registry. Problem is, when i run the command it threws out syntax error. I figured out that it is happening because the space in the registry path (...\Windows NT\...).
Is there way to fix this ?

Command here "cmd.exe /c reg ADD HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList /t REG_EXPAND_SZ /v ProfileDirectory /d D:\Users"

Then I want to insert the command to SCCM task sequence.

Thank you.
 

gardenman

Admirable
Herald
Hi, I have a few questions for you.

Can you show the original link where you got the information from that is telling you to edit this registry key?

Are you sure it's ProfileDirectory and not ProfilesDirectory with an s in it? I think you are misspelling that. It should have an s in there according to this page: https://blogs.technet.microsoft.com/mrsnrub/2011/01/26/user-profiles-location-location-location/ Also it's listed with an s in my registry. It's ProfilesDirectory and not ProfileDirectory.

The above link also states: "It is not supported to change this by editing the registry after installing Windows". I'm not saying it's impossible, but you are trying something that is unusual and can probably be done in a different way.

Why are you not just moving the user data folders (such as Documents, Pictures, and Videos, etc)? Those are easy to move without editing the registry. I think @USAFRet has a tutorial showing how it's done. Maybe he'll give a link.
 

USAFRet

Titan
Moderator
Mar 16, 2013
109,413
1,036
152,440
18,286
Trying to relocate the whole /Users/ folder tree to the D drive?
Why?

I've seen bad things happen down the road with that. The next semi annual Win 10 update is likely to break things.

Just relocate your Libraries. Easy.,and a supported function.
Thusly...
Win 7 & 8:

Win 8.1 & 10:



Again...why are you doing this, and can you show us the link where you got this info.
 

wasshup

Prominent
Dec 14, 2017
46
0
530
0
Hi, I have a few questions for you.

Can you show the original link where you got the information from that is telling you to edit this registry key?

Are you sure it's ProfileDirectory and not ProfilesDirectory with an s in it? I think you are misspelling that. It should have an s in there according to this page: https://blogs.technet.microsoft.com/mrsnrub/2011/01/26/user-profiles-location-location-location/ Also it's listed with an s in my registry. It's ProfilesDirectory and not ProfileDirectory.

The above link also states: "It is not supported to change this by editing the registry after installing Windows". I'm not saying it's impossible, but you are trying something that is unusual and can probably be done in a different way.

Why are you not just moving the user data folders (such as Documents, Pictures, and Videos, etc)? Those are easy to move without editing the registry. I think @USAFRet has a tutorial showing how it's done. Maybe he'll give a link.
Trying to relocate the whole /Users/ folder tree to the D drive?
Why?

I've seen bad things happen down the road with that. The next semi annual Win 10 update is likely to break things.

Just relocate your Libraries. Easy.,and a supported function.
Thusly...
Win 7 & 8:

Win 8.1 & 10:



Again...why are you doing this, and can you show us the link where you got this info.
Hi,
thank you gardeman for the correction, I misspeled the syntax. Now the code is working.

For USAFRet:
It's becase of the rules in our company. I join my current IT team one year ago. They were doing this redirect for very long time and there was no problem with it. We have about 300 computers, all connected to domain - every user can use any computer for login with own login details. When multiple users using one computer, it's better to keep their files on the second drive (physical or logical) - my opinion. This is basically the reason why I want to redirect the user profiles.

BUT, if there is some problems with this metod in Windows 10 (unstable OS, data loss, etc.) I'd love to educate myself in this problem and configure it other way.

We're now upgrading from Windows 7 to Windows 10 all computers in company, so it would be great to prevent problems in future with better solution, if possible.

Thank you for suggestions.
 

ASK THE COMMUNITY

TRENDING THREADS