Redbeard Posted June 22, 2011 Posted June 22, 2011 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?
Developers Jos Posted June 22, 2011 Developers Posted June 22, 2011 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. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Redbeard Posted June 22, 2011 Author Posted June 22, 2011 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.
somdcomputerguy Posted June 22, 2011 Posted June 22, 2011 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.
Redbeard Posted June 23, 2011 Author Posted June 23, 2011 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!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now