[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Setting the default Application Verb Programatically !

Posted on 2006-05-21
8
Medium Priority
?
287 Views
Last Modified: 2010-04-07
When you double click a document, the associated EXE (application) is launched and the document is loaded.
This is the default behaviour for most applications  ie: it opens the file.

What I want is to change this default behaviour so that when I double click the document it will PRINT it instead of opening it.

I know how to change this default setting via the Windows Explorer UI : from a Folder Menu choose TOOLS > FOLDER OPTIONS> FILES TYPES> CHOOSE THE  RELEVANT FILE EXTENTION AND CLICK ON ADVANCE> CHOOSE FROM THE LIST OF AVAILABLE VERBS AND SET DEFAULT.

How can the above be done Programatically in VB ?

Regards.
0
Comment
Question by:RAFAAJ
  • 3
5 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 252 total points
ID: 16728462
Basically all info are in registry

for instant

VBS extension

it is in HKEY_CLASSES_ROOT\VBSFile


to change the default

change the default from

HKEY_CLASSES_ROOT\VBSFile\shell
(Default)="Edit"
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 16728464
0
 
LVL 18

Assisted Solution

by:JR2003
JR2003 earned 248 total points
ID: 16728663
The 'assoc' command from the command prompt also allows you to change the default behaviour.
If you run cmd and at the command prompt type: assoc /?
It will provide the help for the comand.
You could shell this command out from within VB to set the default behaviour.
0
 

Author Comment

by:RAFAAJ
ID: 16728916
Thanks.

EDDYKT.   Are the Registry Paths the same for different OS ? If not is there a way of making sure the editing of these specific reg keys work in different machines with different reg paths ?


JR2003.  I did what you suggested but couldn't find anything in the help in relation to setting the default document verb (ie from Open to Print) ! Any further idea\keywords ?


Regards.
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 16731445
>>Are the Registry Paths the same for different OS ?

Not sure about this. You may need to check on each OS
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

834 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