Video Screencast Help

Trying to read the Default Registry Value to see if Key Exists

Created: 07 Apr 2014 • Updated: 08 Apr 2014 | 5 comments

I am trying to check if a Registry Key exists using the 'System Search' funciton in Wise.

The Key doesn't have any consistent Values that i can check against, except for the '(Default)' Value, so i a trying to use that as the 'Value' setting in Wise.

The way i am doing this is:

  1. First creating a Property called 'BITTEST' with a default value of '1'. Screenshot
  2. Then in the System Search area, i am doing a search for a raw value in the registry key and setting the Property i created with the Value. Since the only Value that exists under that Key is the (Default) one, in the 'Value' field, i leave it blank (based on other articles i have read online) Screenshot
  3. If i manually browse to the registry Key using Regedit, i can see that the 'Default' Value is empty Screenshot
  4. Therefore, when i run the Wise package and check the log file, i would expect that the default value for the 'BITTEST' Property would change from '1' to either '0' or blank (not sure what should happen in this case). However, when i test this, the Property doesnt change from the default and stays at '1' Screenshot

Am i doing this the wroong way? Is there are better/correct way to do what i need?

Operating Systems:
Discussion Filed Under:

Comments 5 CommentsJump to latest comment

EdT's picture

32 bit or 64 bit O/S ?

Where exactly is the key you are looking for?

32 bit or 64 bit MSI ?  

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Anthony Lisbona's picture

I am creating a 32 Bit MSI, and i want to do a test when installing on a 64-Bit OS to see if the 64-Bit version of the application has already been intsalled (because i want to avoid having both the 32-bit and 64-bit apps installed on the same machine).

To do this, i want to check if the following key exists on a 64-bit machine: HKLM\SOFTWARE\HillPDA\EstateMasterDF

When the 32-bit version of the app is installed on a 64-bit machine, it creates this Key: HKLM\SOFTWARE\\Wow6432Node\HillPDA\EstateMasterDF, so i dont want to search for that one.

EdT's picture

I suspect that the 32 bit MSI is actually checking the 32 bit area of the registry regardless of the path you put in there. You may need to use a custom action to accurately check this.

What happens if you test on a 32 bit machine?

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

wancsho's picture

As per your last post or reply, it seems this wont happen, as this is somewhat related to 32bit process and MSI might not check the hive-64bit HKLM you have asked it to look for. Why dont you use VBScript-CA and place the same at the right sequence, that will solve your purpose.

-wancsho

SK's picture

If you are using a sw deployment product, you can use an inventory scan that checks those keys, so that you can then target machines that dont have the sw installed, instead of running the msi on all machines.

Connect Etiquette: "Mark as Solution" those posts which resolve your problem, and give a thumbs up to useful comments, articles and downloads.