ShellExecute returns No Association

G

Guest

Ok

There is a piece of code in my application which launches an .exe file by calling the shellexecute function. This works fine in windows95 and windows2000. I assume it should work in winxpe. However when this piece of code runs on xpe, it returns a value of 31 which means "No Association." I guess that means it doesn't know what to do with an exe file. Is there a component I have to install to make it understand that it needs to run the exe? Thanks in advance

-saaby
 
B

Bruce Wong

First you should run your application to see if it run on Windows XP Pro.
Then if it works their you are just missing a component. Their is shell
component that you should need to add to your build.

Good Luck
Bruce

Saaby said:
Ok,

There is a piece of code in my application which launches an .exe file by
calling the shellexecute function. This works fine in windows95 and
windows2000. I assume it should work in winxpe. However when this piece of
code runs on xpe, it returns a value of 31 which means "No Association." I
guess that means it doesn't know what to do with an exe file. Is there a
component I have to install to make it understand that it needs to run the
exe? Thanks in advance,
 
K

KM

Saaby,

Don't know what problems you have with ShelExecute but you can easy check
..exe associations in your image by running regedit (HKEY_CLASSES_ROOT\.exe).

Also, use CreateProcess API instead of ShellExecute to not have any problems
with launching processes.

KM
Ok,

There is a piece of code in my application which launches an .exe file by
calling the shellexecute function. This works fine in windows95 and
windows2000. I assume it should work in winxpe. However when this piece of
code runs on xpe, it returns a value of 31 which means "No Association." I
guess that means it doesn't know what to do with an exe file. Is there a
component I have to install to make it understand that it needs to run the
exe? Thanks in advance,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top