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 ...
1st July 2013, 12:49 PM #1
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
IDG Tech News
1st July 2013, 01:24 PM #2
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?
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 01:25 PM.
1st July 2013, 01:32 PM #3
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.
1st July 2013, 01:44 PM #4
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
1st July 2013, 01:57 PM #5
Reinventing the wheel aren't we?
OCS Inventory NG | Home
1st July 2013, 02:03 PM #6
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
Originally Posted by Geoff
1st July 2013, 02:47 PM #7
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...
18th October 2013, 12:23 AM #8
- Rep Power
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.
By Gaz in forum Windows Server 2000/2003
Last Post: 4th February 2013, 10:47 AM
By Rydra in forum Office Software
Last Post: 27th May 2010, 04:14 PM
By duncane in forum Internet Related/Filtering/Firewall
Last Post: 6th May 2010, 02:09 PM
By PiqueABoo in forum Windows Server 2008
Last Post: 5th March 2008, 10:17 AM
By tosca925 in forum Windows
Last Post: 31st March 2006, 11:11 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)