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
Solved

Wise Windows Installer v6, test for Registry value

Posted on 2010-11-26
4
895 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
  • 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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.
If you don't know how to downgrade, my instructions below should be helpful.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

809 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