Re: Should be trivial, but isn't.
- From: "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 3 Oct 2007 19:39:25 -0500
CobraA1 wrote:
Okay, I was writing a .vbs script to automate a task used for image
manipulation, and I thought it would be useful if the task could be used
by
right clicking on, say, a .jpg file.
So, I did what I thought made sense - I had the script insert itself into
HKCR\.jpg\Shell\forEmail thinking that it would add "forEmail" to the menu
when you right click in explorer. Sounded trivial enough to me.
But boy was I wrong. It didn't work at all. Apparently Nero and iTunes are
fighting for the file extention (even though I specifically told Vista to
use
the GIMP). In addition, it took me forever to find that placing it in
HKLM\SOFTWARE\Classes\SystemFileAssociations\.jpg\shell worked - in Vista.
But not in XP. I also have an XP machine I want to use it on as well.
This is driving me crazy - All I want to do is make it so I can run the
script on a JPEG file by right clicking on it and selecting an appropriate
menu item. What is the "proper" way to do this, and why is it so painful?
I would not expect changes you make manually or with a script to work in
HKLM or HKCR on a Vista computer, unless you use "Run as Administrator". It
does not matter if you are logged on as Administrator, it will not work. I
have found that Vista lets you think the change is there, but the change is
actually made to a virtual location in HKCU. You will find this out if you
login as a different user. This is one of the reasons that most setup
programs fail on Vista.
I think the best solution is to add your script to the "Open with" dialog
for that extension manually. I think you select "Open with", then "Choose
default program...". I believe you can also add your program to the "Send
To" list.
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
.
- Follow-Ups:
- Re: Should be trivial, but isn't.
- From: Joe Fawcett
- Re: Should be trivial, but isn't.
- Prev by Date: Re: Problem copying MsgBox text in Vista
- Next by Date: RE: reading from text file and writing to spread***
- Previous by thread: Re: Should be trivial, but isn't.
- Next by thread: Re: Should be trivial, but isn't.
- Index(es):