I have made a number of htm type help files which I link to from VB6 with
something like this:
ShellExecute 0&, "open", mypath & "\help\help.htm", "", "", SW_SHOWNORMAL
where mypath is something like "C:\program files\myapp"
All has been working fine until some of my users upgraded to service pack
two now this line takes them nowhere at all
The following still works fine
ShellExecute 0&, "open", "http://www.mywebsite.org/help.htm", "", "",
SW_SHOWNORMAL
My guess is that Internet explorer has somehow been changed to not allow
links to local files
Anyone know a work round?
Jaez
Marcel - 26 May 2005 08:14 GMT
Hi
These things have been driving me mad too. I solved the problem by looking
in the registry key
HKCR \ .htm
The default value of this key gives you the file type that this extension
belongs to. On my pc that is:
FirefoxHTML
But it can also be something like
htmlfile
Now, go to the registry key
HKCR \ FirefoxHTML or htmlfile or whatever
which contains a key with the name
shell \ open \ command
Take the default value for this key, which is for firefox
C:\PROGRA~1\MOZILL~1\FIREFOX.EXE -url "%1"
and for internet explorer
"C:\Program Files\Internet Explorer\iexplore.exe" -nohome
Check to see if this string contains %1. If so, replace it with the full
path of the file you want to open, otherwise just append a space and the
file name to it. Then use shell to execute the complete string.
Good luck!
Marcel Timmerman
The Netherlands
>I have made a number of htm type help files which I link to from VB6 with
>something like this:
[quoted text clipped - 16 lines]
>
> Jaez
Steve Gerrard - 26 May 2005 15:08 GMT
>I have made a number of htm type help files which I link to from VB6 with
>something like this:
[quoted text clipped - 14 lines]
>
> Anyone know a work round?
For some browsers, you may need the target path in quotes when it gets passed to
the browser. So maybe try the line this way:
ShellExecute 0&, "open", """" & mypath & "help\help.htm" & """", "", "",
SW_SHOWNORMAL