Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Designating a Script Engine for Custom File Extension

Status
Not open for further replies.

Norm11

Programmer
Jul 30, 2007
12
US
Hello all:

So far Tek Tips is batting a 1000 as far as I go--I've posted two questions and received two solutions. Let's see if you have one this time.

I've written a VBScript that opens an application via an email attachment. Let me explain. I send users an attachment. Let's say the attachment has a custom file extension--call it .XXZ. When they double click the .XXZ file attachment, my script is called. It works perfectly.

The only problem remaining is mostly cosmetic. Because the .XXZ file is associated with a .VBS file, the .XXZ file assumes the .VBS icon, which is confusing to my users. I have a pretty, custom-made icon I'd like to associate with the .XXZ file, but to do that, I have to change the icon associated with .VBS, which I don't want to do.

So I think, why not just create a new file extension (let's call it .ZZX) and then associate that the same way .VBS extensions are. Then I can just change the icon for .ZZX files to my pretty custom-made one. Problem is, I now keep getting the error "There is no script engine for file extension .ZZX" and I don't know how to make that association.

Can anyone help?
Norm
 
what is the code in your .xxy file? if it is vbscript then i would suggest you name it accordingly, i.e. .vbs. then no one will be confused???
cant you include vba code in your email? cant you have link data to a central script so you dont have to email around duplicate code to users via email? cant see the point of sending an attachment, my email guys would shoot me
 
OK, let me back up.

The attachment isn't VBS or VBA or any other script. It's a proprietary filetype used by a commercial tracking application we use here. So I cannot--in any way--change the attachment or its contents. So that file has its own extension provided by the vendor. It cannot be changed.

The VBS I wrote parses the contents of that attached file and then launches the application that consumes it. In order for it to work, however, the file type of the attachment must be associated with my VBS script, which changes the icon from what it is to the VBS icon...which I don't want because it confuses users (and is an ugly icon).
 
can you accomplish what you want through the windows gui? i.e. what are the steps you take manually to produce your desired results? once you know exactly what the steps required are then the code to execute those tasks can easily be provided. perhaps a post to the windows forum first to find out if what you are trying to do is possible then post back here?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top