Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if a registry value exists and run a script if it does not exist 1

Status
Not open for further replies.

lovelyjoe

Technical User
Nov 12, 2009
3
GB
Hi All,

I am completely new to this so please be gentle.

I need a script to silently check if a registry value exists. If it exists, then exit. If it does not exist then I want it to run .reg file to add the key and then exit.

All this need to be done without user input.

This needs to run at user log on. (I know how to do this bit).
 
Some more details...

I am installing an application that will modify the registry. I have in excess of 100 users and do not want to manually install this on 100 user profiles. So I need to add it to the logon script.

The plan is:
Install and configure application on one machine. (I know how to do this)
Export the registry settings - XYZ.reg (I know how to do this)
Create a script to check the registry is this value exists for consecutive users (I need help with this)
If value exist (i.e on the profile I have installed it on), then exit
Otherwise, if value does not exist, then
add the registry setting I exported - XYZ.reg, then
Exit.
All this without user interraction.

Thanks for any help.

 
Aaronjme,

Thanks for the link. It appears to do what I want.
 
Here is a link to a script I wrote to intall/upgrade an application on a terminal server.

It has many examples of program version checking and should be helpful.

thread329-1351299

Thanks

John Fuhrman
faq329-6766
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top