[THIN] Example Script

  • From: "Matthew Shrewsbury" <MShrewsbury@xxxxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Mon, 25 Jul 2005 11:50:22 -0400

I want to publish an application that opens up the users home drive. I
know some people have talked about using a copy of explorer but there
always seems to be more then what the user needs available. I want to
really keep this locked down tight so I found this example of a HTA file
that could be published. It only allows browsing but the problem is the
forward and backward buttons don't work. From digging around my best
guess is that it was written for IE 5 and the calls used for forward
backward are no longer called the same thing. If anyone could help me
get this working I'd be very grateful as it would give a very secure
access to published drives.

 

<HTML>

<HEAD>

   <TITLE>MyBrowser</TITLE>

   <HTA:APPLICATION

      ID="oHTA"

      ICON="MyBrowser.ico"

   >

 

   <SCRIPT LANGUAGE="VBScript">

      Option Explicit

 

      Sub btnGo_onclick

         Dim strAddr

 

         strAddr = txtAddress.value

 

         If InStr(1, strAddr, "://") = 0 Then

            strAddr = "http://"; & strAddr

         End If

 

         frmClient.document.location.href = strAddr

      End Sub

 

      Sub btnBack_onclick

         frmClient.history.back

      End Sub

 

      Sub btnFwd_onclick

         frmClient.history.forward

      End Sub

   </SCRIPT>

</HEAD>

 

<BODY scroll="no">

   <B>Address:</B>

   <INPUT TYPE="Text" ID="txtAddress">&nbsp;

   <INPUT TYPE="Submit" ID="btnGo" VALUE="Go">

   <BUTTON ID="btnBack" STYLE="position:relative;left:50px">

       &lt; Back</BUTTON>&nbsp;

   <BUTTON ID="btnFwd" STYLE="position:relative;left:50px">

      Forward &gt;</BUTTON>

   <P>

   <IFRAME ID="frmClient"

      TRUSTED="yes"

      SRC="c:\"

      WIDTH="100%"

      HEIGHT="90%"

   >

   </IFRAME>

</BODY>

</HTML>

 

Copy into text file with *.HTA extension. 

 

Matthew Shrewsbury, MCSE+Internet MCSE 2000 CCA Server+

Senior Network Administrator

 

Other related posts: