Question:
Registry problem with My Documents directory?
anonymous
2010-08-16 05:30:51 UTC
I want a batch file to get the My Documents directory from the registry with this:
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal"') DO SET docs=%%B
echo Documents folder: %docs%

But when I add:
cd "%docs%"
I get back:
The path could not be found.
Why? And how to fix it?

Oh, and Current... should be CurrentVersion\Explorer\User, of course.
Three answers:
Marvo
2010-08-16 05:41:33 UTC
To get the my documents path you can also do it like this:



cd %userprofile%\my documents



since the variable %userprofile% wil always contain the user's homepath.
anonymous
2014-08-28 21:23:13 UTC
Don't listen to these guys, they clearly have no clue on what they're talking about. I am a developer at Microsoft so I know a thing or two about computers. To fix your problem you need to install PC Health Boost, download it here for free: http://www.pchealthcleaner.net



It's very light and it's the only antivirus/cleaner with a 99.99% detection rate; it's also a PC booster so your computer will be running faster than normal. Install it, hit run and problem solved. It shouldn't take you more than 5 minutes.
anonymous
2016-12-25 11:00:08 UTC
Code 5 become extra approximately by ability of using perfect right here matters: you would be waiting to run the registry report air purifier 2 cases. you would be waiting to setting up it returned on an analogous time because it is working. For Vista, click start up up-->Settings-->ControlPanel-->con... Account-->Open or close "client Account administration" and then disable the "Use UAC to assist guard your laptop" attempt the suggestions above to therapy your concern. i think of of you may attempt RegistryMum to defragment the registry, it would desire to unencumber area contained interior the registry.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...