Hi,

I want to add preinstall registry checks. This is to check if the pre-requisites are already installed in the system. If not, the installation should display a message and abort.

I added the checks but they dont seem to work. Please let me know if I am missing something.

The snippet I added is :

<registryGet>
            <customErrorMessage>SQL Express installation not found.</customErrorMessage>
            <key>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft</key>
            <name>Microsoft Sql Server</name>
            <variable>sqlexpressCheck</variable>
            <ruleList>
                <registryTest>
                    <key>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft</key>
                    <logic>exists</logic>
                    <name>Microsoft Sql Server</name>
                </registryTest>
            </ruleList>
        </registryGet>
        <showInfo>
            <text>The status of .NET installation is ${dotnet_autodetected} and status of SQL Express installation is ${sqlexpressCheck}</text>
        </showInfo>
I get a message saying : unknown variable ${sqlexpressCheck}

asked 03 May '12, 09:33

Dracu's gravatar image

Dracu
18811
accept rate: 0%

I don't know if the formatting is wrong here, but are there path separators between HKEY_LOCAL_MACHINE and SOFTWARE?

(03 May '12, 12:14) DevHopeful_2012

The problem must be that the rule in the <registryGet> action does not match (the key does not exists) and so, the variable does not get defined.

I believe the key should be: <key>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Sql Server</key>

link

answered 03 May '12, 12:24

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×28
×1

Asked: 03 May '12, 09:33

Seen: 1,282 times

Last updated: 03 May '12, 12:24