We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


need to open a file path listed in a registry key

HupSkiDup asked
Medium Priority
Last Modified: 2012-05-06

This is hopefully simple, 30 minutes of googling and I can't figure it out...
I need to simply open up an explorer window from a path listed in the registry

"OutlookSecureTempFolder"="C:\\Documents and Settings\\path\\pathetc\\"

Start "RegistryPath"
explorer window opens up and life is good...

Watch Question

Top Expert 2007

The command line
   explorer C:\\Documents and Settings\\path\\pathetc\\"
will do the job.

You can use CreateProcess or ShellExecute or WinExec to spawn a process with that command.
Top Expert 2007

Sorry, I cut and pasted...the double backslashes aren't needed, just single backslash.

The quotes are needed because the string contains spaces.

double click on the registry entry, copy.

start -> run -> *paste* -> enter?
How are you trying to open it? From a run command or batch file?
explorer.exe C:\Documents and Settings\path\pathetic\


Sorry, my fault for not explaining.
I'm looking for a batch file to read the reg key (which will be different) and open that up in a folder..
Top Expert 2007

Opening the folder is the easy part...as mentioned above.

I'm not aware of a way to read the registry with batch commands.  I suggest a scripting language (Tcl/Tk, Python, etc) or a heavier language (VB, C++, C#) to fetch the key and then spawn a process that opens Explorer.
Network Administrator
Read here, as this looks like what you are trying to accomplish

Fix Microsoft Outlook Cant Create File Attachment Issue

there is a script on that page

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
DonNetwork Administrator

something like this from above

for /f tokens=2,* %%a in (reg query HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security /v OutlookSecureTempFolder|find OutlookSecureTempFolder ) do (
     rmdir /s /q %%b


Awesome, I saw that page but didnt dig in to it enough to see the script, I should be able to tweak that... Thanks a ton !
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.