Sign in to follow this  
softengg

registry check using .BAT file

Recommended Posts

softengg    100
Hi, I want to check a value in the registry using a batch file...(It is actually checking whether a software is installed or not). If that value exists, i want to quit the batch file. If that value not found, it will execute another .exe from a folder. How this is possible using a batch file........please help me....... Thanks in advance....

Share this post


Link to post
Share on other sites
Evil Steve    2017
Something like this seems to work:

@echo off
reg query HKCU\Software\Winamp
if errorlevel 1 goto not_exist
goto exit

:not_exist
program_name_to_run

:exit



Where "HKCU\Software\Winamp\" is obviously the key to query, and program_name_to_run is the name of the program to run if the key doesn't exist.

Although, why do you want to do this from a batch file rather than the exe itself?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this