Re: [WiX-users] Directory in Maintenance mode is not directoryinstalled to

2010-09-29 Thread Pally Sandher
Try removing the ConfigurableDirectory attribute from all but your top
level feature. I think that could be confusing Windows Installer about
where to put the sub-features. Could be wrong though but it's worth a
try.

Palbinder Sandher 
Software Deployment  IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the Virtual Environment**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer

-Original Message-
From: Younie, Bradford [mailto:bradford.you...@chasepaymentech.com] 
Sent: 28 September 2010 20:20
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Directory in Maintenance mode is not
directoryinstalled to

I'm using the WIXUI_INSTALLDIR functionality in my installer. When I
install, it lets me change the install directory from the default path
that I set to INSTALLLOCATION and it installs to that new directory
perfectly fine. However, when I enter maintenance mode (by hitting
Change in Add/Remove Programs or re-running the installer), and I try to
add a feature that I hadn't yet installed, it will always install it to
the default path, which is not where I installed the product to.

Is there anything special I need to do to make that happen?

Here's the code snippet of my installer:

?xml version='1.0'?
!--
Copyright (c) Chase Paymentech Solutions, LLC. All rights reserved.
--
Wix xmlns=http://schemas.microsoft.com/wix/2006/wi;
xmlns:iis=http://schemas.microsoft.com/wix/IIsExtension;
  ?include Common\Config.wxi?
  ?include Common\PackageData.wxi?
  Product Id='*' Name='Chase Paymentech Spectrum SDK
$(var.ProductVersion) for .Net $(var.NetVersion)' Language='1033'
 Version='$(var.ProductVersion)' Manufacturer='Chase
Paymentech' UpgradeCode='$(var.UpgradeCode)'
Package Description='Spectrum SDK for .Net $(var.NetVersion)'
Comments='Installation of the Spectrum SDK for .Net $(var.NetVersion)'
 InstallerVersion='300' Compressed='yes' Platform='x86' /

!-- To use the canned install sequence, but with a custom dialog
--
Property Id=WIXUI_INSTALLDIR Value=INSTALLLOCATION/
UIRef Id=MyWixUI_InstallDir /

Property Id=DOTNETVER Value=Net$(var.NetVersionShort) /
Property Id=FRAMEWORKROOT
  RegistrySearch Id=FrameworkRootDir Root=HKLM
Key=SOFTWARE\Microsoft\.NETFramework Type=directory
Name=InstallRoot /
/Property

PropertyRef Id=NETFRAMEWORK$(var.NetVersionShort)/
Condition Message=The .NET Framework $(var.NetVersion) must be
installed
  Installed OR NETFRAMEWORK$(var.NetVersionShort)
/Condition

Media Id='1' Cabinet='product.cab' EmbedCab='yes' /

Directory Id='TARGETDIR' Name='SourceDir'
  Directory Id='ProgramFilesFolder' Name='PFiles'
Directory Id='MyCompany' Name='My Company'
  Directory Id='INSTALLLOCATION' Name='MyProduct'

  ...

  /Directory
/Directory
  /Directory
/Directory

Feature Id='Complete' Title='My Product' Description='The complete
package.' TypicalDefault='install' Display='expand' Level='1'
  ConfigurableDirectory='INSTALLLOCATION'
  Feature Id='Core' Absent='disallow' Title='Core Software'
Description='Core Runtime Components.' Level='1'
   ...
  /Feature

  Feature Id='Samples' Title='Sample Applications'
Description='Sample Applications.'
ConfigurableDirectory=INSTALLLOCATION Level='3'
   ...
  /Feature
 /Feature
   /Product
  /Wix

Here is my InstallDir file


Wix xmlns=http://schemas.microsoft.com/wix/2006/wi;
  Fragment
UI Id=MyWixUI_InstallDir
  TextStyle Id=WixUI_Font_Normal FaceName=Tahoma Size=8 /
  TextStyle Id=WixUI_Font_Bigger FaceName=Tahoma Size=12 /
  TextStyle Id=WixUI_Font_Title FaceName=Tahoma Size=9
