[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

need to open a file path listed in a registry key

Hi,

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

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security]
"OutlookSecureTempFolder"="C:\\Documents and Settings\\path\\pathetc\\"

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


0
HupSkiDup
Asked:
HupSkiDup
  • 3
  • 2
  • 2
  • +2
1 Solution
 
josgoodCommented:
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.
0
 
josgoodCommented:
Sorry, I cut and pasted...the double backslashes aren't needed, just single backslash.

The quotes are needed because the string contains spaces.
0
 
Jaymz_RCommented:
double click on the registry entry, copy.

start -> run -> *paste* -> enter?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
JustWorkingCommented:
How are you trying to open it? From a run command or batch file?
explorer.exe C:\Documents and Settings\path\pathetic\
0
 
HupSkiDupAuthor Commented:
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..
0
 
josgoodCommented:
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.
0
 
Donald StewartNetwork AdministratorCommented:
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
0
 
Donald StewartNetwork AdministratorCommented:
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




0
 
HupSkiDupAuthor Commented:
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 !
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now