I want to write a VB script to check certain registry present on build or not.
VBscript that will open up regedit for me and let me cross check the values that should be there or not and simillarly files at some locations as well as those are correct with version and naming.
I want to want to avoid manual clicks in regedit, want to dorectly go to that particular registry.
Answers (1)
this maybe what you're looking for
http://stackoverflow.com/questions/137182/how-to-launch-windows-regedit-with-certain-path
i would generally do something like the following for checking machines for a registry using psexec where Computers.txt would contain the list of machines i need to check
C:\psexec @computers.txt -c regcheck.bat
Regcheck.bat
@echo off
setlocal
set regpath=HKLM\
set regvalue=
set regdata=
reg query "%regpath%" /v "%regvalue%" | find /i "%regdata%"
if errorlevel 0 GOTO FOUND
Echo %Computername% Registry Not Found >> <text file>
:FOUND
Echo %Computername% Registry Found >> <text file>
Comments:
-
Hey thanks for the reply but i am looking for easy method to open regedit, which will open a location which matches my keyword value..no manual openings - appfreak 11 years ago
-
I hv found Reg query function but its not working well ....?? - appfreak 11 years ago
-
Can you explain in detail the query used so that something can be suggested on it. Also how are you testing the query. - Sujit J 11 years ago