Talk:Open link in new browser window: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(open a link)
 
No edit summary
 
Line 6: Line 6:
       Exec "rundll32 url.dll,FileProtocolHandler $R1"
       Exec "rundll32 url.dll,FileProtocolHandler $R1"
   FunctionEnd
   FunctionEnd
----
You can't assume http\shell\open\command is the default, you must read http\shell\ first, if it is empty you are supposed to enum the subkeys and use the first one, but in that case you can probably get away with using open
--[[User:Anders|Anders]] 17:56, 19 April 2009 (UTC)

Latest revision as of 17:56, 19 April 2009

This will open a link, but not in a new window.

  # Push the desired URL first
  Function openLink
     Exch $R1 ;URL
     Exec "rundll32 url.dll,FileProtocolHandler $R1"
  FunctionEnd

You can't assume http\shell\open\command is the default, you must read http\shell\ first, if it is empty you are supposed to enum the subkeys and use the first one, but in that case you can probably get away with using open --Anders 17:56, 19 April 2009 (UTC)