- NSIS Discussion
- Trying to refresh IE post install
Archive: Trying to refresh IE post install
muddlethrough
2nd February 2007 20:22 UTC
Trying to refresh IE post install
I'm trying to figure out a way to reloading the web page that my install came from once the install has finished. The only options seem to be to use either:
ExecShell "open" "url"
or
Exec '"$PROGRAMFILES\Internet Explorer\iexplore.exe" "url"'
but the first opens the default browser or picks a window from the default browser (may not be the window that the install was launched from) to load in. The second forces IE but opens in a new window everytime.
This only applies to Internet Explorer but there could be people using Firefox with an IE view etc.
To be honest this seems like too much to be asking but I thought I would throw it open for discussion. Any suggestions?
Red Wine
2nd February 2007 20:36 UTC
I guess this is something the page should do instead of the installer, e.g. within a java script check if your application is installed by checking on registry records, file existence, or whatever, and according to the result of this check show/hide the install link or even show a different page.
muddlethrough
2nd February 2007 20:42 UTC
Yes I did think of that and I tried setting a cookie in the installation and looking for that in the browser but the loop that the javascript goes into (continually looking for the cookie) freezes the browser, plus I couldn't figure out how to load the install and then run a javascript function. Maybe this is my poor javascript skills!?
Red Wine
2nd February 2007 20:49 UTC
Unfortunately my java script skills are more poor.
What I had in mind was something like microsoft's windows update pages, implemented in java, thus suitable for all browsers instead of IE.
muddlethrough
2nd February 2007 21:14 UTC
Thank you very much for your suggestions.
Let me explain further what it is I am trying to do. The UI designers have decided that the ActiveX control (only valid for IE) that we use as part of our site is difficult to install - the nasty yellow bar thing! So my install is supposed to be replacing the the standard ActiveX install with a downloadable executable which will install and register the ActiveX at the click of a button. This all works fine - woo hoo! The standard IE ActiveX install would load the ActiveX as part of the whole process, but if I'm not using that anymore then I need to instruct the browser somehow to load the control after installation. Manual refresh works fine as it can detect whether the control is installed on page reload. Yahoo does it somehow!
Red Wine
2nd February 2007 21:41 UTC
I believe you're just a tick away to achieve it, most likely, soon, other users of this forum will post the way to catch this tick ;)
dandaman32
2nd February 2007 22:08 UTC
Use setTimeout() to check for the cookie once every 3-5 seconds.
function chkCookie()
{
if(document.cookie.indexOf('cookieName'))
{
window.reload();
}
else
{
setTimeout('chkCookie();', 3000);
}
}
chkCookie();
And to those of you who have been wondering where I've been the past several months...I've been learning PHP and Javascript :-)
-dandaman32
muddlethrough
2nd February 2007 22:53 UTC
That actually seems like it should work, thanks. I made one amendment:
function chkCookie()
{
if(document.cookie.indexOf('cookieName') >= 0)
{
window.reload();
}
else
{
setTimeout('chkCookie();', 3000);
}
}
Now I just need to figure out my cookie domain issues - but i don't think you guys can help with that one.
Thank you again.
onad
4th February 2007 23:06 UTC
One can still use DDE to send commands to the browserwindows.
See old netscape documentation, but it works ain IE and Firefox none the less.