Page 1 of 1

PWB3CEF - links to batch files?

Posted: Thu Jan 04, 2018 3:31 pm
by TRex
I'm working on an internal web page to allow users to get to approved links. I started with PWB v3, but because of rendering issues, and that PWB v3 doesn't follow links to shortcuts on the same web page, I tried switching to PWB v3 CEF. The rendering issues and links to shortcuts have been resolved, but now the links to local batch files don't work.

An example of what works in PWB v3:
<a href="\\<servername>\<share>\PWB3\runthis.bat">Liink Title</a>

I've tried:
<a href="file://<servername>/<share>/PWB3chrome/runthis.bat">Link Title</a>

but this just displays the text of the batch file; it doesn't actually run it.

Is there a way for PWB v3 CEF to run a batch file - perhaps a different structure to the link?

Re: PWB3CEF - links to batch files?

Posted: Thu Jan 04, 2018 3:59 pm
by Scott
The security in Chrome will not let local batch files run.

You could use the Dynamic External Java Commands built into "PWB 3.05.2 CEF", currently available on the Beta page.

This functionality allows you to run any Windows executable including batch files via JavaScript.

For example:

Code: Select all

function OnClickExecute() {
  if(isChrome)
    pwb.PWBExecute('NotePad.exe');
  else
    window.external.PWBExecute('NotePad.exe');
}
See the following for more information:
https://www.teamsoftwaresolutions.com/b ... ernal.html

--Scott

Re: PWB3CEF - links to batch files?

Posted: Thu Jan 04, 2018 4:00 pm
by Scott
You could enable the Shellbar and add Windows Shortcuts to the PWB Toolbar to run batch files if that would work for you.

--Scott

Re: PWB3CEF - links to batch files?

Posted: Thu Jan 04, 2018 4:26 pm
by TRex
Where can I find instructions for the Shellbar? I've never used it.

Re: PWB3CEF - links to batch files?

Posted: Fri Jan 05, 2018 10:50 am
by TRex
Ah, the answer was staring me in the face: 'Windows Shortcuts'. Very nice.