I am attempting to find the fastest method to find any previous installations 
and where that installation is.  I could use any random registry key, but might 
as well make dual use of the ARPINSTALLLOCATION.  The directory search is 
extremely slow on large, and full, hard drives and is scheduled before any GUI 
screens.  So the installer is running for a minute or more in some cases and 
does not look like anything has happened.  This results in double-clicking the 
MSI again with another instance attempting to run.

I have a CA scheduled to set the TARGETDIR on the condition that it is not 
already set.

Thanks,

Christopher "Bones" Snider
Software Engineer
Warfighter's Edge (WEdge)
Institute for Information Technology Applications (IITA)
United States Air Force Academy
www.wedge.hpc.mil
chris.sni...@wedge.hpc.mil
DSN 333-0654/ COMM 719-333-0654
Yahoo! IM: chris_snider 

"The object-oriented model makes it easy to build up programs by accretion. 
What this often means, in practice, is that it provides a structured way to 
write spaghetti code." 
— Paul Graham



-----Original Message-----
From: Heath Stewart [mailto:clubs...@gmail.com] 
Sent: Friday, May 08, 2009 12:24 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Upgrade Install Location Cascade Lookup

This property is intended to display the primary installation folder in
Add/Remove Programs. I'm not sure how it makes anything easier during
upgrades, as evident by the problems you're having. But it's just for
display. What exactly are you trying to use it for?

TARGETDIR is a required property, so an empty string is not supported. You
should not be setting TARGETDIR directly using AppSearch, but instead set a
different public property and then schedule a type 51 CA (see
CustomAction/@Property attribute) to set TARGETDIR condioned on whether that
AppSearch was set; otherwise, set it to something different (generally you
should always set this explicitly, or at least never install any files
directory to TARGETDIR or any child directories that are not otherwise
redirected, like ProgramFilesFolder - doing so can lead to your files being
installed to the root of the fixed drive with the most free space
available).

On Thu, May 7, 2009 at 9:04 AM, Chris Snider <chris.sni...@wedge.hpc.mil>wrote:

> Hi all,
>
>
>
> I learned today about the ARPINSTALLLOCATION property to make upgrade
> easier.  Since I did not use this in the previous version of the
> installer, but am adding as a custom task in the new version, I need to
> update my AppSearch process.
>
>
>
> I sequenced the AppSearch after FindRelatedProducts to load my
> PREVIOUSVERSIONFOUND property if the product was already installed.
> Once I have this value, I can search the uninstall points in the
> registry for the install location.  However, if the value is blank,
> which it will be for all installations until the new one, I also need to
> perform the previous method of directory searching for a main file.
>
>
>
> I am attempting to use this construct, but it does not end up filling
> the TARGETDIR property when the Registry search returns a blank value;
>
>
>
>            <Property Id="TARGETDIR">
>
>                  <RegistrySearch
>
>                        Id="FindInstallLocation"
>
>                        Root="HKLM"
>
>
> Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[PREVIOUSVERSIO
> NSINSTALLED]"
>
>                        Name="InstallLocation"
>
>                        Type="directory">
>
>                        <DirectorySearch Id="targetDirSearch"
> Depth="999">
>
>                              <FileSearch Id="targetDirSearch"
> Name="MyFileName.exe"  />
>
>                        </DirectorySearch>
>
>                  </RegistrySearch>
>
>            </Property>
>
>
>
> Ultimately, what I'd like to have happen is search the Registry first.
> If that fails, then do the much longer search through the
> DirectorySearch.  Finally, I can display the full installation wizard
> instead of the upgrade version.
>
>
>
> Is this possible?
>
>
>
> Thanks,
>
>
>
>
>
> Christopher "Bones" Snider
>
> Software Engineer
>
> Warfighter's Edge (WEdge)
>
> Institute for Information Technology Applications (IITA)
>
> United States Air Force Academy
>
> www.wedge.hpc.mil
>
> chris.sni...@wedge.hpc.mil <mailto:r...@wedge.hpc.mil>
>
> DSN 333-0654/ COMM 719-333-0654
>
> Yahoo! IM: chris_snider
>
>
>
> "The object-oriented model makes it easy to build up programs by
> accretion. What this often means, in practice, is that it provides a
> structured way to write spaghetti code."
> - Paul Graham
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>



-- 
Heath Stewart
Deployment Technologies Team, Microsoft
http://blogs.msdn.com/heaths

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to