PWB3CEF - links to batch files?

Questions and comments about currently under development PWB v3

Moderators: Tyler, Scott

Post Reply
TRex
Contributor
Contributor
Posts: 21
Joined: Thu Nov 30, 2017 4:09 pm

PWB3CEF - links to batch files?

Post 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?

Scott
Site Admin
Site Admin
Posts: 2527
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Re: PWB3CEF - links to batch files?

Post 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

Scott
Site Admin
Site Admin
Posts: 2527
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Re: PWB3CEF - links to batch files?

Post 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

TRex
Contributor
Contributor
Posts: 21
Joined: Thu Nov 30, 2017 4:09 pm

Re: PWB3CEF - links to batch files?

Post by TRex »

Where can I find instructions for the Shellbar? I've never used it.

TRex
Contributor
Contributor
Posts: 21
Joined: Thu Nov 30, 2017 4:09 pm

Re: PWB3CEF - links to batch files?

Post by TRex »

Ah, the answer was staring me in the face: 'Windows Shortcuts'. Very nice.

Post Reply