• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Client side VBScript Help

Code:
Function PrintSystemTable()
    Set con = CreateObject("ADODB.Connection")
        'get fs object
        'Set objFSO = CreateObject("Scripting.FileSystemObject")
        'get path to the database
        'sPathToDatabase = objFSO.GetAbsolutePathName("SaveData\SaveData.accdb")
        'sPathToDatabase = objFSO.GetAbsolutePathName("SaveData.accdb")
        
        Set oShell = CreateObject("WScript.Shell")
        Set ofso = CreateObject("Scripting.FileSystemObject")
        oShell.CurrentDirectory = ofso.GetParentFolderName(WScript.ScriptFullName)
        theDirectory = ofso.GetParentFolderName(WScript.ScriptFullName)


        'document.write("sPathToDatabase = " & sPathToDatabase)
    con.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=.\SaveData\SaveData.accdb"
    
    document.write("<table class=satelliteList>")
        document.write("<tr>")
            document.write("<td>Select</td>")
            document.write("<td>System Name</td>")
            document.write("<td>Description</td>")
            document.write("<td>Files</td>")
        document.write("</tr>")
    document.write("</table>")
    
    con.Close

End Function

I keep getting "Object Required: WScript" errors while trying to run this from IE. Is this because IE does not support a WScript object?

All the code needs to do is grab the current directory of this script.

-Kevin
 
Back
Top