ShellExecute to open HTML page with parameters

Giganews Newsgroups
Subject: ShellExecute to open HTML page with parameters
Posted by:  sohila salehzadeh
Date: Wed, 8 Aug 2012

Hi everyone.

I am trying to use shellExecute to run a local HTML page in explorer. The url is:
file:///c:/temp/html/test.html#jobRef=test
or
file:///c:/temp/html/test.html?jobRef=test

Unfortunately if I try to run this url using shellExecute I lose the parameter part of the url and see this in explorer:

c:\temp\html\test.html

If however I type the required url into the browser it does load correctly. For some reason there is a difference between providing this url as a shellExecute parameter and trying it directly into the browser. My shellExecute call is as follows:

url := 'file:///c:/temp/html/test.html?jobRef=test';
shellExecute( 0, 'open', 'iexplore', PChar( url), nil, SW_SHOWNORMAL);

Does anyone have any idea what I am doing wrong?

Thanks,

Replies