Submitted by Anonymous (not verified) on Tue, 04/05/2016 - 14:58
Forums

Hi,

I need to run i.e. notepad.exe from Internet explorer when I open a IceBreak page. Can I do that? 

Niels Liisberg

Tue, 04/05/2016 - 15:30

Hi,

Yes, you need to provide a "URI schema" - a user defined protocol for you browser. Do as follows:

What  you will provide is that you can basically type the following into the browser url: 
     notepad:C:\mytext.txt 

And notpad will open the C:\mytext.txt 

Now use this technique to open any program from a IceBreak application, using 
     window.open("notepad:" + fileToOpen);

in a javascript to let a native windows application takeover controle.

You need the following registry setings (place this in temp.reg and run it):

[HKEY_CLASSES_ROOT\notepad]
"URL Protocol"="URL Notepad"

[HKEY_CLASSES_ROOT\notepad\shell]

[HKEY_CLASSES_ROOT\notepad\shell\open]

[HKEY_CLASSES_ROOT\notepad\shell\open\command]
@="\"C:\\urlnotepad.cmd\"  \"%1\""

And you need the command file top open you exec file - notepad in this case ( place this in C:\urlnotepad.cmd):

set url=%1
set file=%url:~9,-1%
start notepad.exe %file%

Best regards,

Niels Liisberg