Home    Forums    Feature Requests    Beta Issues    SysAid Resources    Documentation    Support
Hello Guest,  Login   
        
DOWNLOAD FREE EDITION
    
     Recent Topics    Hottest Topics    Online Members    Member Listing    Advanced Search
Reporting custom registry values  XML
Forum Index » Asset Management
 
Author Message
techguy
SysAid Mod


SysAider from release 4 United Kingdom Pathfinder Meet me in Vegas - SysAid technology Conference - 28-30/4/2010
Joined: 11/06/2008
Messages: 1451
Location: England
Offline

Sorry it does not display the value of the registry key, all it does is filter the list so it only displays assets that contain that registry key.

Need help? Try the SysAid wiki first! - http://sites.google.com/site/sysaidwiki
EbroIN
Elite SysAider


SysAider from release 5.6 Germany Pathfinder
Joined: 25/03/2009
Messages: 244
Offline

techguy wrote:Sorry it does not display the value of the registry key, all it does is filter the list so it only displays assets that contain that registry key.


Thanks for your follow up (I am sooooo late)...

Well - is there ANY way to display that values? Maybe I can create a view on database level?

Thanks for your feedback!
michalp
SysAider

SysAider from release 5.1 United Kingdom
Joined: 18/06/2008
Messages: 26
Location: London, UK
Offline

We have same problem here. I am more than happy to use ODBC driver to database or basically ANY form of extracting that information from the system. Could somebody from SysAid point me/us into right direction, where this information about Key (I believe it is in main XML config file?) and Value (it has to be somewhere on the server?) is stored? It would help us a million, as it is great feature for pro active admins.

michalp
SysAider

SysAider from release 5.1 United Kingdom
Joined: 18/06/2008
Messages: 26
Location: London, UK
Offline

I have found crude way of extracting that information using ODBC driver (MySQL in my case with MS QUERY).

Just use this SQL command:



LOCATE finds you position of first letter of Reg Key you are after.
47 is manually calculated length of Reg Key (use small macro TEXT TO COLUMNS in Excel) edit: or obviously you can use SQL LENGTH() function
39 seems to be a distance to value of that Reg Key
3 is manually determined length of value you are after, in most cases it would be constant or predictable

I am pretty sure this code could be better optimized, so please share your opinion/ideas. I used parameters with VBA and Excel in the past, so I think they can be used, to make process very automatic.

This message was edited 2 times. Last update was at 22/05/2009 04:30:40

EbroIN
Elite SysAider


SysAider from release 5.6 Germany Pathfinder
Joined: 25/03/2009
Messages: 244
Offline

Hi Michalp,

yeah, I also found out that the registry values are stored within the column 'inventory_xml' in 'sysaid.computer' like that way:



I dare to say that for SQL SERVER 2000 Users this might be a real pain in the ass (please excuse me). I can not rely on functions like LOCATE because they are not known as SQL2000 statement. But SQL SERVER 2000 can handle XML documents so my way of displaying these Values should be parsing the XML value, dump the relevant components into a temporary table and creating a VIEW that displays the data that I am looking for. Afterwards drop that table.

I'm working on this view right now and will post a valid TSQL Statement if I've finished my work.

@Ilient: Why don't you drop those values into a table?

Best regards - EbroIN
EbroIN
Elite SysAider


SysAider from release 5.6 Germany Pathfinder
Joined: 25/03/2009
Messages: 244
Offline

ok,

this one is a quite DIRTY HACK but this VBS drops all Values to the screen, tabseparated...

We have a SQL Server 2000 here although I expect that this script might also work with mySQL. You might have to adjust the ADVANCED_SETTINGS here (especially the connection string). This script uses your current NT logon credentials, so if you need to pass a user and password, you have to modify the SQL Connection string.

Instructions:
- CopyPaste the code into a textfile like C:\testDB.vbs
- Edit the "CONFIGURE YOUR SERVER SETTINGS HERE" section and enter your servername and DB Name
- run the script with CSCRIPT!



This hack is quite dirty but works good for me... I do not parse the xml file because I search the string quite featherbrained to locate the entries. This hack was quicker than implementing MSXMLDOM. Scripting.Dictionary might also do a good job especially dropping large tables directly to Excel files. I do not need such detailed output but there shouldn't be any problem to generate an excel file with VBScript.

But it would be even better if custom registry values are entered directly in the DBMS and not in this XML ntext column.

Hope this helps somebody out...

best regards,

EbroIN

This message was edited 1 time. Last update was at 22/05/2009 07:12:44

ctprobate
SysAider

SysAider from release 7.5 United States
Joined: 06/09/2011
Messages: 2
Offline

Here is the SQL (SQL 200:

DECLARE @computer VARCHAR(20)
DECLARE @xml XML

DECLARE @Registry TABLE (
ComputerName VARCHAR(20),
regName VARCHAR(500),
regValue VARCHAR(100)
)

DECLARE computer_cursor CURSOR FOR
SELECT computer_name FROM computer

OPEN computer_cursor
FETCH NEXT FROM computer_cursor
INTO @computer

WHILE @@FETCH_STATUS = 0
BEGIN
SELECT @xml = REPLACE(CAST(inventory_xml AS VARCHAR(MAX)),'agen:','') FROM dbo.computer c WHERE computer_name = @computer

INSERT @Registry
(ComputerName,regName,regValue)
SELECT
@computer,
doc.col.value('regName[1]', 'varchar(500)') [regName],
doc.col.value('regValue[1]', 'varchar(100)') [regValue]
FROM @xml.nodes('/inventory/registryValue') doc(col)

FETCH NEXT FROM computer_cursor
INTO @computer
END

CLOSE computer_cursor
DEALLOCATE computer_cursor

SELECT * FROM @Registry


pdlp
Super SysAider


SysAider from release 6.5 United States Pathfinder
Joined: 25/11/2009
Messages: 83
Offline

This would be really useful....

Is it possible to use iReports for this?

This message was edited 1 time. Last update was at 01/05/2012 19:02:35

Forum Index » Asset Management
Go to:   
Help Desk Software
Free Help Desk Software
Free Asset Management Software
SysAid Helpdesk Software
Web Based Help Desk Software
SysAid Help Desk Forum
General IT Discussion Forum
SysAid CSS Customer Service Software
Customer Support Software
   SysAid Technologies Ltd.
   Toll-Free phone center (U.S.): 1-800-686-7047
   Offices - U.S.617-231-0124
   Israel:+972-3-533-3675
   Skype account:ilient
   Email:helpdesk@sysaid.com
   Optimized by SEO Israel
   SysAid logos and other SysAid Technologies marks
   are trademarks or registered trademarks of
   SysAid Technologies Ltd.
   All Rights Reserved by SysAid Technologies Ltd.
   2002-2011
   Live Support Hours
   07:00 AM - 09:30 PM (UK)
   03:00 AM - 05:30 PM (EDT)

   We provide worldwide services, and we do our best
   to match the working times of customers from
   different time zones.

   SysAid Help Desk Software and Asset Management Software
Privacy Policy © Terms Of Use