Incorrect email attachment path in audit.vbs
Page 1 of 1

Author:  smorloc [ Thu Feb 24, 2011 9:43 am ]
Post subject:  Incorrect email attachment path in audit.vbs

I believe that the generated path for the email attachment in audit.vbs is not correct.
In the following code, I beleive that "this_audit_log" already has a path on it. Adding
another pass leads to an SMTP error:

    if use_audit_log = "y" then
        Set objShell = WScript.CreateObject("WScript.Shell")
        this_folder = objShell.CurrentDirectory
        this_file = this_folder & "\" & this_audit_log
    end if

The code should probably read:

    if use_audit_log = "y" then
        this_file = this_audit_log
    end if

Or better still, the if/then bock could be eliminated and the
single reference to "this_file" be replaced with "this_audit_log"
later in the method:

    if use_audit_log = "y" then
        objEmail.AddAttachment this_file
    end if


Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group