Running external program from web page
Moderators: Tyler, Scott, PWB v2 Moderator
Running external program from web page
We've been using PWB 2.05 for some time operating as Windows shell on W2k. The machines are very locked down and the user can access about six approved systems (various servers and web pages in our organization) from their home page.
We now have a request to add an additional, local program to the machines. I figured we can just install the program on the local HD and add a link to the home page (file://c:/program/program.exe).
This works fine if I launch from a shellbar icon, but I get the "Access denied due to restrictions in effect on this computer" message if I try to launch the app from the home page. (it will launch fine from plain IE but not from PWB).
I have OnlyAccessHTTP=False and DisableFileDownload=False now (they were true before) but no difference. We would like to be able to launch the app from a link on the home page.
Help?
Les
We now have a request to add an additional, local program to the machines. I figured we can just install the program on the local HD and add a link to the home page (file://c:/program/program.exe).
This works fine if I launch from a shellbar icon, but I get the "Access denied due to restrictions in effect on this computer" message if I try to launch the app from the home page. (it will launch fine from plain IE but not from PWB).
I have OnlyAccessHTTP=False and DisableFileDownload=False now (they were true before) but no difference. We would like to be able to launch the app from a link on the home page.
Help?
Les
If you run IE on the same computer you do not get the error message?
I would use the PWB Dynamic External Java Command JavaExecute to launch the application. Please see the following forum post.
http://teamsoftwaresolutions.com/phpBB2 ... .php?t=278
There is an example on this web page.
http://www.teamsoftwaresolutions.com/beta/external.htm
Please let me know if you have any questions.
--Scott
I would use the PWB Dynamic External Java Command JavaExecute to launch the application. Please see the following forum post.
http://teamsoftwaresolutions.com/phpBB2 ... .php?t=278
There is an example on this web page.
http://www.teamsoftwaresolutions.com/beta/external.htm
Please let me know if you have any questions.
--Scott
You could use a line similar to the following.
<A HREF="NOTEPAD" OnClick="window.external.PWBExecute( 'NotePad.exe' )">Notepad</a>
After setting the following in the PWB INI file.
[Java]
EnableExternalJava=True
JavaExecute=PWBExecute
...
The "EnableExternalJava=True" is not used in the older versions of PWB.
To re-enable the file download, which would allow you to run an application from a link, you will need to open the Internet Options Control Panel applet and enable the File Download on the Security tab in the Internet and Local Intranet zones. This is not done by PWB when you enable file downalods in the INI file.
--Scott
<A HREF="NOTEPAD" OnClick="window.external.PWBExecute( 'NotePad.exe' )">Notepad</a>
After setting the following in the PWB INI file.
[Java]
EnableExternalJava=True
JavaExecute=PWBExecute
...
The "EnableExternalJava=True" is not used in the older versions of PWB.
To re-enable the file download, which would allow you to run an application from a link, you will need to open the Internet Options Control Panel applet and enable the File Download on the Security tab in the Internet and Local Intranet zones. This is not done by PWB when you enable file downalods in the INI file.
--Scott
Still having trouble with this. Here's a bit from the home page:
<script language="JavaScript" type="text/JavaScript">
<!--
function OnClickDummy()
{
window.external.PWBDummy
}
function OnClickExecute()
{
window.external.PWBExecute( 'c:\skylight\skylight.exe' )
}
//-->
</script>
<p><A href="c:\skylight\skylight.exe">SKYLIGHT PREPAID</A></p>
<p><A HREF="c:\skylight\skylight.exe" OnClick="window.external.PWBExecute( 'c:\skylight\skylight.exe' )">Skylight via Java link</a></p>
Both links, when clicked, give me the "access denied due to restrictions in effect on this computer" under PWB. Under plain IE they both work fine.
Some pieces of the PWB.INI:
[Java]
EnableExternalJava=True
JavaExecute=PWBExecute
Also:
DisableFileDownload=False
OnlyAccessHTTP=False
The application launches fine from a shellbar icon, but that's not where we want to put it - we'd like to have a link on the page just like all the other pages they need to use.
Thanks,
Les
<script language="JavaScript" type="text/JavaScript">
<!--
function OnClickDummy()
{
window.external.PWBDummy
}
function OnClickExecute()
{
window.external.PWBExecute( 'c:\skylight\skylight.exe' )
}
//-->
</script>
<p><A href="c:\skylight\skylight.exe">SKYLIGHT PREPAID</A></p>
<p><A HREF="c:\skylight\skylight.exe" OnClick="window.external.PWBExecute( 'c:\skylight\skylight.exe' )">Skylight via Java link</a></p>
Both links, when clicked, give me the "access denied due to restrictions in effect on this computer" under PWB. Under plain IE they both work fine.
Some pieces of the PWB.INI:
[Java]
EnableExternalJava=True
JavaExecute=PWBExecute
Also:
DisableFileDownload=False
OnlyAccessHTTP=False
The application launches fine from a shellbar icon, but that's not where we want to put it - we'd like to have a link on the page just like all the other pages they need to use.
Thanks,
Les
Are you using a run list through the Windows Group Policy for the user?
This error message is the same message given when trying to run an unapproved application is launched.
I did not see anything in your INI file that would cause a problem, and on my test systems the links seem to work as expected.
Did you test run IE when logged on as the same user as is logged on when PWB is running?
The disable file download in the PWB INI is set in the current user Registry hive. Did you reset the File Download in the Internet Options Control Panel applet when logged on to the computer as the same user that is logged on when PWB is running?
Here is a small registry script that will reset the downlaods for the user curently logged on.
http://www.team2s.com/new/EnableDownload.zip
--Scott
This error message is the same message given when trying to run an unapproved application is launched.
I did not see anything in your INI file that would cause a problem, and on my test systems the links seem to work as expected.
Did you test run IE when logged on as the same user as is logged on when PWB is running?
The disable file download in the PWB INI is set in the current user Registry hive. Did you reset the File Download in the Internet Options Control Panel applet when logged on to the computer as the same user that is logged on when PWB is running?
Here is a small registry script that will reset the downlaods for the user curently logged on.
http://www.team2s.com/new/EnableDownload.zip
--Scott
As per Scott:
"The problem is with the URL filter. Even though you have "+file://" in the URL filter, the IE web browser control is presenting PWB with "C:\WINDOWS\Notepad.exe" as the URL. With "-all" in the URL filter file PWB is going to deny access to it unless it is specifically allowed. You should add the following to your URL filter file to allow PWB to access the link.
+C:\\Windows\\Notepad.exe
Please note the double backslashes. This is because in Regular Expressions the backslash has a special meaning and you must have a double backslash for a literal backslash.
You should move the "-all" to the top of the URL filter file. This will allow PWB to start with the "-all" option on for all URLs.
To run the application without prompting you can use the PWB Dynamic External Java Commands."
Scott;
That works fine (thanks!) as a direct link, although I still see the download prompts.
When I use this Java command though, in an effort to bypass the download prompts:
<script language="JavaScript" type="text/JavaScript">
<!--
function OnClickExecute()
{
window.external.PWBExecute( 'c:\windows\notepad.exe' )
}
//-->
</script>
<p><A HREF="c:\windows\notepad.exe" OnClick="window.external.PWBExecute( 'c:\windows\notepad.exe' )">Notepad via Java link</a></p>
I still get prompted to open/save; then also get the dialog about opening an unsigned executable. I know I can turn this stuff off in IE. My understanding was that using the Java commands would bypass these dialogs?
Les
"The problem is with the URL filter. Even though you have "+file://" in the URL filter, the IE web browser control is presenting PWB with "C:\WINDOWS\Notepad.exe" as the URL. With "-all" in the URL filter file PWB is going to deny access to it unless it is specifically allowed. You should add the following to your URL filter file to allow PWB to access the link.
+C:\\Windows\\Notepad.exe
Please note the double backslashes. This is because in Regular Expressions the backslash has a special meaning and you must have a double backslash for a literal backslash.
You should move the "-all" to the top of the URL filter file. This will allow PWB to start with the "-all" option on for all URLs.
To run the application without prompting you can use the PWB Dynamic External Java Commands."
Scott;
That works fine (thanks!) as a direct link, although I still see the download prompts.
When I use this Java command though, in an effort to bypass the download prompts:
<script language="JavaScript" type="text/JavaScript">
<!--
function OnClickExecute()
{
window.external.PWBExecute( 'c:\windows\notepad.exe' )
}
//-->
</script>
<p><A HREF="c:\windows\notepad.exe" OnClick="window.external.PWBExecute( 'c:\windows\notepad.exe' )">Notepad via Java link</a></p>
I still get prompted to open/save; then also get the dialog about opening an unsigned executable. I know I can turn this stuff off in IE. My understanding was that using the Java commands would bypass these dialogs?
Les
You need to have the Dynamic External Java Commands enabled and the Java Execute command defined.
[Java]
EnableExternalJava=True
JavaExecute=PWBExecute
...
Then you need to change your link to reference the Java Command.
<p><A HREF="JavaScript:OnClickExecute()">Notepad via Java link</a></p>
The way you have it setup PWB is still trying to download the file because the reference is pointing to the executable.
--Scott
[Java]
EnableExternalJava=True
JavaExecute=PWBExecute
...
Then you need to change your link to reference the Java Command.
<p><A HREF="JavaScript:OnClickExecute()">Notepad via Java link</a></p>
The way you have it setup PWB is still trying to download the file because the reference is pointing to the executable.
Please let me know if you have any questions.function OnClickExecute()
{
window.external.PWBExecute( 'c:\windows\notepad.exe' )
}
//-->
</script>
<p><A HREF="c:\windows\notepad.exe" OnClick="window.external.PWBExecute( 'c:\windows\notepad.exe' )">Notepad via Java link</a></p>
--Scott
I just noticed one thing, you should use either a double backslash or a forward slash in the path to the EXE file.
function OnClickExecute()
{
window.external.PWBExecute( 'C:/windows/notepad.exe' )
}
Using a single backslash can cause PWB not to find the file because the single backslash can have special meaning.
--Scott
function OnClickExecute()
{
window.external.PWBExecute( 'C:/windows/notepad.exe' )
}
Using a single backslash can cause PWB not to find the file because the single backslash can have special meaning.
--Scott