Kaseya Community

Internet Usage Monitoring

  • I have to ask for permission first. I probably should have done that before posting.

    Smile



    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • Thanks Gamer-X, I look forward to seeing what you have.

    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: toddbn
  • Retrieve IE History.zip
    Ok, long overdue, here is the script. This script do not use any VB script.





    This script will grab the IE history files located on the client computer and write them to a tab delimited text file.



    This script will copy a freeware program to the client computer, and then execute the program, creating a text file called “history.txt”. This file is TAB delimited. ( more on that in a sec ) The script then writes the file to the Kserver using the “GET” command. Finally the script deletes the file called “history.txt”.



    The reason it deletes the file is to show you how to easily mod this script to delete the other files as well… mainly iehv.exe, .chm, and readme.txt respectively. IF you look at the earlier script posted by previous authors, (containing VB script), you can determine how to email this txt file to any number of email addresses that you choose. Please mod this script to accommodate your specific needs.



    Now for the Tab delimited file reasoning…… This script was designed from the ground up to have a SQL stored procedure ran and the information contained in the txt file ultimately written to the Kaseya database. This script was the completion of the proof of concept. That is why it is in a TAB delimited format… or in other words… “looks ugly and hard to read as a text file”. I will post the stored procedure upon finalization and proper testing…. Later this week… probably tomorrow or Tuesday.



    If you need the txt file to look “better” and you do not want to use the stored proc, I suggest that you simply import the data into Excel or something similar. Since it is a delimited file, you should have no problems formatting it to your desired look and feel.



    >>>>>>>>>>>>>>>

    Other thoughts…. You can also change this script to create an .html file instead of a text file. This .html file still contains the date/time stamp and also contains hyperlinks to the websites recorded and will most likely be formatted for easier reading. This may benefit some of you, so that is why I am mentioning it. Just read the .CHM help file that comes with IEhistoryview. It is pretty simple.

    >>>>>>>>>>>>>>>



    The need for better reporting exists with scripting and gathering data. This is why this particular script is being taken to the next level and the data is being written to the SQL database so that any applicable report writer can be used to pull data from the database and create far richer reports for Kaseya administrators, and clients alike. We maintain a separate SQL server and do not use the Microsoft local SQL database. If you use this database, we will NOT be exploring how to do this for you. This is only for stand alone or shared SQL databases. I know that some of you must already do this, but there is very little mention of it on the forums. Hopefully this will start a change for more users of Kaseya to get their data into the database and off of the Kserver so that it can be better reported on. But alas…. That is a completely separate topic… more on that in another forum on another day.





    I hope that this script helps you. It is provided as is…. TEST EVERYTHING FIRST before putting it into production. This attached file is in the .ASP format. It is zipped up for your convenience.



    Here is the website in which you can obtain the freeware program. IE History View.

    http://www.nirsoft.net/



    Since this program is freeware, the author has requested that the .chm file, and the readme.txt file accompany the iehv.exe file respectfully. We have complied with the authors wishes and all three files are copied to the client local temp directory. If you do not want them there, just mod the script to delete them during the cleanup process at the end of the script. Finally, there is a 60 second pause in the script to ensure that the text file writes properly on older computers. You can remove this, or lower the amount of time to suit your specific need.





    Gamer-X


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • Retrieve IE History HTML.zip
    Here is the same script that creates an .html file. This one is formatted for eaier use and better readability. The down side for this one, is that a stored procedure is much tougher with a file like this.



    Gamer-X


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • update on the whole stored procedure discussion.

    The stored proc worked ok in initial testing. I am having the programmer write a little...'this is what I did" document to explain how to use it, etc.

    I will post a forum link into this forumto the topic when its complete.I do not think it belongs in this section.



    Gamer-X


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • Here is the link to the forum thread discussing stored procedures.

    http://www.kaseya.com/kforum/view_topic.php?id=1586&forum_id=47


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • Thank you for this script! You deserver some mondo mana Smile


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: arthur
  • Amazing all. Now we just need some software usage monitoring! Like the 'rarely' information listed in the add/remove programs from MS? Wink

    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: raybarber
  • Where does it write the file to the KServer?

    C:\Kaseya\UserProfiles\%machinename% ?

    I've had problems with finding uploaded files before. Not sure what I'm missing. Pointers appreciated.


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: nvelocity
  • Hello all,

    Can you tell me the name of the field that ie stores the dates and times the sites wereaccessed.I would like to also track the datesand timesthat the sites were accessed.

    Be Blessed,

    KB


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Kcbrownlee
  • First off, Awesome script Gamer-X!!!!!

    Second, is there any way to email the html file created?

    Or how do you recommend gong about displaying the file when the client wants it?

    -Roy


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: rage
  • IE History.zip
    OK.....I have modified the script and added some functionality to it.

    1: Modified it so that it creates an html file rather than a txt the first time (was set that the else statement created txt)

    2: Created a new script to pull a batch file that formats the date/time correctly (this gets called from the main Retrieve IE history script)

    3: Have also included the batch file so you don't have to create the formatting Wink

    4: Now when the file uploads to the server it adds the date-time-history.html (this allows to run the script for 2 days and even if the userdeletes thier history you still have it) It does this by creating multiple files using the date/time stamp in the file name.

    BIG props to Gamer-X for the intial script on this! I doubt I would havegotten this far if not for his hard work.

    This is my first attempt at scripts so please let me know if it works well.

    -Roy



    P.S: I should also add that this script is for the HTML version



    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: rage