Discovery and Inventory Group

 View Only

NS7 Custom Inventory VBScript - 32 & 64-bit Add/Remove Programs Registry Data 

Aug 31, 2009 01:06 PM

This custom inventory is in NS7 format. It retrieves Add/Remove Programs data from both the 32 and 64-bit Windows registry locations. It does NOT filter out any results whatsoever. Optionally, it has commented vbscript statements to display the results on-screen in case a user wants to view the results prior to loading them to the NS database. (In this case, please comment out the line that reads: "nse.SendQueued".)

This script requires the creation of a custom inventory data class on the NS server, as explained elsewhere on Connect. 


Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
txt file
cust_addremove_programs_3264bit.vbs_.txt   6 KB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Comments

Apr 04, 2013 07:01 AM

I am looking for software changes report in Altirsi NS 7.1 SP2. Please help me on it.....

Apr 04, 2013 06:58 AM

 I am looking for a script to retieve the MS office product keys from Office XP/2003/2007/2010/2013 and Windows XP/2003/2008/2008 R2/VISTA/7/8. Please help me on it..........

Feb 01, 2012 04:47 AM

Hi friends,

       i am looking for a script to fetch the MS office product keys from Office XP/2003/2007/2010 i created one VBscript and run it but i can get only office 2007 cd keys not others can you please help me on it..........

Jul 14, 2011 05:40 AM

Hi Doug and thanks for sharing this app - it's just what I was looking for (even though I had to script another app to filter the results, you still saved me a lot of time)!

Feb 26, 2011 04:03 PM

Hi Kada,

I'm really interested by the script you are using to copy all the registry you want to gather to wow6432node.

I try many vbs script (with regread and regwrite) with the "enable launch 64 bits" option enabled . But the agent seems to still using the wrong version of cscript.

Thanks

JC

Jul 23, 2010 07:32 AM

In our company we are using two vbs scripts for gathering informations from registry on 64 bit OS. First script is triggered with option "Enable launch 64bit process" and copy needed registry to Wow6432Node. Second script is gathering the registry from Wow6432Node and sending by Altiris 32bit object to NS by NSE.

May 10, 2010 09:32 AM

Yeah this would be an option however you then have a wscript.exe process running in the background using up some resources... I was looking for something similar like it is possible in the Inventory Solution. There you can set to "Throttle inventory reporting evenly over a period of  and then choose a time frame:



Maybe I can see if I could "reuse" the inventory policy...
 

May 10, 2010 08:52 AM

Why not put a random wait into your script?  Seems like the easiest way.  That way you have some control over how many minutes or hours you have the inventory wait to run.

May 10, 2010 05:40 AM


My colleague found the following which seems to work. Here just an example which can be adapted to retrieve all the information from the registry and then using the same method as above to fill up the Custom Inventory.

The next question is how I can "randomize" the Task / Job because I don't want that the task run on all clients at the same time



Const HKEY_LOCAL_MACHINE = &H80000002 sPath = ReadRegStr (HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\ASP.NET\2.0.50727.0", "Path", 64) WScript.Echo sPath ' Reads a REG_SZ value from the local computer's registry using WMI. ' Parameters: '   RootKey - The registry hive (see http://msdn.microsoft.com/en-us/library/aa390788(VS.85).aspx for a list of possible values). '   Key - The key that contains the desired value. '   Value - The value that you want to get. '   RegType - The registry bitness: 32 or 64. ' Function ReadRegStr (RootKey, Key, Value, RegType)     Dim oCtx, oLocator, oReg, oInParams, oOutParams     Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")     oCtx.Add "__ProviderArchitecture", RegType     Set oLocator = CreateObject("Wbemscripting.SWbemLocator")     Set oReg = oLocator.ConnectServer("", "root\default", "", "", , , , oCtx).Get("StdRegProv")     Set oInParams = oReg.Methods_("GetStringValue").InParameters     oInParams.hDefKey = RootKey     oInParams.sSubKeyName = Key     oInParams.sValueName = Value     Set oOutParams = oReg.ExecMethod_("GetStringValue", oInParams, , oCtx)     ReadRegStr = oOutParams.sValue End Function

May 04, 2010 09:29 AM

I have had this problem and never figured out a simple workaround.  When you run a 64 bit script you cannot instantiate a 32-bit object or at least the 32 bit Altiris object.  There is probably a way to write what you need to file, launch another 32 bit vbscript to parse the file, call the object, and submit the inventory but that was a last resort for me and I never made it that far in testing.  You might be able to make it work if you hard code the path to the DLL but then I think you have to make the function call differently as well.

May 04, 2010 09:17 AM

Hi there,

I have tried to implement this script which I guess is the same as the one in the KB Article 48241 (https://kb.altiris.com/article.asp?article=48241&p=1) and I have some problem with it. It works fine on 32bit computers. And it also works on 64bit computers when it is running in the 32bit mode. However if it is running in the 32bit mode then it cannot collect the 64bit Add Remove information which is the whole point. I understood that I should select "Enable launch 64-bit process" in the Advance Option of the Custom Inventory Job. But if I do that the I get the following error message:

Error: Could not create object named "Altiris.AeXNSEvent".
Source: Wscript.CreateObject

Have you seen this problem before? Is there anything else I should check when implementing this in Altiris NS 7?

Stefan

Related Entries and Links

No Related Resource entered.