Would it run if you specify "Open" and "Edit" as the command verbs?
>
>I'm hoping that someone has run into this before. I've been using ShellExecute to open random documents without any problems on older operating systems, but on our Windows Server Enterprise machine (and I'm guessing Vista from what I'm seeing) it's failing oddly.
>
>I'm passing a nothing as the command verb which is supposed to make it execute the default verb. For a number of tested files (.Doc, .Txt. PDF, .BMP) it works as expected. On this machine though I get an error message when I try and open a JPEG file. The message is from the Photo Gallery Viewer and it's complaining that I'm not allowed to print without the Desktop Experience Feature. If I enter the name of a JPEG file into a command shell I get the same error, but if I double click in Explorer it executes the default verb, which is edit.
>
>I then tried to get the default verb for a file and specify that, but all the documentation I could fine was sending me to registry keys that don't exist. I'm not sure if the problem is the OS, JPEG files being handled differently thatn normal files or both, but it's got me stumped.
>
>Can anyone tell me either -
>1) Why ShellExecute is not using the Default Verb , or
>2) How to determine the Default Verb Sever Enterprise / Vista?
--sb--