%@Language=JavaScript EnableSessionState=false%><%
//Declare Vars
Response.Buffer = false;
var obj_FSO;
var gs_thisFile = Server.MapPath( 'ass-install.asp' );
var gs_msg = '
The Test Results:
';
var gs_runTests = Request( 'runTests' );
var gs_showConfig = Request( 'showConfig' );
var gs_lastPage = Request( 'lastPage' );
//Vars to help with config
var gs_formHelper_webServerRoot = Server.MapPath( '/' ) + '\\';
var gs_formHelper_localPath = String( Request.ServerVariables( 'PATH_TRANSLATED' ) );
gs_formHelper_localPath = gs_formHelper_localPath.substring( 0, gs_formHelper_localPath.lastIndexOf( '\\' ) ) + '\\';
var gs_formHelper_siteHost = Request.ServerVariables( 'HTTP_HOST' );
//The testing functions
function testFSOCreation(){
obj_FSO = Server.CreateObject( 'Scripting.FileSystemObject' );
gs_msg += '• Test 1 - File System Object (FSO) Creation Succeeded :)
\r';
return true;
}
function testFSOFileRead(){
ls_thisPageText = obj_FSO.OpenTextFile( gs_thisFile, 1, false, -2 );
gs_msg += '• Test 2 - FSO File Read Succeeded :)
\r';
return true;
}
function runTheTest(){
if ( ScriptEngineMajorVersion() >= 3 ){
testFSOCreation();
testFSOFileRead();
gs_msg += '
';
Response.Write( gs_msg )
return true;
}
else {
gs_msg += '• ASPSimpleSearch requires Microsoft JScript Version 3 or above
\r';
gs_msg += 'Your version is: ' + ScriptEngineMajorVersion() + '
';
gs_msg += 'Visit http://msdn.microsoft.com/scripting/ to download the latest Microsoft Script Engine.';
gs_msg += '';
Response.Write( gs_msg )
return false;
}
}
%>
ASPSimpleSearch Configuration
ASPSimpleSearch (ASS) Configuration
<%if( ( gs_runTests != 'Next >>' ) && ( gs_showConfig != 'Next >>' ) && ( gs_lastPage != 'Next >>' ) ){%>
Welcome
This page is designed to do two things:
- Test your server's ability to run ASS
- Create the text for the required configuration file
You will first run two tests by pressing the "Next >>" button. Once you have passed those tests, you will be presented with the configuration screen. The test results will be at the bottom of the next page.
<%}%>
<%if ( gs_runTests == 'Next >>' ) {%>
The Test
When you pressed the "Run Tests >>" button, two simple tests were run (see test results below).Those tests were:
- Try to create the File System Object (FSO)
- Try to read the contents of this configuration file ("ass-install.asp") via the FSO
If these tests pass, you should be able to run ASS on this server (the server that you are viewing this page on) and should continue to the configuration section.
If they fail, the most common problems for the two tests, respectively, are:
- If test #1 fails:
If you see the error "Server.CreateObject Failed," the File System Object is probably not installed. Install it by re-registering the COM component by typing this at the command prompt "regsvr32 scrrun.dll " (minus the quotes). Read about why the FSO component should be disabled at all on Microsoft's IIS4 Security Checklist search for "Disable or remove unneeded COM Components" on that page.
- If test #2 fails:
Basically if test #1 passed, so will test #2. But I like to run it anyway :) If it fails the cause could possibly be incorrect permissions? Read the last paragraph on this 4GuysFromRolla page to learn more about what permissions you need to set.
If either of the tests fail, you will need to fix the problems before you can run ASS.
Begin Tests:
<%
if ( runTheTest() ) Response.Write('');
}%>
<%if ( gs_showConfig == 'Next >>' ) {%>
The Configuration
Instructions:
- Fill out the form below.
- Click the "Create Config" button.
- Copy the results and paste them into "ass-preferences.asp".
- Place ass-preferences.asp in the same directory as the other search files.
- You're finished!
You will find some of the fields autopopulated with common settings. The three settings you need to pay the most attention to are: "ASS Root Directory", "Allowed Hosts", and "Search These Extensions". See below the form for some help on the fields.
* = required.
<%}%>
<%if ( gs_lastPage == 'Next >>' ) {%>
Delete this file from your server!
Now that you are finished with the setup, you must delete this file ("ass-install.asp") from your server as a security precaution. This script reveals settings about your server that the general public (or nosey not-so-general public) shouldn't know. So remove this file!
Thanks for using ASS!,
blur software
<%}%>