+ Post New Thread
Results 1 to 8 of 8
Coding Thread, reality check on idea in Coding and Web Development; Right stop me if this looks impossible Currently i have a vbs script that logs pc details everytime its booted ...
  1. #1


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,815
    Thank Post
    231
    Thanked 888 Times in 763 Posts
    Rep Power
    301

    reality check on idea

    Right stop me if this looks impossible

    Currently i have a vbs script that logs pc details everytime its booted to ad/a csv file. I was thinking about altering this to read/write to a database file (sql probably) the idea being that with extra fields the database i could then do better reporting etc on it ? so for instance write a web interface to look data up/filter it, hopefully grab warranty info and fill in a field by each pc it can find with expiration dates, realise that no 2 pcs have the same mac address and merge records so that if i rebuild pc1 and call it pc01 it knows pc01 is newer and remove pc1 BUT add pc1 to an old names field, ercord historical data so if i add more ram it can as well as recording that pc01 now has 8gb ram it logs the fact before that it had 4. I suspect the easiest way to do this would be just to give each mac address its own table and as things change add a new row in the table. Granted i have almost no idea where to start but any advice is appreciated. Presumably i could do multiple linked tables as well so that forr mac address x i have a a table with specs, a table showing diference in drive usage, users who have used it possibly, and a separate table or warranty info

  2. #2
    SovietRussia's Avatar
    Join Date
    Mar 2013
    Location
    Powys, Wales
    Posts
    686
    Thank Post
    76
    Thanked 157 Times in 122 Posts
    Rep Power
    49
    I built one that does that when you login, but as it is tailor made for my school then I wont be able to share it with you (And it was done in my work hours etc)

    EDIT: Don't give each PC its own Table, give each PC its own row and maybe do backups of the data so you still have old data available?

    Basically;

    Built in C#
    EXE Runs at Logon:

    • Inserts current logged on user into a table with time and date
    • Uses WMI to call specific functions relating to disk space etc to add/update to a global database table of all our PCs


    EXE Runs at Logoff:
    • Removes the current logged on user from the CURRENT_USERS table
    • Loops through all user browsing history into a table
    Last edited by SovietRussia; 1st July 2013 at 12:25 PM.

  3. #3

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,731
    Thank Post
    344
    Thanked 520 Times in 488 Posts
    Rep Power
    180
    Same as Soviet really, we've got a custom style one that does similar.

    Things I'd say though, Personally I'd go with a service tag if your pc makes have one. Generally easier to log information against certain computers etc. Also no worries if you have multiple cards/wireless, and/or any motherboard swaps etc if it ever dies.

    Depending how often you want it to update, you could either keep updating one record for each pc (But won't give you new data), or set an "active" switch for filtering, so you can filter it out for current pcs, but search for older ones.

    Steve

  4. #4


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,815
    Thank Post
    231
    Thanked 888 Times in 763 Posts
    Rep Power
    301
    service tags are generally dells arnt they? i have very few dells except servers. Its mainly hp/fuji/lenovo. I have the majority of the fields already for example i just pulled the csv for a netbook (it gathers it every bootup)

    NB250-01,TOSHIBA TOSHIBA NB250,Intel(R) Atom(TM) CPU N455 @ 1.66GHz,2048 MB,148 GB,119 GB,serialno,Microsoft Windows 7 Enterprise sp 1,E8:39F:8A:F0:9C,Overall -2.4 - CPU - 2.4 - Memory - 4.7 - Graphics - 2.8 - Gaming graphics - 3 - hdd - 5.3,school\somekid,1000 Mbps-54 Mbps-,28/06/2013,

    just thought it might be more useful as a database and i couyld presumably then run queries that do something with the data rather than just storing it

  5. #5

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,819
    Thank Post
    110
    Thanked 589 Times in 510 Posts
    Blog Entries
    1
    Rep Power
    226
    Reinventing the wheel aren't we?

    OCS Inventory NG | Home

  6. #6


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,815
    Thank Post
    231
    Thanked 888 Times in 763 Posts
    Rep Power
    301
    Quote Originally Posted by Geoff View Post
    Reinventing the wheel aren't we?

    OCS Inventory NG | Home
    well yes by the same token i could use spiceworks but its as much for a challenge that gets something done as for the result itself and if ive designed it i can get it to output exacly what i want how i want

  7. #7

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,574
    Thank Post
    1,473
    Thanked 1,225 Times in 834 Posts
    Rep Power
    753
    I don't mean to sound dense, but what's the question here?

    Everything you've said is perfectly reasonable - is it that you're not sure how to write the underlying code to do this?

    If you already have a VBS script running how you want then you can populate an SQL DB from the script by creating a DAO connection or simply making a CLI call to sqlcmd

    Obviously you'd then need to write the web front end too - have you any knowledge of ASP or PHP?

    You might be biting off more than you can chew if you're unfamiliar with SQL and ASP/PHP, however if you are confident with one of them it could be a great way to learn to use the other...

  8. #8

    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    34
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    We do this using a VBS script which gathers various bits from the client using WMI and then invokes cURL to send the data to a PHP script, where it gets entered into a SQL table. The script is in a GPO to execute every time a machine boots. It works well, giving us very current data that can be joined to other queries for reporting - it is this aspect that would be more difficult to achieve with System Centre etc. only. I also make use of Dell's API to retrieve warranty info based on the Service Tag.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 0
    Last Post: 4th February 2013, 09:47 AM
  2. Blocking the use of Spell check on a document?
    By Rydra in forum Office Software
    Replies: 1
    Last Post: 27th May 2010, 03:14 PM
  3. Forcing maintenance hardware drive check on reboot...
    By duncane in forum Internet Related/Filtering/Firewall
    Replies: 1
    Last Post: 6th May 2010, 01:09 PM
  4. Server Core Reality Check
    By PiqueABoo in forum Windows Server 2008
    Replies: 12
    Last Post: 5th March 2008, 09:17 AM
  5. Replies: 4
    Last Post: 31st March 2006, 10:11 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •