Jump to content
  • Advertisement
Sign in to follow this  
softengg

registry check using .BAT file

This topic is 3772 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!