Solved

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

Posted on 2013-06-12
4
214 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
  • 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now