Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2013-06-12
4
Medium Priority
?
236 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 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

730 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