Programmatically Speaking – Changing the user profile path in Windows 7. Nothing programmatic about this post, unfortunately. Instead, a bit of. Windows. I tried. I had the same (bad) experience both times. I’m mostly. happy about Windows 7 - it’s a much better OS than previous Windows. But the other day, when I took on the seemingly easy task of. Users\Some. User to d: \Some. How can I delete the local user profile on a Windows 7 machine that is connected to a Windows Server 2008 domain? DelProf doesn't seem to exist on Windows 7. User), I immediately ran into problems. The first problem was that the Local Users and Groups snapin isn’t. Windows 7 Home Premium. This annoys me immensely for three. One, that the OS really shouldn’t be allowed to have “Premium”. Two, that there doesn’t appear to be. I could’ve consulted before. OS. Three, that an upgrade to Professional or Ultimate is. But then I got the idea to try the “net” command, specifically “net. Based on the command help output, it sure looked promising: /HOMEDIR: pathname Sets the path for the user's home directory. A bit of investigation revealed that: net user Some. User /profilepath: < path> sets a roaming profile for. Some. User. I only tested this with a UNC path pointing to my. Some. User. Upon logging. Some. User on and off, a directory d: \Some. User. V2 was created with a. Wikipedia explains the . The “roaming copy” was properly kept in sync for each. Some. User /homedir: < path> only seems to affect the. HOMEDRIVE and HOMEPATH environment variables. I tested setting the. Some. User. X, and the environment variables happily. It had no apparent effect though. From what I can. find on the web, these variables are “good to use in scripts,”. USERPROFILE is preferred. By default, they point to. USERPROFILE. Now here’s some rambling: I usually find that Microsoft’s documentation. I’ve been working a lot with the . NET framework lately. I’ve found time and time again that the documentation helps very. The documentation for net user is no. Compared to the command help output, it adds “This path. PROFILEPATH switch. What. does that even mean? I finally got the solution by consulting Microsoft Answers (I’m the. OP): Create a System Restore Point. Log on under an admin account. Move the folder c: \Users\Some. User so that it becomes d: \Some.
User. Open the registry editor. Navigate to HKLM\SOFTWARE\Microsoft\Windows. NT\Current. Version\Profile. List. Search for “Profile. Image. Path” until you find the one that points at. Users\Some. User. Modify it so that it points at d: \Some. User. Use System Restore in case things go wrong. It’s a bit hackish, but it works very well! So if you ever needs to move. Recover lost network shares passwords under Windows 10/8/7/Vista/XP.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2018
Categories |