Bold=yes /

  Property Id=DefaultUIFont Value=WixUI_Font_Normal /
  Property Id=WixUI_Mode Value=InstallDir /

  DialogRef Id=BrowseDlg /
  DialogRef Id=DiskCostDlg /
  DialogRef Id=ErrorDlg /
  DialogRef Id=FatalError /
  DialogRef Id=FilesInUse /
  DialogRef Id=MsiRMFilesInUse /
  DialogRef Id=PrepareDlg /
  DialogRef Id=ProgressDlg /
  DialogRef Id=ResumeDlg /
  DialogRef Id=UserExit /

  Publish Dialog=BrowseDlg Control=OK Event=DoAction
Value=WixUIValidatePath Order=31/Publish
  Publish Dialog=BrowseDlg Control=OK Event=SpawnDialog
Value=InvalidDirDlg
Order=4![CDATA[WIXUI_INSTALLDIR_VALID1]]/Publish

  Publish Dialog=ExitDialog Control=Finish Event=EndDialog
Value=Return Order=9991/Publish

  Publish Dialog=WelcomeDlg Control=Next Event=NewDialog
Value=InstallDirDlg Order=11/Publish

  Publish Dialog=LicenseAgreementDlg Control=Back
Event=NewDialog Value=WelcomeDlg1/Publish
  Publish Dialog=LicenseAgreementDlg Control=Next
Event=NewDialog Value=InstallDirDlgLicenseAccepted = 1/Publish

Re: [WiX-users] Directory in Maintenance mode is not directoryinstalled to

2010-09-29 Thread Younie, Bradford
That didn't work. I'll keep plugging away, but if anyone can see a possible 
cause of the problem, please let me know.

 -Original Message-
 From: Pally Sandher [mailto:pally.sand...@iesve.com]
 Sent: Wednesday, September 29, 2010 6:08 AM
 To: General discussion for Windows Installer XML toolset.
 Subject: Re: [WiX-users] Directory in Maintenance mode is not
 directoryinstalled to
 
 Try removing the ConfigurableDirectory attribute from all but your top
 level feature. I think that could be confusing Windows Installer about
 where to put the sub-features. Could be wrong though but it's worth a
 try.
 
 Palbinder Sandher
 Software Deployment  IT Administrator
 T: +44 (0) 141 945 8500
 F: +44 (0) 141 945 8501
 
 http://www.iesve.com
 **Design, Simulate + Innovate with the Virtual Environment**
 Integrated Environmental Solutions Limited. Registered in Scotland No.
 SC151456
 Registered Office - Helix Building, West Of Scotland Science Park,
 Glasgow G20 0SP
 Email Disclaimer
 
 -Original Message-
 From: Younie, Bradford [mailto:bradford.you...@chasepaymentech.com]
 Sent: 28 September 2010 20:20
 To: wix-users@lists.sourceforge.net
 Subject: [WiX-users] Directory in Maintenance mode is not
 directoryinstalled to
 
 I'm using the WIXUI_INSTALLDIR functionality in my installer. When I
 install, it lets me change the install directory from the default path
 that I set to INSTALLLOCATION and it installs to that new directory
 perfectly fine. However, when I enter maintenance mode (by hitting
 Change in Add/Remove Programs or re-running the installer), and I try
 to
 add a feature that I hadn't yet installed, it will always install it to
 the default path, which is not where I installed the product to.
 
 Is there anything special I need to do to make that happen?
 
 Here's the code snippet of my installer:
 
 ?xml version='1.0'?
 !--
 Copyright (c) Chase Paymentech Solutions, LLC. All rights reserved.
 --
 Wix xmlns=http://schemas.microsoft.com/wix/2006/wi;
 xmlns:iis=http://schemas.microsoft.com/wix/IIsExtension;
   ?include Common\Config.wxi?
   ?include Common\PackageData.wxi?
   Product Id='*' Name='Chase Paymentech Spectrum SDK
 $(var.ProductVersion) for .Net $(var.NetVersion)' Language='1033'
  Version='$(var.ProductVersion)' Manufacturer='Chase
 Paymentech' UpgradeCode='$(var.UpgradeCode)'
 Package Description='Spectrum SDK for .Net $(var.NetVersion)'
 Comments='Installation of the Spectrum SDK for .Net $(var.NetVersion)'
  InstallerVersion='300' Compressed='yes' Platform='x86' /
 
 !-- To use the canned install sequence, but with a custom dialog
 --
 Property Id=WIXUI_INSTALLDIR Value=INSTALLLOCATION/
 UIRef Id=MyWixUI_InstallDir /
 
 Property Id=DOTNETVER Value=Net$(var.NetVersionShort) /
 Property Id=FRAMEWORKROOT
   RegistrySearch Id=FrameworkRootDir Root=HKLM
 Key=SOFTWARE\Microsoft\.NETFramework Type=directory
 Name=InstallRoot /
 /Property
 
 PropertyRef Id=NETFRAMEWORK$(var.NetVersionShort)/
 Condition Message=The .NET Framework $(var.NetVersion) must be
 installed
   Installed OR NETFRAMEWORK$(var.NetVersionShort)
 /Condition
 
 Media Id='1' Cabinet='product.cab' EmbedCab='yes' /
 
 Directory Id='TARGETDIR' Name='SourceDir'
   Directory Id='ProgramFilesFolder' Name='PFiles'
 Directory Id='MyCompany' Name='My Company'
   Directory Id='INSTALLLOCATION' Name='MyProduct'
 
   ...
 
   /Directory
 /Directory
   /Directory
 /Directory
 
 Feature Id='Complete' Title='My Product' Description='The complete
 package.' TypicalDefault='install' Display='expand' Level='1'
   ConfigurableDirectory='INSTALLLOCATION'
   Feature Id='Core' Absent='disallow' Title='Core Software'
 Description='Core Runtime Components.' Level='1'
...
   /Feature
 
   Feature Id='Samples' Title='Sample Applications'
 Description='Sample Applications.'
 ConfigurableDirectory=INSTALLLOCATION Level='3'
...
   /Feature
  /Feature
/Product
   /Wix
 
 Here is my InstallDir file
 
 
 Wix xmlns=http://schemas.microsoft.com/wix/2006/wi;
   Fragment
 UI Id=MyWixUI_InstallDir
   TextStyle Id=WixUI_Font_Normal FaceName=Tahoma Size=8 /
   TextStyle Id=WixUI_Font_Bigger FaceName=Tahoma Size=12 /
   TextStyle Id=WixUI_Font_Title FaceName=Tahoma Size=9
 Bold=yes /
 
   Property Id=DefaultUIFont Value=WixUI_Font_Normal /
   Property Id=WixUI_Mode Value=InstallDir /
 
   DialogRef Id=BrowseDlg /
   DialogRef Id=DiskCostDlg /
   DialogRef Id=ErrorDlg /
   DialogRef Id=FatalError /
   DialogRef Id=FilesInUse /
   DialogRef Id=MsiRMFilesInUse /
   DialogRef Id=PrepareDlg /
   DialogRef Id=ProgressDlg /
   DialogRef Id=ResumeDlg /
   DialogRef Id=UserExit /
 
   Publish Dialog=BrowseDlg Control=OK Event=DoAction
 Value=WixUIValidatePath Order=31/Publish
   Publish Dialog=BrowseDlg

Re: [WiX-users] Directory in Maintenance mode is not directoryinstalled to

2010-09-29 Thread Younie, Bradford
I solved it! 

I don't know if this is the most efficient or preferred way, but here's what I 
did:

I created a component that is in the main feature that is always installed. It 
creates a registry key that contains the INSTALLLOCATION value. Such as:

Component Id='SetInstallLocation' Guid='[YOUR-GUID-GOES-HERE'
  RegistryValue Id='SetInstallLocation' Root='HKLM' Key='SOFTWARE\My 
Company\My Product\[ProductCode]' 
  Name='InstallLocation' Action='write' Type='string' 
Value='[INSTALLLOCATION]' KeyPath='yes' /
/Component

Then, I created a property that reads that registry key into INSTALLLOCATION, 
like so:

Property Id=INSTALLLOCATION
   RegistrySearch Id='GetInstallLocation' Type='raw'
Root='HKLM' Key='SOFTWARE\My Company\My Product\[ProductCode]' 
Name='InstallLocation' /
/Property

INSTALLLOCATION gets set to the default value if the registry value doesn't 
exist, and gets set to the right value if it does.

Thanks for your help!



 -Original Message-
 From: Younie, Bradford
 Sent: Wednesday, September 29, 2010 8:38 AM
 To: 'General discussion for Windows Installer XML toolset.'
 Subject: Re: [WiX-users] Directory in Maintenance mode is not
 directoryinstalled to
 
 That didn't work. I'll keep plugging away, but if anyone can see a
 possible cause of the problem, please let me know.
 
  -Original Message-
  From: Pally Sandher [mailto:pally.sand...@iesve.com]
  Sent: Wednesday, September 29, 2010 6:08 AM
  To: General discussion for Windows Installer XML toolset.
  Subject: Re: [WiX-users] Directory in Maintenance mode is not
  directoryinstalled to
 
  Try removing the ConfigurableDirectory attribute from all but your
 top
  level feature. I think that could be confusing Windows Installer
 about
  where to put the sub-features. Could be wrong though but it's worth a
  try.
 
  Palbinder Sandher
  Software Deployment  IT Administrator
  T: +44 (0) 141 945 8500
  F: +44 (0) 141 945 8501
 
  http://www.iesve.com
  **Design, Simulate + Innovate with the Virtual Environment**
  Integrated Environmental Solutions Limited. Registered in Scotland
 No.
  SC151456
  Registered Office - Helix Building, West Of Scotland Science Park,
  Glasgow G20 0SP
  Email Disclaimer
 
  -Original Message-
  From: Younie, Bradford [mailto:bradford.you...@chasepaymentech.com]
  Sent: 28 September 2010 20:20
  To: wix-users@lists.sourceforge.net
  Subject: [WiX-users] Directory in Maintenance mode is not
  directoryinstalled to
 
  I'm using the WIXUI_INSTALLDIR functionality in my installer. When I
  install, it lets me change the install directory from the default
 path
  that I set to INSTALLLOCATION and it installs to that new directory
  perfectly fine. However, when I enter maintenance mode (by hitting
  Change in Add/Remove Programs or re-running the installer), and I try
  to
  add a feature that I hadn't yet installed, it will always install it
 to
  the default path, which is not where I installed the product to.
 
  Is there anything special I need to do to make that happen?
 
  Here's the code snippet of my installer:
 
  ?xml version='1.0'?
  !--
  Copyright (c) Chase Paymentech Solutions, LLC. All rights
 reserved.
  --
  Wix xmlns=http://schemas.microsoft.com/wix/2006/wi;
  xmlns:iis=http://schemas.microsoft.com/wix/IIsExtension;
?include Common\Config.wxi?
?include Common\PackageData.wxi?
Product Id='*' Name='Chase Paymentech Spectrum SDK
  $(var.ProductVersion) for .Net $(var.NetVersion)' Language='1033'
   Version='$(var.ProductVersion)' Manufacturer='Chase
  Paymentech' UpgradeCode='$(var.UpgradeCode)'
  Package Description='Spectrum SDK for .Net $(var.NetVersion)'
  Comments='Installation of the Spectrum SDK for .Net
 $(var.NetVersion)'
   InstallerVersion='300' Compressed='yes' Platform='x86'
 /
 
  !-- To use the canned install sequence, but with a custom dialog
  --
  Property Id=WIXUI_INSTALLDIR Value=INSTALLLOCATION/
  UIRef Id=MyWixUI_InstallDir /
 
  Property Id=DOTNETVER Value=Net$(var.NetVersionShort) /
  Property Id=FRAMEWORKROOT
RegistrySearch Id=FrameworkRootDir Root=HKLM
  Key=SOFTWARE\Microsoft\.NETFramework Type=directory
  Name=InstallRoot /
  /Property
 
  PropertyRef Id=NETFRAMEWORK$(var.NetVersionShort)/
  Condition Message=The .NET Framework $(var.NetVersion) must be
  installed
Installed OR NETFRAMEWORK$(var.NetVersionShort)
  /Condition
 
  Media Id='1' Cabinet='product.cab' EmbedCab='yes' /
 
  Directory Id='TARGETDIR' Name='SourceDir'
Directory Id='ProgramFilesFolder' Name='PFiles'
  Directory Id='MyCompany' Name='My Company'
Directory Id='INSTALLLOCATION' Name='MyProduct'
 
...
 
/Directory
  /Directory
/Directory
  /Directory
 
  Feature Id='Complete' Title='My Product' Description='The
 complete
  package.' TypicalDefault='install' Display='expand' Level='1