Sign in to follow this  
Followers 0
Redbeard

ShellExecute opening program but not file

5 posts in this topic

I'm having a very strange problem. If I run a command like:

ShellExecute("C:\spreadsheet.xls")
excel will open but not spreadsheet.xls. I can double click any excel file and it opens fine under any other circumstances, it's just shellexecute that has the problem. Any ideas why?

Share this post


Link to post
Share on other sites



Does the same happens when you type that from the command prompt?

If so my guess is that the file associate is missing the %1 on the command line.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

No, if I were to enter C:\spreadsheet.xls in the windows Run dialog the spreadsheet opens fine. So the association seems to be working as it should.

Share this post


Link to post
Share on other sites

Perhaps the "open" verb is not set as the default in your registry, or some other "verb" is set as the default. See here, ShellExecute, for more info.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

From what I can see the verb in the registry is /e which I assume means Edit. Either way it should open with ShellExecute, yes? To add to the confusion, ShellExecuteWait opens the spreadsheet fine! :huh2:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0