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
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
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.
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:39:DF: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
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
Originally Posted by Geoff
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...
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.