Solved

vb.net programm as new default opening tool for new file format

Posted on 2013-06-12
4
229 Views
Last Modified: 2013-09-06
Hello,
I've created a Tool to open selfcrypted Files with special file format.
This Files are encrypted PDF Files with a new ending so Windows things this is a special File Format. (you are not able to open it as normal pdf)
I would now like to open this file with my program as default, to decrypt and access the content.

At the moment the Program has only an open button which then asks for the encrypted file location (open File Dialog)

Question:
First Step is to change the program any ideas?
Next Step tell windows on all PCs to open this File types per default with my program?
So I need to "install" this Program on the Client Computers?

Background and Detail of the Program you'll find in this Question:
"VB.net open File with new NTFS Permissions / open PDF wtih damaged Header"
0
Comment
Question by:HelpdeskJBC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 39240559
to associate your tool with the special file format you need to update some registry entries.
for example, if your file format is .abc, then run the following:

My.Computer.Registry.ClassesRoot.CreateSubKey(".abc").SetValue_
	("", "abc", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey_
	("abc\shell\open\command").SetValue("", Application.ExecutablePath & _
	" ""%l"" ", Microsoft.Win32.RegistryValueKind.String)

Open in new window

this code will work if you run it from the tool.
if you want to associate the file format from the installer, then u need to replace the Application.ExecutablePath with the tool exe location on the file system.
so if the tool .exe is installed in c:\program files\Tool
then u need to replace Application.ExecutablePath with " c:\program files\Tool\tool.exe"

check here for reference:
http://www.codeproject.com/Articles/18594/File-Association-in-VB-NET
0
 

Author Comment

by:HelpdeskJBC
ID: 39243641
Sorry I stuck with another problem which has more priority jet
I need to disable hide the adobe floating toolbar (small gray toolbar appears after moving mouse)

I use the vb.net object "AxAcroPDF1" and I need to ensure user are not able to copy the document. I already secured the pdf so print out is disabled but how to disable save option?
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 39243646
you should open new question about disable save option.
0
 

Author Closing Comment

by:HelpdeskJBC
ID: 39470889
Answers the question best.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question