Hide InstallDirDlg during upgrade

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Hide InstallDirDlg during upgrade

Andy.Kruger

I'm trying to hide installation path selection dialog during an upgrade and install to the previous INSTALLDIR path stored in the registry. But it always installs to the default path.

Is it a must to show InstallDirDlg always part of upgrade??
Andy
Build&Deployment
Schneider Electric
Reply | Threaded
Open this post in threaded view
|

Re: Hide InstallDirDlg during upgrade

Pally Sandher
Condition the InstallDirDlg Events with "NOT Installed" & it will only
show during the first install, not upgrades.
See
http://neilsleightholm.blogspot.com/2008/08/customised-uis-for-wix.html
if you need help modifying the stock WiX UI sets.

As long as you use a RegistrySearch to set INSTALLDIR appropriately it
should be fine. If you want to be really slick you could use the
INSTALLDIR property to condition whether to show the InstallDirDlg (if
it's set by the RegistrySearch, don't show InstallDirDlg).

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: Andy.Kruger [mailto:[hidden email]]
Sent: 06 May 2010 15:00
To: [hidden email]
Subject: [WiX-users] Hide InstallDirDlg during upgrade



I'm trying to hide installation path selection dialog during an upgrade
and install to the previous INSTALLDIR path stored in the registry. But
it always installs to the default path.

Is it a must to show InstallDirDlg always part of upgrade??

-----
Andy
MSI Developer
Schneider Electric
--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Hide-Insta
llDirDlg-during-upgrade-tp5014310p5014310.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: Hide InstallDirDlg during upgrade

Andy.Kruger
Okie I'm clear about the first part,

This is what I'm doing to retain the old INSTALLDIR

  <Property Id="INSTALLDIR">
      <RegistrySearch Id="Locate_22InstallDir" Root="HKLM" Key="Software\ABC\productName\1.0" Name="InstallPath" Type="raw"/>
    </Property>

<CustomAction Id="SetInstallDir" Property="WIXUI_INSTALLDIR" Value="[INSTALLDIR]" Execute="immediate"/>

<InstallUISequence>
<Custom Action="SetInstallDir" After="AppSearch" ></Custom>
</InstallUISequence>

<InstallExecuteSequence>
<Custom Action="SetInstallDir" After="Launchconditions" ></Custom>
</InstallExecuteSequence>

But this doesn't work.
Upgrade always installs to the default path.
any ideas??
Andy
Build&Deployment
Schneider Electric
Reply | Threaded
Open this post in threaded view
|

Re: Hide InstallDirDlg during upgrade

Pally Sandher
Post your Directory Tree where INSTALLDIR is used (not the entire thing
just a decent snippet) & the Property element you use for
WIXUI_INSTALLDIR.

Your RegistrySearch looks fine but the Custom Action may not be
necessary (also you need a capital C in LaunchConditions).

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: Andy.Kruger [mailto:[hidden email]]
Sent: 06 May 2010 15:44
To: [hidden email]
Subject: Re: [WiX-users] Hide InstallDirDlg during upgrade


Okie I'm clear about the first part,

This is what I'm doing to retain the old INSTALLDIR

  <Property Id="INSTALLDIR">
      <RegistrySearch Id="Locate_22InstallDir" Root="HKLM"
Key="Software\ABC\productName\1.0" Name="InstallPath" Type="raw"/>
    </Property>

<CustomAction Id="SetInstallDir" Property="WIXUI_INSTALLDIR"
Value="[INSTALLDIR]" Execute="immediate"/>

<InstallUISequence>
<Custom Action="SetInstallDir" After="AppSearch" ></Custom>
</InstallUISequence>

<InstallExecuteSequence>
<Custom Action="SetInstallDir" After="Launchconditions" ></Custom>
</InstallExecuteSequence>

But this doesn't work.
Upgrade always installs to the default path.
any ideas??

-----
Andy
MSI Developer
Schneider Electric
--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Hide-Insta
llDirDlg-during-upgrade-tp5014310p5014556.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: Hide InstallDirDlg during upgrade

