Hello all,

i need a vbscript that should run against all the machines in my network we are using sccm and check for a registry path/key and result should be written to excel file with the host name and result of search. Let me also know if i can do this in SCCM in any other way.

thanks in advance

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
0

what you want to check in Machines.. Please be more detailed on your needs..

whether it is HKCU or HKLM regkeys
whether you are going to generate report on applications installed in the target machines...

Answered 02/07/2012 by: mahendraKumar
Senior Yellow Belt

Please log in to comment
0

Create a VBScript using the RegRead function of a Shell object to check for the registry key/value and which writes to a CSV formatted TextFile using a FileSystemObject.

Using RegRead, if you are checking for a key, add a "\" at the end of the key path e.g. 'strVal = oShell.regread("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\")' . Check the value of the error returned - it will be >0 for a non valid key/value (remember the 'on error resume next' at the start of the script).

For the log, start each line with 'CHR(34) & ' to start with a double quote, and then add ' & CHR(34) & "," & CHR(34)' between each column to add the delimiters, End with ' & CHR(34) '. The file should the open in Excel with each column

Call the script from an advertised programm in SCCM and link to collection with all machines required.

Answered 02/08/2012 by: andys0123
Orange Belt

Please log in to comment
0

If you're expecting someone to post a script for you to use, I'd say you're straight out of luck. Building a script to do this job with any resilience is a non-trivial undertaking and most people who respond to posts work full-time. I wouldnt imagine any of them will provide you with code for free.

My advice would be to find a script which reads the registry value in question, find another which shows you how to programmatically populate an Excel spreadsheet and then marry the two together. Search AppDeploy for the text 'computerperformance'. That will turn up a number of posts with links to various web sites with scripts available for download.

Answered 02/08/2012 by: VBScab
Red Belt

Please log in to comment
0

Mahendra i am looking for HKLM reg key which is for internal use and every user should need that key so checking out for a script which looks in to each machine for the regpath and reports the results as yes/no
ORIGINAL:  mahendraKumar

what you want to check in Machines.. Please be more detailed on your needs..

whether it is HKCU or HKLM regkeys
whether you are going to generate report on applications installed in the target machines...

Answered 02/08/2012 by: acbabu
Orange Belt

Please log in to comment
0

Thanks Andy i am trying out writing the script

ORIGINAL:  andys0123

Create a VBScript using the RegRead function of a Shell object to check for the registry key/value and which writes to a CSV formatted TextFile using a FileSystemObject.

Using RegRead, if you are checking for a key, add a "\" at the end of the key path e.g. 'strVal = oShell.regread("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\")' . Check the value of the error returned - it will be >0 for a non valid key/value (remember the 'on error resume next' at the start of the script).

For the log, start each line with 'CHR(34) & ' to start with a double quote, and then add ' & CHR(34) & "," & CHR(34)' between each column to add the delimiters, End with ' & CHR(34) '. The file should the open in Excel with each column

Call the script from an advertised programm in SCCM and link to collection with all machines required.

Answered 02/08/2012 by: acbabu
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity