Jump to content

Disable My Music & My Pictures from My Documents


Recommended Posts

@ Gouki

It does remove some of the functions of My Documents, and if you use certain applications, they are still reported to return again.

I have no idea if the functions lost are of any real use, or what in fact they are.

If those cases are likely to bother you, the following my provide a suitable workaround. It will delete the folders, and fool the system into not recreating them.

<Edit>

It is intended only for existing systems, not unattended use, and although it may work in 2000+, it is only tested with XP.

</Edit>

NoPicMus.zip

Edited by Yzöwl
Link to comment
Share on other sites


i read that the proposal by Gouki

does work, but needs to be this way round

regsvr32 /S /u mydocs.dll

RD /S /Q "%userprofile%\My Documents\My Music"
RD /S /Q "%allusersprofile%\My Documents\My Music"
RD /S /Q "%userprofile%\My Documents\My Pictures"
RD /S /Q "%allusersprofile%\My Documents\My Pictures"

regsvr32 /S mydocs.dll

Why?

So it unregister mydocs.dll and then it can delete said files, and then the mydoc.dll needs to be registered so that they aren't re-created again.

@Marthax - would do you mean by?

What happends if I try to run this UA?

it does what you wanted it to do - remove the My Pictures & My Music folders - without your interaction.

Link to comment
Share on other sites

i read that the proposal by Gouki

does work, but needs to be this way round

regsvr32 /S /u mydocs.dll

RD /S /Q "%userprofile%\My Documents\My Music"
RD /S /Q "%allusersprofile%\My Documents\My Music"
RD /S /Q "%userprofile%\My Documents\My Pictures"
RD /S /Q "%allusersprofile%\My Documents\My Pictures"

regsvr32 /S mydocs.dll

Why?

So it unregister mydocs.dll and then it can delete said files, and then the mydoc.dll needs to be registered so that they aren't re-created again.

Thanks for fixing it up! :D Ill change it on my cleanup.cmd :D

Link to comment
Share on other sites

What happends if I try to run this UA?

I really have no idea, it would depend upon when in your setup you ran it and on your particular setup.

As far as the solution which is agreed to work is concerned, if these 'special folders' are called using their CSIDL from a program or however some of the MS apps do it, they can be easily recreated. Another thing to bear in mind is that, if you have redirected your folders, as part of your unattended setup, the batch would have to be run before you perform the redirection, or altered accordingly, with your new locations.

The method I offered in my attachment basically creates two empty, read only and hidden files, with the same name as the two folders it has just deleted. With those folders in place, an application cannot recreate them. So it could also effectively be run on a system later, if the method Gouki offered does fail at any time.

Link to comment
Share on other sites

@oioldman: Yzöwl said

It is intended only for existing systems, not unattended use, and although it may work in 2000+, it is only tested with XP.

That's why I asked the question

@Yzöwl: Thanks a lot man. I'll try it out within shortly :thumbup

Edited by Marthax
Link to comment
Share on other sites

I tried out both of these methods and none of them worked for me :no:.

@Yzöwl: I tried your program and combined it with the "RD" command to clean out the folders, but that didn't help a thing. When Windows boots up the first time, both of these folders are there.

@oioldman:

I used this:

regsvr32 /S /u mydocs.dll

RD /S /Q "%userprofile%\My Documents\My Music"

RD /S /Q "%allusersprofile%\My Documents\My Music"

RD /S /Q "%userprofile%\My Documents\My Pictures"

RD /S /Q "%allusersprofile%\My Documents\My Pictures"

regsvr32 /S mydocs.dll

but that didn't help it either. I added this to my cleanup file which executes using RunOnceEx. Am I doing something wrong perhaps?

Link to comment
Share on other sites

Have you thought about trying to add this too

REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Music" /t REG_EXPAND_SZ /d "" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Music" /d "" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Pictures" /t REG_EXPAND_SZ /d "" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Pictures" /d "" /f

Removing these Values from the Value Names may help! I'm not sure whether both the keys would need to go for each folder, but I can't see any point at this stage, trying to delete just one of them.

Link to comment
Share on other sites

That didn't work :no: I used this

;Unregistering My Music & My Pictures

regsvr32 /S /u mydocs.dll

RD /S /Q "%userprofile%\My Documents\My Music"
RD /S /Q "%allusersprofile%\My Documents\My Music"
RD /S /Q "%userprofile%\My Documents\My Pictures"
RD /S /Q "%allusersprofile%\My Documents\My Pictures"

regsvr32 /S mydocs.dll

REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Music" /t REG_EXPAND_SZ /d "" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Music" /d "" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Pictures" /t REG_EXPAND_SZ /d "" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Pictures" /d "" /f

and it didn't help a thing. If I listen to a song, these 2 folders pop up immediately. Any other ideas?

Edited by Marthax
Link to comment
Share on other sites

This is the only way I know how to stop XP re-creating them

- Open your My Documents folder.

- Assuming it's empty, delete the My Pictures folder.

- Right-click in an empty area in My Documents, select New, and then Text Document.

- Rename the new New Text Document.txt file to My Pictures (without a filename extension).

Note: if you don't see the .txt filename extension here, go to Tools -> Folder Options -> View tab, and turn off the Hide extensions for known file types option.

- Right-click your new My Pictures file, select Properties, and turn on the Read-only and Hidden options. Click OK when you're done.

This is abit of a cheating way but it works and stops programs re-creating the folders when they want them.

Link to comment
Share on other sites

Mike, that's basically what my attachment does, it is the only way I know that works too!

my attachment basically creates two empty, read only and hidden files, with the same name as the two folders it has just deleted.

Marthax, you could try re-arranging the order of your cmd so that you remove the reg keys first, or at least before you have re-registered the dll.

<Edit>

Why are you re-registering the mydocs.dll?

Also if the folder is re-creating when you use WMP, as I said earlier, some apps will do this, in WMP goto

  • Tools => Options => Copy Music

in Copy music to this location click Change and choose a location other than My Music then Apply.

</Edit>

Edited by Yzöwl
Link to comment
Share on other sites

I don't use WMP. I use Itunes.

It didn't work. I currently use this:

regsvr32 /S /u mydocs.dll

RD /S /Q "%userprofile%\My Documents\My Music"
RD /S /Q "%allusersprofile%\My Documents\My Music"
RD /S /Q "%userprofile%\My Documents\My Pictures"
RD /S /Q "%allusersprofile%\My Documents\My Pictures"

REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Music" /t REG_EXPAND_SZ /d "" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Music" /d "" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Pictures" /t REG_EXPAND_SZ /d "" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Pictures" /d "" /f

regsvr32 /S mydocs.dll

and that doesn't work. I also tried out the thing that your (Yzöwl) program creates and by that I mean to create 2 files with the same name as the two folders. That didn't work either.

Any other suggestions?

EDIT: Great news guys! I got it to work! And I found a easier way to solve the whole thing. The problem wasn't the tweak, it was Itunes. I don't know why, but Itunes creates these folders when you turn it on, even if you redirect the music folder. I tried out the foobar2000 and the folders didn't popup. Problem solved! :D

Here's what you need to do. Just insert this into your registry tweak file and it'll disable these folders.

;Disable My Music & My Pictures Folder
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoSMMyMusic"=dword:00000001

Thanks to you all for your replies :)

Edited by Marthax
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...