Andy.Kruger
 
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder" Name="PFiles">
        <Directory Id="ABC" Name="ABC">
          <Directory Id="INSTALLDIR" Name="ProductName" LongName="Product Longname">

            <Component Id="ABCstartup" Guid="{E66765C6-B75B-418e-8425-CF727E922307}">
              <Shortcut Id="startupEXE" Directory="StartupFolder" LongName=" Testname" Name="TestStat" Target="[INSTALLDIR]Display.exe" />
            </Component>
                     
.......

  </Directory>
        </Directory>
      </Directory>
      <Directory Id="StartMenuFolder" />
      <Directory Id="ProgramMenuFolder" LongName="ProgramMenuFolder" Name="ProgramM">
        <Directory Id="StartupFolder" Name="StartUp" />       
        <Directory Id="ABCDIR" Name="Companyname" />
      </Directory>
    </Directory>
.....

 <UIRef Id="WixUI_InstallDir" />
        <UIRef Id="WixUI_ErrorProgressText" /> 
        <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />

And my launch condition syntax is fine.

anything I'm missing here?
Andy
Build&Deployment
Schneider Electric
Reply | Threaded
Open this post in threaded view
|

Re: Hide InstallDirDlg during upgrade

Sebastian Brand-2
Try to remove the custom action, the WIXUI_INSTALLDIR is an indirect property that should just contain the name of the property that shall contain the path, not the path itself.

Best regards,
Sebastian Brand
www.instyler.com | blog.sebastianbrand.com




-----Original Message-----
From: Andy.Kruger [mailto:[hidden email]]
Sent: Freitag, 7. Mai 2010 04:33
To: [hidden email]
Subject: Re: [WiX-users] Hide InstallDirDlg during upgrade


 <!-- Directory layout for the product. Also specifies the mappings between
source and target directories -->
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder" Name="PFiles">
        <Directory Id="ABC" Name="ABC">
          <Directory Id="INSTALLDIR" Name="ProductName" LongName="Product
Longname">

            <Component Id="ABCstartup"
Guid="{E66765C6-B75B-418e-8425-CF727E922307}">
              <Shortcut Id="startupEXE" Directory="StartupFolder" LongName="
Testname" Name="TestStat" Target="[INSTALLDIR]Display.exe" />
            </Component>
                     
.......

  </Directory>
        </Directory>
      </Directory>
      <Directory Id="StartMenuFolder" />
      <Directory Id="ProgramMenuFolder" LongName="ProgramMenuFolder"
Name="ProgramM">
        <Directory Id="StartupFolder" Name="StartUp" />      
        <Directory Id="ABCDIR" Name="Companyname" />
      </Directory>
    </Directory>
.....

 <UIRef Id="WixUI_InstallDir" />
        <UIRef Id="WixUI_ErrorProgressText" />
        <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />

And my launch condition syntax is fine.

anything I'm missing here?


-----
Andy
MSI Developer
Schneider Electric
--
View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Hide-InstallDirDlg-during-upgrade-tp5014310p5017562.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------

_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: Hide InstallDirDlg during upgrade

Andy.Kruger
Okie I removed the custom actions. Now after I launch the MSI, when the UI tries to set the WIXUI_INSTALLDIR path with indirect="yes", it says specified path is empty I have also tried hard cording the property value say C:\Orange Please help
Andy
Build&Deployment
Schneider Electric
Reply | Threaded
Open this post in threaded view
|

Re: Hide InstallDirDlg during upgrade

Andy.Kruger
I got it working. I was using a wrong path in the RegistrySearch =)
Andy
Build&Deployment
Schneider Electric
Reply | Threaded
Open this post in threaded view
|

Re: Hide InstallDirDlg during upgrade

haiganeshkumar
This post has NOT been accepted by the mailing list yet.
How did you skipped the directory selection dialog sequence.

I am able to get the right path from registry and i want to skip the path selection.

can you give the code snippet of that part?