Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

shellexecute fails to open http links for some users

Some users of an app of mine are reporting links dont open in the browser. I always launch them with shellexecute(0, 'open', 'http://...

what could I check for an incorrect(?) setting in the http link associations?

like image 401
hikari Avatar asked Feb 26 '11 15:02

hikari


2 Answers

You're assuming that the browser registered the open verb. It may not have done so.

Just pass nil as the second parameter and omit the open, and let the OS determine what the default action is for the http:// protocol, and you should be fine.

like image 182
Ken White Avatar answered Nov 08 '22 04:11

Ken White


Sounds like the default browser is not functioning quite right. I guess the first thing I would try is to have them enter an (any) url into start->run and see if that pops up.

You could also have them register what the settings on the URL below are:

http://russenreaktor.wordpress.com/2010/07/01/solved-fix-default-protocol-http-association-in-windows/

Or use the ftype utility on the cmdline:

C:\Users\marco>ftype http
http="C:\Program Files (x86)\Internet Explorer\iexplore.exe" -nohome

These operate on registry keys under HKEY_CLASSES_ROOT/protocolname with protocolname=http/ftp etc.

Making a simple app to dump these keys might help finding out what the pattern here is.

like image 28
Marco van de Voort Avatar answered Nov 08 '22 05:11

Marco van de Voort