Kaseya Community

ie history failing, not getting correct output

  • Script Name: allan iehistory
    Script Description: Gets the IE history using IEHistoryView from NirSoft.net Step 1 - Get IE History - run IEHV for current user Checks that a user is logged in, if so runs the data collection against the currently logged in user. If no user is logged in the script loops and waits for someone to login to the system. You can specify a user this runs against by modifying step 6 and specifying a user name. This will generate an HTML file that the script collects using the Get File command. To View the resultant files go to Scripts->Get Files and click the name of the machine the script was run on.

    not sure where i'm getting it wrong, first thing i know is i have to manually put in the ihv file for now, as it is blocked via firewall, this will be fixed later this week.

    script outputs file in html format, but it isn't pulling ie history it is simply writing logged in users name into file. I think it's in step six that i have it incorrect the problem is i don't know what i need to export to the file.

    IF User Is Logged In
    Parameter 1 :
    THEN
    Get URL
    Parameter 1 : http://www.nirsoft.net/utils/iehv.zip
    Parameter 2 : #vAgentConfiguration.AgentTempDir#\iehv.zip
    Parameter 3 : 3
    OS Type : 13
    Write File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\unzip.exe
    Parameter 2 : VSASharedFiles\unzip.exe
    OS Type : 13
    Execute File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\unzip.exe
    Parameter 2 : -o -q #vAgentConfiguration.AgentTempDir#\iehv.zip -d #vAgentConfiguration.AgentTempDir#
    Parameter 3 : 3
    OS Type : 13
    Execute Shell Command
    Parameter 1 : echo %username% >> #vAgentConfiguration.AgentTempDir#\username.log
    Parameter 2 : 0
    OS Type : 13
    Get Variable
    Parameter 1 : 1
    Parameter 2 : #vAgentConfiguration.AgentTempDir#\username.log
    Parameter 3 : username
    OS Type : 13
    Get Variable
    Parameter 1 : 2
    Parameter 2 : insertusernamehere
    Parameter 3 : username
    OS Type : 13
    Execute File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\iehv.exe
    Parameter 2 : /shtml "#vAgentConfiguration.AgentTempDir#\#username#_IE_history.htm" -user #username#
    Parameter 3 : 1
    OS Type : 13
    Get File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\#username#_IE_history.htm
    Parameter 2 : ..\Docs\#username#_IE_history.htm
    Parameter 3 : 1
    OS Type : 13
    Delete File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\#username#_IE_history.htm
    OS Type : -1
    ELSE
    Execute Script
    Parameter 1 : Get IE History - run IEHV for current user (NOTE: Script reference is NOT imported. Correct manually in script editor.
    Parameter 2 : 60
    Parameter 3 : 1
    OS Type : 13

    Legacy Forum Name: ie history failing, not getting correct output,
    Legacy Posted By Username: allan morris
  • I'm not sure why you are calling another script that does the same thing (I'm guessing by the name)

    but be mindful of the spaces in the name (edit: read: in random places...), I see that quite a bit here with those who do post scripts...


    heres the script I use it'll take a wee bit of modification to get it to output in html format but not much... It's slightly different from the one that you are using but gleaned from the same place none the less.


    Script Name: Get Internet History
    Script Description: Gets the IE history using IEHistoryView. Step 1 - Get IE History from Nirsoft - run IEHV for current user Checks that a user is logged in, if so runs the data collection against the currently logged in user. If no user is logged in the script loops and waits for someone to login to the system. You can specify a user this runs against by modifying step 6 and specifying a user name. This will generate a file that the script collects using the Get File command.

    IF User Is Logged In
    Parameter 1 :
    THEN
    Write File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\iehv.exe
    Parameter 2 : VSASharedFiles\IEHistoryViewer\iehv.exe
    OS Type : 13
    Execute Shell Command
    Parameter 1 : echo %username% >> #vAgentConfiguration.AgentTempDir#\username.log
    Parameter 2 : 0
    OS Type : 13
    Get Variable
    Parameter 1 : 1
    Parameter 2 : #vAgentConfiguration.AgentTempDir#\username.log
    Parameter 3 : username
    OS Type : 13
    Get Variable
    Parameter 1 : 2
    Parameter 2 : insertusernamehere
    Parameter 3 : username
    OS Type : -1
    Execute File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\iehv.exe
    Parameter 2 : /stab "#vAgentConfiguration.AgentTempDir#\#username#iehistory.txt" -user #username#
    Parameter 3 : 1
    OS Type : 13
    Get File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\#username#iehistory.txt
    Parameter 2 : ..\Docs\#username#iehistory.txt
    Parameter 3 : 2
    OS Type : 13
    Pause Script
    Parameter 1 : 20
    OS Type : 13
    Delete File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\iehv.exe
    OS Type : 13
    Delete File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\username.log
    OS Type : 13
    Delete File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\#username#iehistory.txt
    OS Type : 13
    ELSE


    P.S. please wrap your scripts and the like in code tags =) it makes it easier to read... imo

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: thirteentwenty
  • Here's the script for html output


    Script Name: Get Internet History Html
    Script Description: Gets the IE history using IEHistoryView. Step 1 - Get IE History from Nirsoft - run IEHV for current user Checks that a user is logged in, if so runs the data collection against the currently logged in user. If no user is logged in the script loops and waits for someone to login to the system. You can specify a user this runs against by modifying step 4 and specifying a user name. This will generate a file that the script collects using the Get File command.

    IF User Is Logged In
    Parameter 1 :
    THEN
    Write File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\iehv.exe
    Parameter 2 : VSASharedFiles\IEHistoryViewer\iehv.exe
    OS Type : 13
    Execute Shell Command
    Parameter 1 : echo %username% >> #vAgentConfiguration.AgentTempDir#\username.log
    Parameter 2 : 0
    OS Type : 13
    Get Variable
    Parameter 1 : 1
    Parameter 2 : #vAgentConfiguration.AgentTempDir#\username.log
    Parameter 3 : username
    OS Type : 13
    Get Variable
    Parameter 1 : 2
    Parameter 2 : insertusernamehere
    Parameter 3 : username
    OS Type : -1
    Execute File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\iehv.exe
    Parameter 2 : /shtml "#vAgentConfiguration.AgentTempDir#\#username#iehistory.html" -user #username#
    Parameter 3 : 1
    OS Type : 13
    Get File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\#username#iehistory.html
    Parameter 2 : ..\Docs\#username#iehistory.html
    Parameter 3 : 2
    OS Type : 13
    Pause Script
    Parameter 1 : 20
    OS Type : 13
    Delete File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\iehv.exe
    OS Type : 13
    Delete File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\username.log
    OS Type : 13
    Delete File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\#username#iehistory.html
    OS Type : 13
    ELSE


    Note: If you want a specific user specify in step 4 "usernamehere"... if not it will grab the user that is currently logged in

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: thirteentwenty