Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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…
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.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

22 Experts available now in Live!

Get 1:1 Help Now