Associating File Types with AutoVue Desktop Deployment

Posted by [email protected] on Oracle Blogs See other posts from Oracle Blogs or by [email protected]
Published on Thu, 29 Apr 2010 20:36:39 -0500 Indexed on 2010/04/30 2:58 UTC
Read the original article Hit count: 1184

Windows users take for granted that when they double click on a document or design, that it will open up in its application automatically. One of the questions I'm commonly asked is "How can I get the same behavior with AutoVue Desktop Deployment?". It's pretty easy, but there are a few tricks to doing it.

iconsbeforeafter.JPG

Step 1: Download new jvue_direct.bat and icon
The first thing you'll need to do is download a slightly modified version of jvue_direct.bat. You can find it here (Document 1075784.1) on Oracle's Support Portal.
You also want to download the AV.ico file. This is the icon that will be used for all file types associated with AutoVue.
Place both of these files in your <AutoVueInstallDirectory>\bin directory.

Step 2: Associate File Types With AutoVue
There are two ways to do this. You can do this through the Windows user interface, or you can set up a batch file to do this.

Associating File Types Through Windows
The way most people associate file types to an application is using the Windows user interface. You've probably tried to open a file type that Windows doesn't recognize and seen this window pop up:
cantopen.JPG
Although you can use this dialog to associate that file type with AutoVue, I don't recommend it. I much prefer using a batch file to associate file types with AutoVue.

Associating File Types Using A Batch File
There are a few good reasons to associate file types using a batch file instead of using the pop-up dialog method:

  • If you have several file types to associate with AutoVue, it's much easier to use a batch file to do them all at once.
  • Doing it through the Windows user interface requires having files of each type available. Using a batch file doesn't require having the files you're associating.
  • Associating file types through the dialog may work well for one person, but what if you're an administrator doing an enterprise wide deployment of AutoVue Desktop Deployment for several hundred users? You don't want to do this manually for each user. You can have one simple batch file that's run on each user's PC to set up all the file types.
  • You can easily associate an icon with the file types you're opening with AutoVue.

To use the batch file method follow these steps:


  1. Create a file called filetype.bat using a text editor and copy and paste the following into it:

  2. @assoc .dwg=AVFile
    @assoc .jpg=AVFile
    @assoc .doc=AVFile
    @ftype AVFile="%~dp0jvue_direct.bat" "%%1"
    @reg add HKEY_CLASSES_ROOT\AVFile\DefaultIcon /v "" /f /d "%~dp0AV.ico"

  3. Change the lines starting with @assoc. Each of these lines associates a file extension with AutoVue. You can have as many @assoc lines as you want.

  4. Save this file in your <AutoVueInstallDirectory>\bin directory.

  5. Double click this file, or run it from a command prompt.

  6. Restart Windows to get the icons to show up.

How Does This Work?
The first three lines are creating a file type called AVFile. We are associating the extensions .dwg, .jpg, and .doc with this file type. You will want to change these lines when creating your own batch file. For example, to associate Microstation designs, which have extension .dgn, you should delete the @assoc lines above and add the line:

@assoc .dgn=AVfile

The line beginning with @ftype tells Windows that all AVFile type files should be opened using AutoVue Desktop Deployment.
The final line associates the AutoVue icon with these file types. You may need to restart Windows to see the new icons.

Warning: One Size Doesn't Fit All
When deciding which file types should be associated with AutoVue, remember that there are different types of users using it. Your engineers may be pretty surprised to find that after installing AutoVue, double clicking their .dwg file opens up AutoVue instead of AutoCAD. If you have more than one type of AutoVue user, make sure you've considered what file types each user group will and will not want to be associated with AutoVue. If necessary, create a separate file association batch file for each user type.

So that's it. In two simple steps you can double click your favorite designs and have them open automatically in AutoVue Desktop Deployment. I'd love to hear how are you using AutoVue Desktop Deployment. What other deployment tips would you be interested in learning about?

© Oracle Blogs or respective owner

Related posts about Enterprise Visualization

Related posts about Tips and Techniques