Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i would need to know the most effective way get the name of the application from the Registry/LocalMachine/Software/Classes/.docx/shell/Open/Command . for example from this

"C:\Program Files (x86)\Microsoft Office\Office15\POWERPNT.EXE" "%1" /ou "%u"

i would need only the 'POWERPNT.EXE'. substring and replace is not effective as the value inside appears differently. for example

"C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE" /dde
"C:\Program Files (x86)\Skype\Phone\Skype.exe" "/uri:%l"
Posted
Comments
BillWoodruff 2-Dec-14 23:05pm    
Why is it you need to get the name of the Application from the registry ? Assuming you have some kind of data/string that determines what you want to search for: where did that data/string come from: what format is it in ?
zen.liu87 3-Dec-14 3:27am    
the intention of my method is to find out the program being used to open (string) associated file type (.docx, .xlsx . pdf etc) and then using the Process.Start("EXCEL.EXE", fileURL) to open a file from a SharePoint DocumentLibrary

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900