• This PC > Music is pointing to the wrong location. How to fix it?

    Home » Forums » AskWoody support » Windows » Windows 10 » Windows 10 version 22H2 » This PC > Music is pointing to the wrong location. How to fix it?

    Author
    Topic
    #2591884

    I am Win10/Pro. I am patched through the August Patch Tuesday updates. I am getting ready to update to the September ones.

    I have discovered that the location of This PC > Music (which is a System folder) is not C:\Users\personalfolder, but is instead C:\Users\personalfolder\OneDrive (which is a File folder). Thus, the System Music folder under This PC is pointing to the Music folder under OneDrive.

    PC A – Locations of the two Music folders – the same.jpg
    PC-A-Locations-of-the-two-Music-folders-the-same

    I have no idea how this happened.

    How can I get the location of the System This PC > Music to be its default System location of C:\Users\personalfolder?

    I have tried clicking on the button for restoring the default, but I get a dialog box that says C:\Users\personalfolder\Music does not exist and it asks if I would like to create it. When I say “yes”, it asks me if I want to move all of the files from C:\Users\personalfolder\OneDrive\Music to C:\Users\personalfolder\Music. I answer “yes” (although I do not have any files in the folder), but it then says “Can’t move the folder because there is a folder in the same location that can’t be directed.” If I say “no”, I get the same message about redirection. I think I get these messages because the locations of the two are the same.

    I’ve tried deleting the Music folder on OneDrive, but it comes back. I think this because the Music folder at C:\Users\personalfolder points to OneDrive and so makes it re-appear on OneDrive.

    I’ve unlinked them through my MS Account, but it looks like that didn’t do any good, because I still get the locations as indicated in the image above and the same messages.

    I’ve tried deleting the This PC > Music System folder, but that is not a choice on the right-click drop-down menu, probably because it’s a System Folder.

    There must be some way to untangle this so that the two folders are separate and distinct – i.e., so that the location of the This PC Music system folder is C:\Users\personalfolder and is not pointing to the OneDrive file folder. Here is how it looks on my other PC, where the locations are distinct.

    PC B – Locations of the two Music folders – different.JPG
    PC-B-Locations-of-the-two-Music-folders-different

    • This topic was modified 1 year, 7 months ago by WCHS.
    • This topic was modified 1 year, 7 months ago by WCHS.
    • This topic was modified 1 year, 7 months ago by WCHS.
    Viewing 15 reply threads
    Author
    Replies
    • #2591891

      WHCS,

      In the registry editor navigate to:

      Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

      1. You’ll find all the standard folders on the right hand side.
      2. Right-Click on My Music
      3. Enter the correct path in the Value data field.
      4. Click Ok.

      Change-Shell-Folders

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      1 user thanked author for this post.
      • #2591906

        In the registry editor navigate to:

        I don’t have the faintest idea of how to use the Registry Editor.

        Could I go to Control Panel > Programs & Features and uninstall Microsoft OneDrive? and Restart afterwards?

        What would happen to the location for This PC > Music then, since OneDrive no longer exists? Would the system create a new defaut location for This PC > Music, making it C:\Users\personalfolder?

    • #2591926

      I don’t have the faintest idea of how to use the Registry Editor.

      See Creating, Editing, or Deleting Registry Keys at
      https://www.landfx.com/kb/computers-networking/computer/item/3067-regkeys.html
      or probably 100s of other sites.

      Windows 10 Home 22H2, Acer Aspire TC-1660 desktop + LibreOffice, non-techie

    • #2591942

      The default location is %USERPROFILE%. (Type it in the Explorer address bar)
      Under here you should have Documents, Music, Pictures etc.
      If you have a Music folder, click on it to see what it contains. If you don’t have one it has been moved.

      From your description it seems you already have a Music folder in the correct location. Check the permissions by right clicking > Properties > Security. You should have all permissions except “special”.
      If all is OK you need to make the registry change RG mentioned and then reboot.

      cheers, Paul

      • #2591999

        The default location is %USERPROFILE% …

        Is This PC the same as %USERPROFILE%? This is what I show at This PC. The Music folder is there, so I have it.
        5482-what-This-PC-displays

        Except for the Music folder, they all show a location of C:\Users\personalfolder. (I am using a cover term for “personalfolder” I am not stating my actual personalfolder name, but I know what it is.)

        The Music folder (the exception) shows a location of C:\Users\personalfolder\OneDrive. I think it should be C:\Users\personalfolder, just like the other six system folders. Because it “points” like this, it is throwing an error in my backup program (telling me that it skipped backing up the System folder C:\Users\personalfolder\Music). That it failed to back up this folder is of no consequence because the C:\Users\personalfolder\OneDrive\Music folder (the folder pointed to) is empty, i.e., I haven’t put any files there). But I’m afraid this “pointing” might throw an error when I try to install the September 12 Patch Tuesday updates. That’s why I want to get the location of the system folder This PC > Music back to C:\Users\personalfolder.

        I checked the Properties security tab for the Music system folder. All permissions for SYSTEM are allowed, except “special permissions”.

        I need for someone to hold my hand – either
        a. by making a Windows 10 REG file (with the extension .txt which I will later change to .REG), which I can edit in order to put in the correct path in the Value data field. If I understand this correctly, would it be C:\Users\”personalfolder”\Music (my real personalfolder name inside the quotes and the quotes deleted) where RG has G:\BEKdocs\Music — in other words, “G:” becomes “C:”, and “BEKdocs” becomes “Users\personalfolder”, and “Music” remains “Music” (quotes omitted)? But I also wonder about finding My Music as one of the standard folders. My This PC screen shows Music and not My Music, as you see in the screenshot.

        or

        b. giving me some Windows 10 screenshots to show me where I will find Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders . (I can navigate the GUI in gp edit and I think navigating the Registry works in a similar way.)
        AND confirming that following RG’s example, “G:” becomes “C:”, and “BEKdocs” becomes “Users\personalfolder”, and “Music” remains “Music” (quotes omitted) – if that is what the substitutions should be for the path in RG’s Value data field.

        • #2592030

          WCHS,

          Ok here’s the registry file (.txt) you only need to change “personalfolder” to your user name.

          Rename the file .reg then double click it and select merge.

          I’d suggest taking a Restore Point before doing this!

          MyMusic

          May the Forces of good computing be with you!

          RG

          PowerShell & VBA Rule!
          Computer Specs

          • #2596167

            I’ve just started working on this.

            My browser is Firefox. When I click on the link “My Music” in your post, I get a screen that looks like this.
            contents-of-MyMusic-link

            It doesn’t download as a .txt file. As a matter of fact, it doesn’t download at all — there is no dialog box to ‘open’ or ‘save’ — nothing except a screen that shows the contents of the link.

            But, I can copy the screen contents into NotePad and get a .txt file that way.
            Is that the way to go to get a .txt file?

            If so, before I change the .txt extension to .REG, let me ask: Are there supposed to double slashes after the equal sign in the 3rd line? or single slashes?
            i.e., should it read “My Music”=”C:\\Users\\personalfolder\\Music” with quotes, my real personalfolder name, and double backward slashes?

            or should it read “My Music”=”C:\Users\personalfolder\Music” with quotes, my real personalfolder name, and single backward slashes?

            Thanks.

            • #2596178

              Yes, the double backslashes are required.

              Your browser must have the .reg filetype blocked.

              I just tested this and true it comes as a .txt file. However, you can right-click the item and use Save As then change the filetype to .reg. Remember to enclose the entire filename in double quotes to prevent Save As adding a .txt to the end.

              May the Forces of good computing be with you!

              RG

              PowerShell & VBA Rule!
              Computer Specs

            • #2596184

              Your browser must have the .reg filetype blocked.

              You uploaded it as a txt file.

            • #2596185

              However, you can right-click the item and use Save As

              This is the context menu that I get when I right-click on the MyMusic link — no ‘Save As’ is there.

              context-menu-of-right-click

              Does it have the Mark of the Web? I can’t even get a ‘Properties’ dialog box that would allow me to get rid of the Mark of the Web.

              You’re right — there must be something in my browser that disallows this file. I can only get a screen that shows the contents of the file — that’s the screenshot above.

              I’ve tried the right-click in Edge, also. No ‘Save as” there, either:
              context-menu-of-right-click-in-Edge

            • #2596189

              Save Link As works.

              1 user thanked author for this post.
            • #2596191

              Save Link As works.

              Yes, it does. Whew!! 🙂

            • #2596198

              Yes, the double backslashes are required.

              OK, you’ve verified the double backward slashes.

              Now, about the “My Music”= part of the last line in the .txt file which will become a .reg file:
              contents-of-MyMusic-link-1

              My 7 system folders do not have the ‘My’ in the name.
              Here is how the 7 display (no ‘My ‘ is there):
              My-system-folders

              So, does the last line of the file say:
              My Music“=”C:\\Users\\personalfolder\\Music” (with quotes)?

              Or should the last line say:
              Music“=”C:\\Users\\personalfolder\\Music” (with quotes)?

              P.S. The quote marks here in the post look like they are slanted, but in the .txt file itself (and in the AskWoody edit screen), they are straight up & down.

            • #2596225

              My 7 system folders do not have the ‘My’ in the name. Here is how the 7 display (no ‘My ‘ is there):…

              I have the very same Windows 10 installation you do, and my folders look the same as yours.

              BUT, in the registry location mentioned above by @RetiredGeek, some of them DO have the “My” in front of their names, specifically (in the order they’re listed in the registry location) My Music, My Pictures and My Video.

              So, even though you’re putting the word “My” in the registry modification file (yes, it appears that it is required there), it won’t show up in Explorer when you launch “This PC” or launch File Explorer by other means.

              I hope this helps clarify things a bit.

              BTW, to use the registry editor, first make sure you know EXACTLY where you want to go within the registry. Then, right click on the Start menu’s button in the lower left corner of the screen. Click on the word “Run” and then type “regedit” (without the quotes, of course) in the box that comes up. That will launch the registry editor for you.

              As far as abbreviations that are frequently used when referring to items within the registry and its’ keys, HKCU stands for HKEY_CURRENT_USER and HKLM stands for HKEY_LOCAL_MACHINE. This is exactly as they appear in the registry editor.

              I added emphasis about knowing exactly which key in which location you need to add or modify, because modifying the wrong key in the wrong location by mistake can have seriously negative effects. I would NOT suggest opening up the registry editor just to have a cursory look around.

              For further guidance regarding using the registry editor, please see the second paragraph in DrCard:)) ‘s post below, number 2592554, if you haven’t already.

            • #2596237

              I added emphasis about knowing exactly which key in which location you need to add or modify, because modifying the wrong key in the wrong location by mistake can have seriously negative effects. I would NOT suggest opening up the registry editor just to have a cursory look around.

              This post tells me what I am looking for. A screenshot of the registry location would help.

              I had thought I’d look around to see if I could find it, but I’ll take your advice about knowing exactly where to go. It seems to me that it’s something like navigating the GUI of the Group Policy editor, though, so I have some rudimentary experience with a GUI like this.

              I’m going to read Drcard’s documents, too.
              I know that I definitely need to learn this — and get over the fear.

              Right now, I just need to know for sure whether it’s “My Music”= or “Music”= in the .txt-file-that-will-become-a-.reg-file.

              On my Windows 7 machine, it’s Computer > C: > Users > personalfolder > My Documents or My Music or My Pictures or My Videos.
              On my Win 10 machines, it’s This PC > C: > Users > personalfolder > Documents or Music or Pictures or Videos.

              So, that’s why I am asking if for a Win 10 machine, will the .txt-file-that-will- become-a-.reg-file have “My Music”= or “Music”=?

            • #2596239

              As previously stated (by me and by @RetiredGeek ), the entry in the registry for the folder labeled “Music” in File Explorer, and which is in your personal profile, is actually labeled as “My Music” in the registry location mentioned by @RetiredGeek , so therefore the entry in the file that you’ve been provided needs to say “My Music” as previously instructed by @RetiredGeek .

              Use the file EXACTLY as instructed by @RetiredGeek (including any modifications that he pointed out) and you’ll be all set.

              As you’re seeing, Windows 10 is a different beast than Windows 7, so in this case, you CAN’T directly compare one registry entry on 7 to the same entry on 10. PLEASE DON’T do this in this case.

              As shown in the post you mentioned, the “Value name” field MUST say “My Music” and the “Value data” field must point to your user profile’s folder labeled “Music”. Therefore, the file must have the “My Music” listing in the correct location for the file to work.

              BTW, just as another example, the folder in your profile that shows up in Explorer as “Documents” (as in the old “My Documents”) is actually called “Personal” in the registry location where the Music folder is called “My Music”.

              This is most easily explained via a screenshot, but I’m having a hard time getting the snipping tool to work properly.  🙁

              EDIT: I got the snipping tool to work!! YAY!! Below is a screenshot of the registry location being talked about. In the screenshot, you’ll see just what we’ve been talking about…the names of the entries and the locations those entries point to on the computer’s drive(s). Pay particular attention to the entries in the blue circles, as those are of special concern here.

              Registry-folder-locations

            • #2596244

              PLEASE DON’T do this in this case.

              Thanks for helping me get a better grip on this. I want to know, not for this particular instance, but for future use as well. I’m not a tech geek, so I depend on good advice and assistance from techies. And I try to absorb as much as I can that way.

              Comparing gives me some foundation (it’s a way of learning), but I don’t assume that things should be the same.

              As a matter of fact, I don’t assume anything. If I don’t know, I ask.
              Many, many people have lent me their expertise here on AskWoody.

              I (and my devices and my data) wouldn’t have survived as long as they have without the goodwill of people here.

              1 user thanked author for this post.
            • #2596246

              I was just trying to make sure you weren’t trying to use settings within the Windows 7 registry for the Windows 10 registry. In many cases, that could lead to a small disaster.

              I hope the inclusion of the image from the registry helped clear things up for you.

              Basically, even though the folder is listed as “My Music” within the registry, it will still show up as “Music” in File Explorer, and will be located within your user profile at \Users\(whatever your user name is)\Music.

            • #2596255

              hope the inclusion of the image from the registry helped clear things up for you.

              I see the image now, looking at the post later. This is a great help!! Thanks.

            • #2596264

              The MyMusic is a holdover from Windows 7. Music & MyMusic are the same location.
              Even my Win 11 shows just Music yet the redirection works.

              See this post on ElevenForum and you’ll see what I mean.

              May the Forces of good computing be with you!

              RG

              PowerShell & VBA Rule!
              Computer Specs

          • #2597690

            WCHS,

            Ok here’s the registry file (.txt) you only need to change “personalfolder” to your user name.

            Rename the file .reg then double click it and select merge.

            I’d suggest taking a Restore Point before doing this!

            MyMusic

            1. I changed the .txt file so that personalfolder is my real personalfolder name.
            2. I created a Restore point.
            3. I changed the extension on the .txt file to .reg
            4. I double-clicked on the .reg file and selected ‘Merge.’
            5. I got a dialog box that the operation had completed successfully.
            6. I then right-clicked on This PC > Music, clicked on ‘Properties’ in the context menu, clicked on the Location tab in the Properties dialog box and it says that the Location is still C:\Users\personalfolder\OneDrive\Music . I don’t know what got changed, but the location is not what the .reg file said it should be, i.e., C:\Users\personalfolder\Music.

            I undid the system changes (whatever they were) to the restore point I had created in step 2.

            Can you figure out why the .reg file didn’t do what it was supposed to do?

            Here is the contents of the .reg file — (it had my personalfoldername in place of the x’s.)
            contents-of-the-reg-file

            I am Windows 10 22H2.

            • #2597766

              When I make changes to the registry su as the file you used, I always reboot the computer right afterwards to make sure that the change(s) take(s) effect.

              Try re running the file, but this time reboot after merger has successfully completed. Then check your computer to see where it takes you when you open the Music folder.

              From what you posted, it doesn’t sound like you rebooted because you didn’t say that you actually did

               

              2 users thanked author for this post.
            • #2597773

              Adding to my post above, there are some things that don’t take effect immediately, but in stead take effect the next time the computer is started. This is because the registry settings for that item are only read when the computer starts up, or is booting up. The settings for Windows Explorer (what shows you the contents of folders on your computer) are one of those because its executable, explorer.exe, is launched when the computer boots and stays running until it is either terminated by another process, by the user via Task Manager (usually NOT a good idea) or when the computer is shut down (powered down) or during a reboot when the entire registry is read when the computer is restarting.

              I hope this helps!

              EDIT: I caught a typo in my un-logged-in post above. Where I said

              “When I make changes to the registry su as the file you used…”

              I should have typed “When I make changes to the registry such as the file you used..” End of EDIT.

              P.S. My thanks that show in the post above aren’t meant as me thanking myself for the post but, rather, for the on-duty Manager (whomever it may have been) who allowed my anonymously entered post above to be moderated so quickly after having been posted. I’ve seen many posts languish for up to hours sometimes waiting to be moderated in the not too distant past. Some rightfully so, some maybe not so rightfully so.  😐  Still, my thumbs up for the Moderator who may currently be “on”.

              Remember, folks, all moderators here are volunteers, I believe.

              OK, enough of this P.S. item, as it’s actually off-topic.

            • #2597900

              From what you posted, it doesn’t sound like you rebooted because you didn’t say that you actually did

              After Step 6, when I saw that there wasn’t the change called for in the .reg file, I concluded that I should Restart in order to see it. I did not shut down and then power up again afterwards. I restarted this way: right-click on Start button, hover over ‘Shut down or sign out’ where 4 choices show up (which were Sign out, Sleep, Shut down, and Restart), and I selected ‘Restart’. Is this what you mean by ‘reboot’? So, this is Step 7.

              Then, when the system came back up again, I checked This PC > Music and there was no change. The location was still C:\Users\personalfolder\OneDrive\Music. So, this is Step 8 = Step 6.

              Maybe, I should have selected ‘Shut down’ and then powered back up again in Step 7?

    • #2592483

      Is This PC the same as %USERPROFILE%?

      No it is not. That is a list of shortcuts and recent files.

      cheers, Paul

    • #2592554

      Is This PC the same as %USERPROFILE%?

      %USERPROFILE% is an Environment Variable which are universal Path address shortcuts which Windows creates for the specific installation on the current PC. The attached PDF explains these Environment Variables, where to see the Environment Variables on your PC, and how to create your own (which makes writing commands much easier).

      Environment-Variables-Path-Address-Code-Words

      don’t have the faintest idea of how to use the Registry Editor.

      This may help in explaining how to use the Registry Editor safely. I wrote this article many years ago, but is still applicable except the example with Internet Explorer.

      Taking-the-Fear-Out-of-the-Registry

      Maybe these will help you.

      HTH, Dana:))

    • #2597901

      Can you perform the steps in post #2591942 above?

      cheers, Paul

      1 user thanked author for this post.
      • #2598342

        Can you perform the steps in post #2591942 above?

        Here is some information regarding your post at #2591942

        Below are two screens 1) the display at C:\Users\xxxxxx and the display at %USERPROFILE%. (xxxxxx is the name of my personal folder). I do not have any listing of a Music folder at the former, but I do have it appearing in 3 places in the latter.
        C:\Users\xxxxxx
        5482-C-Users-xxxxxx-files-and-folders

        %USERPROFILE%
        5482-USERPROFILE-files-and-folders

        The problem is that although the Music folder shows up in the %USERPROFILE% display, its location is not C:\Users\xxxxxx\Music (what it should be), but instead is C:\Users\xxxxxx\OneDrive\Music. The location needs to be put back to C:\Users\xxxxxx\Music (the default).

        I cannot change the old location C:\Users\xxxxxx\OneDrive\Music to the new location C:\Users\xxxxxx\Music (the default), either by moving or restoring the default. When I get this dialog box (this one is about moving, but I get a similar one when trying the restore the default), and answer either ‘yes’ or ‘no’,
        3-old-location-new-location-move-files
        I get this next dialog box.
        4A-cannot-move-cannot-be-redirected

        I’m not sure, but I think it’s because the two locations comprise a circular reference.

        Running the RG .reg file doesn’t seem to fix things. The location of the Music folder is still C:\Users\xxxxxx\OneDrive\Music. It doesn’t get put back to C:\Users\xxxxxx\Music.

        P.S. The .reg file is at #2597690.

        • #2598367

          Here are the dialog boxes that I get when trying to restore the default. I chose the Restore Default and hit ‘Apply’
          1-Restore-Default-of-This-PC-Music

          Then, this dialog box appears:
          2-This-PC-Music-does-not-exist-do-you-want-to-create-it

          And then it doesn’t allow the default to be restored because there is a folder in the same location that cannot be redirected.

    • #2598464

      WCHS,

      One drive is a PAIN IN THE …!

      If you don’t use OD I’d suggest the following:

      1. Copy the Music files from your Onedrive\Music folder to an external device.
      2. Uninstall One Drive! Note: you can still get to your One Drive account via the web and drag and drop files in there, this is what I do
      3. Re-Boot!
      4. Now try to apply the registry file.
      5. Re-Boot!
      6. If that works you can copy your files to the new location from the external device.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #2598603

        The OneDrive directory/folder still exists in the Navigation Pane, after uninstalling the OneDrive app. But, by right-clicking on the root OneDrive directory in the Navigation Pane, I was able to delete it. However, it came back in a few minutes, with all of the files and folders gone, except for the OneDrive Music folder.

        I’m sure it comes back because the System Music folder needs for it to exist because the System Music folder points to it.

        I thought the deletion of the OneDrive directory would force the System Music folder to revert to its default, making its location C:\Users\xxxxxx. But, not so. It wants to keep it the way it was before, and therefore insists on the existence of the OneDrive directory. Why? it needs its Music folder because that’s the location that the System Music folder points to.

        The .reg file does not fix this, not even after a restart.

    • #2598663

      I can’t see why there is a Music folder in USERPROFILE but not in C:\users\xxx. Are they the same location?

      cheers, Paul

      • #2598784

        I can’t see why there is a Music folder in USERPROFILE but not in C:\users\xxx. Are they the same location?

        I don’t know why, either. I have no idea how they got that way.

        This Music folder also shows up in This PC, though.
        5482-This-PC

        All Music folders lead to C:\Users\xxxxxx\OneDrive\Music.

        If I run shell:My Music, it takes me inside this OneDrive folder.
        If I run shell:OneDriveMusic, it takes me inside this same OneDrive folder.

        This is the core of the problem — both Music shell folders lead to this same location.
        They need to lead to separate locations:
        1) This PC > Music (i.e., My Music) should be at C:\Users\xxxxxx
        2) OneDrive > Music should be at C:\Users\xxxxxx\OneDrive

    • #2598763

      There’s actually four different locations in the registry that contain the pointers for the Music, Pictures & Video folders. The .reg file RetireGeek provided only changes the HKEY_CURRENT_USER Shell Folders entry, so it’s possible one of the others is causing your problem.

      The four locations  are:

      HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
      HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
        • The “keys” for these two are My Music, My Pictures & My Video
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
        • The “keys” for these two are CommonMusic, CommonPictures & CommonVideo

      I’d suggest you take a look at the other three and see if maybe one of them is pointed at that OneDrive folder and, if so, modify it to point at your preferred folder instead.

      Note: the HKEY_LOCAL_MACHINE entries apply to “all users” on a PC so those entries must point to %USERPROFILE%\Music, %USERPROFILE%\Pictures & %USERPROFILE%\Video… unless you want all users on your PC to share a common location for each of those file types.

      On my PC I have them pointing to C:\Documents\Music, C:\Documents\Pictures & C:\Documents\Video because I’m the only user of my PC.

      • #2598788

        There’s actually four different locations in the registry that contain the pointers for the Music, Pictures & Video folders.

        Are there PowerShell commands (or command prompts) that I could use to query these Music, Picture, and Video spots in the registry to see what is there?
        The three types (Music, Pictures, and Video) should be similar, right? If I see something for Music that does not match Pictures and Video in the results of the queries, then I might be able to see where the problem is.

        • #2598805

          You can use the “req query” command to display the value of any registry entry.

            reg query keyname /v valuename

          Note: you “must” place quotes around the keyname or valuename if it contains blank spaces (like User Shell Folders or My Music).

          HKCU = HKEY_CURRENT_USER and HKLM = HKEY_LOCAL_MACHINE.

          Here are the commands needed to query the current values for the “Music folder” pointer in each of those four locations.

          reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Music"
          reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Music"
          reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "CommonMusic"
          reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "CommonMusic"

          The results will be displayed as Name, Type and Data like this:

            My Music    REG_SZ    C:\Documents\Music
            
          1 user thanked author for this post.
          • #2598973

            …“req query” command to display the value of any registry entry.

            It looks like the 2nd query is telling me something important for figuring out the problem:

            1st query (about Shell Folder for My Music)
            result is: My Music REG_SZ C:\Users\xxxxxx\Music
            (This was also in RG’s .reg file)

            **2nd query (about User Shell Folder for My Music)
            result is: My Music REG_EXPAND_SZ %USERPROFILE%\OneDrive\Music
            I used the command prompt set and I see that USERPROFILE is a ‘cover term’ for C:\Users\xxxxxx
            so this must be telling me that the User Shell Folder is C:\Users\xxxxxx\OneDrive\Music

            I get this same location when I look at the current target location of the System Music Folder, too.
            5482-System-Music-Folder-properties-find-target

            But, the target location is supposed to be C:\Users\xxxxxx\Music (i.e., NOT in the OneDrive folder, but in the User folder {which I have been calling ‘Personalfolder’} )

            • #2599002

              The User Shell Folder for My Music must be where the problem lies.
              I say this because I changed the My Music query for the User Shell Folder so that it would a query for the My Pictures User Shell Folder instead.

              These are the responses for the two User Folder queries, one for My Music and the other for My Pictures.
              5482-2nd-query-for-My-Music-and-for-My-Pictures

              The one for My Music has OneDrive in the path.
              The one for My Pictures does not.

              This leads me to believe that the problem of the System Music folder wrongly pointing can be fixed with a registry change so that the
              User Shell Folder for My Music looks like the User Shell Folder for My Pictures.

              I have uninstalled the OneDrive app now. But, I can not delete the OneDrive folder. I think this is because its Music subfolder is currently required because it is the location that System Music folder points to. (I look at it this way: If the subfolder cannot be deleted, then its dominating folder can’t be deleted either.) I was able to delete all of the other OneDrive subfolders and files, but the OneDrive Music folder persists — I think for the reason I’ve just given.)

              Maybe, if Music System Folder points properly to C:\Users\xxxxxx, then the OneDrive Music folder (whose location is C:\Users\xxxxxx\OneDrive\Music – i.e., it points to its own location) can be deleted and so can the OneDrive folder.

              I wonder what a .reg file looks like to make the proper pointing happen. RG’s .reg folder doesn’t hit the right place in the registry. I think we know what the place is now … but I’m not sure what the .reg statement would look like. I think it would look like RG’s statement, except that it would say ‘User Shell Folder’ and not ‘Shell Folder’ (quotes omitted, of course). And the “X”=”Y” in the 2nd line looks the same and with double slashes?? Just a guess here — I’m working mostly by analogy.

              P.S. for reference, RG’s .reg file is at #2597690.

    • #2598806

      Here’s the PowerShell equivalent:
      \

      Clear-Host
        
      $ShellFoldLoc = [Ordered]@{}
      
      $Folders = @("MyDocuments","MyMusic","MyPictures","MyVideo")
      
      ForEach ($Folder in $Folders) {
      
         $ShellFoldLoc +=
           @{$Folder = $([Environment]::getfolderpath($Folder))}
      
      } #End ForEach ($Folder...
      
      $ShellFoldLoc
      

      Results:

      Name                           Value                                           
      ----                           -----                                           
      MyDocuments                    G:\BEKDocs                                      
      MyMusic                        G:\BEKDocs\Music                                
      MyPictures                     G:\BEKDocs\Pictures                             
      MyVideo                        G:\BEKDocs\Videos                               
      

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #2598808

        RetiredGeek, just FYI…

        Your powershell command generates a a bunch of unexpected token errors in Powershell.

        *** Never mind, your new version works! ***

        BTW, it only displays the Shell Folder values not the User Shell Folder values and only for the HKEY_CURRENT USER branch not the related HKEY_LOCAL_MACHINE branch.

        The reg query commands I posted will display the values from all four locations since one of those “alternate locations” could be what’s causing WCHS’s problem.

    • #2598882

      @WCHS

      After reading one of @RetiredGeek ‘s posts from yesterday evening (#2598464) and your images from yesterday that included the specific error messages on them, it occurred to me that there might be two different things at work here. First things first, though, continue with your current path that he, @Paul-T , and @n0ads  are helping you with.

      If that doesn’t seem to bear any fruit despite their efforts, then you might need to take a look at the Properties dialog box for the OneDrive folder and then take a look at the Security tab of that folder’s properties. One of your error messages said that access was denied. These types of messages can occur if you don’t have the proper access permissions to a file or folder that you want to open. These permissions are set in the Security tab of that file or folder’s properties.

      You can take a look, but DON’T try setting anything within the Security properties box tab without specific guidance from those who are currently helping. I once thought I was setting permissions correctly for a folder that Windows uses for some of its goings on but what I wound up doing was locking myself out of that folder and really screwing things up. Good thing that restore points and other accounts to log in as an administrator existed!

      BTW, IIRC I seem to recall seeing a troubleshooting sequence here on AskWoody in the past that involved setting permissions for a certain couple of registry locations properly so that a computer administrator could change them to values that were needed to enable a function to behave properly. Hopefully, though, the solution for this conundrum doesn’t come down to that.

    • #2598929

      you might need to take a look at the Properties dialog box for the OneDrive folder and then take a look at the Security tab of that folder’s properties

      Following the advice early on of @Paul-T at #2591942, I did look at the permissions of C:\Users\xxxxxx\OneDrive. The permissions are all “Allow” (none for ‘Special permissions’ as expected), and under the “Advanced” button, SYSTEM, Administrators, and xxxxxx have ‘Full Control’ Access, inherited from C:\Users\xxxxxx and applying to the OneDrive folder, its subfolders, and its files.

      So, I don’t think anything is amiss with the permissions of c:\Users\xxxxx\OneDrive.

      As a matter of fact, the permissions are the same for this OneDrive folder on my other PC. I was able to uninstall the OneDrive app on that PC, just like I was able to uninstall the OneDrive app on the problematic PC, as well. On both PCs, the OneDrive folder and its folders & files did not go away after the uninstall. For the non-problematic PC, I had first to go to onedrive.com and delete the files and folders there (they went to the OneDrive Recycle Bin). I then signed out of onedrive.com. After that, I was able to right-click and delete the empty OneDrive folder on that PC.

      So, since the permissions of the OneDrive folder are the same on both PCs and since the OneDrive folder on the non-problematic PC was able to be deleted, it is clear that there is nothing amiss with the permissions.

      The OneDrive folders on the two PCs are not linked and because of that 1) not all the files within the OneDrive Documents folders are/were the same, and 2) the OneDrive folder on the problematic PC is subject to deletion in a different way (i.e., not via onedrive.com) To the point, on the problematic PC, after uninstalling the OneDrive app, I was able to right-click on the OneDrive folder to do the deletion; everything that could be deleted disappeared (into the PC’s Recycle Bin) in one fell swoop (instead of being required to go to onedrive.com to do the deletion of files and subfolders, ticking them one by one).

      The only item that could not be deleted was the OneDrive Music folder and because the OneDrive Music folder could not be deleted, the containing OneDrive folder could not be deleted either. But, this is not a permission problem, I don’t think. I think the reason it can not be deleted is that it is being pointed to by a System folder (the System Music folder). If it were to be deleted, what would the System Music folder be pointing to? Nothing. To point to nothing is not possible. So, this OneDrive Music folder has to continue to exist, and exist where it is, i.e., its location cannot be changed.

      That’s why the access is denied. You can’t fiddle with it.

      I had originally thought that if the System Music folder ended up pointing to nothing, its default would take over (the default being C:\Users\xxxxxx\Music). But the default evidently doesn’t take over.

    • #2599023

      Have you tried changing both the HKCU values and rebooting, then re-reading the values?

      The easiest way to change them is to run regedit and edit the values carefully to remove OneDrive.
      To run regedit, Start/flag, type:regedit Enter

      cheers, Paul

    • #2599287

      Have you tried changing both the HKCU values and rebooting, then re-reading the values?

      What I asked in my latest post was this:

      I wonder what a .reg file looks like to make the proper pointing happen. RG’s .reg folder doesn’t hit the right place in the registry. I think we know what the place is now … but I’m not sure what the .reg statement would look like. I think it would look like RG’s statement, except that it would say ‘User Shell Folder’ and not ‘Shell Folder’ (quotes omitted, of course). And the “X”=”Y” in the 2nd line looks the same and with double slashes?? Just a guess here — I’m working mostly by analogy.

      P.S. for reference, RG’s .reg file is at #2597690.

      This is RG’s .reg file (my personalfolder name {aka user-folder name} goes in place of the xxxxxx)
      MyMusic-xxxxxx

      Following @n0ads’ lead, at my latest post (link to it is above), I provided a rationale for why the My Music User Shell Folder seems to be the key to be modified, rather than the key for the My Music Shell Folder.

      So, right now, I am looking for some feedback on this (the content in the block quote), before I take steps to change the HKCU My Music User Shell Folder value. The HKCU My Music Shell Folder value has already been changed, but it didn’t make any difference because it had been that value before.

      • #2599320

        Yes, if you modify RG’s .reg file and simply replace Shell Folder with User Shell Folder it’ll remove the OneDrive reference which “should” fix your problem… as long as the CommonMusic setting for User Shell Folder in HKEY_LOCAL_MACHINE doesn’t also contain the same OneDrive reference.

        • #2599358

          Yes, if you modify RG’s .reg file and simply replace Shell Folder with User Shell Folder it’ll remove the OneDrive reference which “should” fix your problem… as long as the CommonMusic setting for User Shell Folder in HKEY_LOCAL_MACHINE doesn’t also contain the same OneDrive reference.

          Does the .REG file for modifying the My Music User Shell Folder key look like #1 or #2: (I will put my real user name (aka personalfolder name) in place of the xxxxxx)

          for-reg-file-code

    • #2599348

      n0ads,

      In my registry the “User Shell Folders” all point to the Public (Shared) folders!
      User-Shell-Folders
      Except those pointing to ProgramData.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #2599352

        RG and n0ads:

        my reg queries come back with MyCommonMusic, MyCommonPictures, and MyCommonVideo looking the same as in RG’s post. No OneDrive in them.

        • #2599404

          You don’t want to change the common values, only the user specific ones.

          The correct value for User Shell Folders is %USERPROFILE%\\Music

          Your reg file should have both the Shell and User Shell values. e.g.

          Windows Registry Editor Version 5.00
          
          [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
          "My Music"="C:\\Users\\xxxxx\\Music
          
          [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
          "My Music"="%USERPROFILE%\\Music"
          

          cheers, Paul

          1 user thanked author for this post.
        • #2599445

          I’ve never used OneDrive (it’s been disabled since day 1 on my Windows 10) and I only mentioned it because I thought OneDrive “might” have also modified the CommonMusic setting to %PUBLIC%\OneDrive\Music which could also cause problems.

          It’s good that it didn’t do that!

          Just FYI for everyone, I disabled\deleted all the %PUBLIC% folders on my PC (I have a standalone PC that doesn’t share anything with another PC) so I have my Common Folders pointed at fixed folder locations on my PC as follows.

          HKLM-User-Shell-Folders

          • #2599521

            I’ve never used OneDrive (it’s been disabled since day 1 on my Windows 10)

            Once I get this pointing problem resolved, I want not to ever have OneDrive appear again. Right now I have the OneDrive app uninstalled and as much as can be possible has been deleted in the OneDrive Folder. I hope to get to the point where EVERYTHING in the OneDrive folder and the OneDrive folder itself can be deleted.

            Then, I want to disable OneDrive. How do you do that?

          • #2599524

            The correct value for User Shell Folders is …

            Hi @paul-t,
            I’d like to ask you a question about your last post.
            Here you say that the new .reg file for the key-change of the My Music User Shell Folders should look like this (I think there is a missing double-quote in your first assignment statement–the one for Shell Folders):

            Windows Registry Editor Version 5.00
            
            [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
            “My Music”=”%USERPROFILE%\\Music”
            

            ————————
            @nOads, in 2599320, says only to replace the phrase Shell Folder with the phrase User Shell Folder and to leave the 2nd line as it is. Thus, going by n0ads,

            Windows Registry Editor Version 5.00
            
            [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
            “My Music”=”C:\\Users\\xxxxxx\\Music”
            

            Note: In my Environment variables (accessed by typing set at the command prompt), it says
            USERPROFILE=C:\Users\xxxxxx
            (my real user name {aka personalfolder name} will appear where the xxxxxx is)
            —————————
            Question 1: In the above, are the two 2nd lines of the key-change for User Shell Folders equivalent (i.e the 2nd line being the one that sets the value) , i.e., it makes no difference whether one or the other is used in the new .reg file? In other words, for the key-change for the User Shell Folders

            “My Music”=”C:\\Users\\xxxxxx\\Music”

            is/does the same thing as

            “My Music”=”%USERPROFILE%\\Music”

            when USERPROFILE=C:\Users\xxxxxx ?

            Question 2: Since changing the key for My Music Shell Folders has already been done when I ran RG’s .reg file, do I need to put the key-change in this new .reg file and therefore run that command again along with changing the key for My Music User Shell Folders? In other words, I’m asking if BOTH the key-change for My Music Shell Folders AND the key-change for My Music User Shell Folders should be in the new .reg file? Or is it sufficient for only the key-change for My Music User Shell Folders to be in the new .reg file?

            Question 3: If both key-changes are required, then is it the case that the key-change for Shell Folders should come before the key-change for User Shell Folders? i.e., is the order of these two important?

            P.S. by ‘key-change’, I mean changing the value of the key.

    • #2599628

      You are right, I missed the second quote in the Shell Folders line.

      1. No they are not the same. Add the double quote, change xxxx to your real location and leave everything else alone.

      2. Make both changes again. No harm will come of it.

      3. The order doesn’t matter.

      Reboot and read the values afterwards, then test.

      cheers, Paul

    Viewing 15 reply threads
    Reply To: This PC > Music is pointing to the wrong location. How to fix it?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: