Solved

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

Posted on 2013-06-12
4
220 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

786 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