Solved

Wise Windows Installer v6, test for Registry value

Posted on 2010-11-26
4
898 Views
Last Modified: 2012-05-10
I am using Wise Windows Installer v6 Professional, and need to test for the presence of a specific Registry value and abort the installation if it is not found. I am currently using the Search System option to retrieve the data from the value, which is a path that is saved to [INSTALLDIR].

I need this test becuase I need to abort the installation if a another of my installations programs has not been previously executed, which would have created and set the value that I am testing.
0
Comment
Question by:JVarco
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 34236384
ok... so what's the problem?
0
 

Author Comment

by:JVarco
ID: 34239085
If the system search suceeds, the data is retrieved from the Registry, the [INSTALLDIR] variable is updated. If the search fails, the [INSTALLDIR] variable defaults to the path set in the Product Details page. So the installation does not know the search failed, it just installs to whichever path is set in the variable.

I need to be able to determine if the Registry key or value name exists at all, or if the data in another value is the wrong data, notify the user and abort the install.

If the retrieved path data is valid, I need to be able to append additional path data to it and save it to {INSTALLDIR].

Does this help?
0
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
ID: 34270483
Then do your system search for another property, rather than INSTALLDIR; then analyze that property. You can create Launch Condition based on the property (go to setup editor /product). For instance, if you create system search that returns the result in MYPROPERTY, then specify launch conditition MYPROPERTY. If the search does not find the value, then MYPROPERTY will be empty, launch condition will fail, and installation will be aborted. Make sure that the action LaunchConditions is placed after AppSearch in the installation script, in both User Interface and Execute Immediate.

In order to append returned value to INSTALLDIR, go to the installation script, and insert action Set Property somewhere after LaunchConditions.
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 34270511
The last paragraph of the prev. comment - this should be done only in Execute Immediate, so it does not get appended twice.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question