Steps to creating an EzStor/HSP file

Now that you have an understanding of HSP and EzStor, here are the steps involved in using this system to create an HSP file:

  1. Create your ASP, HTML and graphic content in the same way you would for any ASP website.
  2. Use EzStor to create an EzStor content file and add all of your content created in step 1.

Create your content

The first thing is to create your ASP/HTML/graphic content.  HSP uses the exact same Windows Scripting Engines as does the Microsoft ASP webserver, so can use any feature of VBScript or JScript.  For example, you can use ADO in your ASP to display information from a database, just as you would using server-side ASP (of course, ADO must be installed on the client machine).  Or you could display a file listing, file contents, System information, data from a Web Service, or any other kind of data.  And of course, you can seamlessly link to any website on the Internet using HTTP hyperlinks.  HSP provides an additional "System" object that has many common system-related functions for your programming convenience, such as reading/writing to the system Registry.

We have provided two sample ASP pages that generate a customer listing and show customer details for the purpose of this tutorial (available for download via the link at the beginning of this article).

Create your HSP file

Now that you have created your content, you are ready to create the EzStor file to store the content.  Open the EzStor program from the Programs menu (Programs/EzTools/EzStor).  Select File/New from the Menu, navigate to your content folder and give your file a name with a .hsp extension.  In this example, the filename is "Sample.hsp", as shown below.

Next add your content files.  This means all of your ASP/HTML/graphic files. You add them with same hierarchy as they are in your file system using drag/drop. HSP will use the same relative and absolute links seamlessly.  This makes things very easy.  Just drag all files and folders onto the EzStor TreeView (left pane) using Windows explorer.  Drag the whole lot all at once.

When you drop the files, a "Copy Options" dialog box will pop up.  If you have dropped a folder, you would probably want to copy all subfiles and folders.  If you don't care so much about security and size, don't tick compression and encryption.

Alternatively, you can use the context menu (right-click on the TreeView) to add files via a file selector dialog.

OK, now that you have added files to your EzStor file, it may look something like the screenshot below.  Notice that we have created a hierarchy one level deep for the purpose of keeping graphic files together in a separate folder. 

The relative links on the ASP pages will work just as they did before they were put into the EzStor file.  For example, suppose display_cust.asp had a reference to edit.gif like this:

<img src="graphics/edit.gif">

When this file is run by HSP, the relative links will work just the same.  This means you can actually store an entire existing ASP website in an EzStor file and HSP will run it in the IE webbrowser*.

Now we are almost finished.  To run the HSP file we have created, you just click on it in the Windows Explorer.  But if you do so now, you will see a file listing in IE like the one below.

The reason for this is that HSP needs to have a "default" file to open. HSP looks for certain default filenames to automatically open when no file has been specified - names with "default", "start", or "index".  Eg. default.asp or start.htm.  Since we don't have any such names, we can specify a "Startup File" in the EzStor Files Settings dialog, as shown below.  We can also specify a title for the Title bar and a password.  If you have purchased the EzStor Security License, you can also set a license into the file, so that only licensed machines can view the file (you issue license keys using our EzReg product).  There are other security options as well.

 

<< Back    Next >>

*HSP implements subset of the MS ASP API, so you may need to remove or comment certain server-related API calls not supported by HSP.

© Copyright 2003 EzTools Software