中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-07 18:48
48,041 topics / 350,128 posts / today 3 new / 48,252 members
DOS批处理 & 脚本技术(批处理室) » How to delete these three registry values
Printable Version  2,315 / 18
Floor1 5872169 Posted 2008-03-08 09:37
高级用户 Posts 474 Credits 959
Under the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
there are these three values: My Music, My Pictures, and My Video. I want to write one piece of code to delete them all at once. Please, an expert, write some code for me! The value names are all MY*

[ Last edited by 5872169 on 2008-3-8 at 01:55 PM ]
Floor2 5872169 Posted 2008-03-08 11:16
高级用户 Posts 474 Credits 959
Please, an expert, write a piece of code
Floor3 slore Posted 2008-03-08 11:58
铂金会员 Posts 2,478 Credits 5,212
Pattern matching isn't supported.
You can use for... and put those 3 elements inside: music, pictures, video.
Floor4 5872169 Posted 2008-03-08 12:02
高级用户 Posts 474 Credits 959
Could I trouble slore to help me write a piece of code?
Floor5 wxcute Posted 2008-03-08 12:03
中级用户 Posts 211 Credits 458
Edit it with Notepad, save it as: "Delete Personal Documents.reg"
Just double-click it to run it.
================
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"My Music"=-
"My Pictures"=-
"My Videos"=-
================
Floor6 5872169 Posted 2008-03-08 12:04
高级用户 Posts 474 Credits 959
I want to write a batch file to delete them, because these values often get rebuilt automatically

[ Last edited by 5872169 on 2008-3-8 at 12:07 PM ]
Floor7 5872169 Posted 2008-03-08 12:11
高级用户 Posts 474 Credits 959
slore, I'm not very familiar with the FOR command, could you please help me write a piece of code?
Floor8 slore Posted 2008-03-08 12:17
铂金会员 Posts 2,478 Credits 5,212
Floor9 5872169 Posted 2008-03-08 12:19
高级用户 Posts 474 Credits 959
slore, thank you, but I'm deleting these three registry entries, not deleting files

[ Last edited by 5872169 on 2008-3-8 at 12:38 PM ]
Floor10 suntb Posted 2008-03-08 13:24
高级用户 Posts 277 Credits 581
Floor11 lovelymorning Posted 2008-03-08 13:31
初级用户 Posts 72 Credits 131
Floor12 5872169 Posted 2008-03-08 13:42
高级用户 Posts 474 Credits 959
There is one value in the code in post #11 that can't be deleted: My Video! The code in post #10 can't delete them!

[ Last edited by 5872169 on 2008-3-8 at 01:45 PM ]
Floor13 suntb Posted 2008-03-08 13:51
高级用户 Posts 277 Credits 581
Originally posted by 5872169 at 2008-3-8 13:42:
There is one value in the code in post #11 that can't be deleted: My Video! The code in post #10 can't delete them!

[ Last edited by 5872169 on 2008-3-8 at 01:45 PM ]


The first post says My Videos, so why has it become My Video here?

If it's My Video, just remove that s.
Floor14 5872169 Posted 2008-03-08 13:54
高级用户 Posts 474 Credits 959
lovelymorning, all the code tests succeeded! Learned something from this!

[ Last edited by 5872169 on 2008-3-8 at 01:55 PM ]
Floor15 5872169 Posted 2008-03-08 14:18
高级用户 Posts 474 Credits 959
lovelymorning, one more question for you: if under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
there are 4 values with different names, such as sfj, fqj, emf, ejfsa, then how should the code be written?

[ Last edited by 5872169 on 2008-3-8 at 02:22 PM ]
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023