Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-28 Thread Blair
http://legalizeadulthood.wordpress.com/2009/10/23/ui-custom-action-guideline
s/

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 27, 2009 2:51 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Thanks a lot, Blair!


It works now. It seems the "Order" attribute is important. I also realized
that you added this line:



Can you tell me where Richard's blog is?

Thanks again. You saved our project.




From: Blair 
To: General discussion for Windows Installer XML toolset.

Sent: Tuesday, October 27, 2009 2:14:10 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

In Richard's blog post, he details the issue with Windows Installer not
recognizing that WIXUI_INSTALLDIR_VALID has had a value set/changed by the
custom action. You don't get anything happening because WI still thinks
WIXUI_INSTALLDIR_VALID != 1.

1
1
1






InstallDirNextDialog

1
1


-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 27, 2009 1:37 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

I'm having trouble with this "conditionally show a dialog based on a
property".


Now I can conditionally show the dialog. But when I click on the Next or
Back button, there is nothing happened. I'll have to click the button again
to go forward or back. 
I took the code from WixUI_InstallDir.wxs and renamed it as
MyWixUI_InstallDir.wxs and used it in my project. I changed the code by
using your example, here is my code:
1
1
1





InstallDirNextDialog

1
1


Many thanks.
I'm looking forward your kindly help.




From: little.forest 
To: General discussion for Windows Installer XML toolset.

Sent: Tuesday, October 27, 2009 12:41:24 AM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Hi Richard,


You're right. I did got some weird error by not using your approach for
button control event when I went back and forth among those dialog pages. 

So I tried your approach, the errors were gone. However, I'm getting some
other new weird issues: every time I've to click the "Next" button or "Back"
button 2 times to go next or go back, very strange. But after this two times
of clicking, I can go back and forth without problem. What's wrong?

You know, I took the code from WixUI_InstallDir.wxs and renamed it as
MyWixUI_InstallDir.wxs and used it in my project. I changed the code by
using your example, here is my code:
1
1
1





InstallDirNextDialog

1
1


As you can see, I changed the "NewDialog"(Next button) from one line to be 4
lines of code. Is it correct? But I don't know how come I have to click the
next button 2 times to go to the next page? Do I have to write all of those
4 conditions(Not A and Not B, A and B, Not A and B, A and Not B) as 4
publish elements? In my case, I only care about two cases(A and B, A and Not
B), is it okay?

Thanks.
/Brian





From: Richard 
To: wix-users@lists.sourceforge.net
Sent: Wednesday, October 21, 2009 9:01:14 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page


In article <664797.8163...@web59804.mail.ac4.yahoo.com>,
"little.forest"   writes:

> "Additionally, you can't have more than one NewDialog control event
> on a button, even if the conditions are mutually exclusive." - this is
> interesting. Ca n you tell me where this fact comes from?

Found it.

Its in the docs for the ControlEvent table.

<http://msdn.microsoft.com/en-us/library/aa368037(VS.85).aspx>

"The exception is that each control can publish a most one
NewDialog or one SpawnDialog event."
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-27 Thread little.forest
Thanks a lot, Blair!


It works now. It seems the "Order" attribute is important. I also realized that 
you added this line:



Can you tell me where Richard's blog is?

Thanks again. You saved our project.




From: Blair 
To: General discussion for Windows Installer XML toolset. 

Sent: Tuesday, October 27, 2009 2:14:10 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page

In Richard's blog post, he details the issue with Windows Installer not
recognizing that WIXUI_INSTALLDIR_VALID has had a value set/changed by the
custom action. You don't get anything happening because WI still thinks
WIXUI_INSTALLDIR_VALID != 1.

1
1
1






InstallDirNextDialog

1
1


-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 27, 2009 1:37 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

I'm having trouble with this "conditionally show a dialog based on a
property".


Now I can conditionally show the dialog. But when I click on the Next or
Back button, there is nothing happened. I'll have to click the button again
to go forward or back. 
I took the code from WixUI_InstallDir.wxs and renamed it as
MyWixUI_InstallDir.wxs and used it in my project. I changed the code by
using your example, here is my code:
1
1
1





InstallDirNextDialog

1
1


Many thanks.
I'm looking forward your kindly help.




From: little.forest 
To: General discussion for Windows Installer XML toolset.

Sent: Tuesday, October 27, 2009 12:41:24 AM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Hi Richard,


You're right. I did got some weird error by not using your approach for
button control event when I went back and forth among those dialog pages. 

So I tried your approach, the errors were gone. However, I'm getting some
other new weird issues: every time I've to click the "Next" button or "Back"
button 2 times to go next or go back, very strange. But after this two times
of clicking, I can go back and forth without problem. What's wrong?

You know, I took the code from WixUI_InstallDir.wxs and renamed it as
MyWixUI_InstallDir.wxs and used it in my project. I changed the code by
using your example, here is my code:
1
1
1





InstallDirNextDialog

1
1


As you can see, I changed the "NewDialog"(Next button) from one line to be 4
lines of code. Is it correct? But I don't know how come I have to click the
next button 2 times to go to the next page? Do I have to write all of those
4 conditions(Not A and Not B, A and B, Not A and B, A and Not B) as 4
publish elements? In my case, I only care about two cases(A and B, A and Not
B), is it okay?

Thanks.
/Brian





From: Richard 
To: wix-users@lists.sourceforge.net
Sent: Wednesday, October 21, 2009 9:01:14 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page


In article <664797.8163...@web59804.mail.ac4.yahoo.com>,
"little.forest"   writes:

> "Additionally, you can't have more than one NewDialog control event
> on a button, even if the conditions are mutually exclusive." - this is
> interesting. Ca n you tell me where this fact comes from?

Found it.

Its in the docs for the ControlEvent table.

<http://msdn.microsoft.com/en-us/library/aa368037(VS.85).aspx>

"The exception is that each control can publish a most one
NewDialog or one SpawnDialog event."
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __
Connect with friends from any web browser - no download required. Try the
new Yahoo! Canada Messenger for the Web BETA at
http://ca.messenger.yahoo.com/webmessengerpromo.php

--
Come build with us! The BlackBerry(R) Developer Conference

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-27 Thread Blair
In Richard's blog post, he details the issue with Windows Installer not
recognizing that WIXUI_INSTALLDIR_VALID has had a value set/changed by the
custom action. You don't get anything happening because WI still thinks
WIXUI_INSTALLDIR_VALID != 1.

1
1
1






InstallDirNextDialog

1
1


-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 27, 2009 1:37 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

I'm having trouble with this "conditionally show a dialog based on a
property".


Now I can conditionally show the dialog. But when I click on the Next or
Back button, there is nothing happened. I'll have to click the button again
to go forward or back. 
I took the code from WixUI_InstallDir.wxs and renamed it as
MyWixUI_InstallDir.wxs and used it in my project. I changed the code by
using your example, here is my code:
1
1
1





InstallDirNextDialog

1
1


Many thanks.
I'm looking forward your kindly help.




From: little.forest 
To: General discussion for Windows Installer XML toolset.

Sent: Tuesday, October 27, 2009 12:41:24 AM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Hi Richard,


You're right. I did got some weird error by not using your approach for
button control event when I went back and forth among those dialog pages. 

So I tried your approach, the errors were gone. However, I'm getting some
other new weird issues: every time I've to click the "Next" button or "Back"
button 2 times to go next or go back, very strange. But after this two times
of clicking, I can go back and forth without problem. What's wrong?

You know, I took the code from WixUI_InstallDir.wxs and renamed it as
MyWixUI_InstallDir.wxs and used it in my project. I changed the code by
using your example, here is my code:
1
1
1





InstallDirNextDialog

1
1


As you can see, I changed the "NewDialog"(Next button) from one line to be 4
lines of code. Is it correct? But I don't know how come I have to click the
next button 2 times to go to the next page? Do I have to write all of those
4 conditions(Not A and Not B, A and B, Not A and B, A and Not B) as 4
publish elements? In my case, I only care about two cases(A and B, A and Not
B), is it okay?

Thanks.
/Brian





From: Richard 
To: wix-users@lists.sourceforge.net
Sent: Wednesday, October 21, 2009 9:01:14 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page


In article <664797.8163...@web59804.mail.ac4.yahoo.com>,
"little.forest"   writes:

> "Additionally, you can't have more than one NewDialog control event
> on a button, even if the conditions are mutually exclusive." - this is
> interesting. Ca n you tell me where this fact comes from?

Found it.

Its in the docs for the ControlEvent table.

<http://msdn.microsoft.com/en-us/library/aa368037(VS.85).aspx>

"The exception is that each control can publish a most one
NewDialog or one SpawnDialog event."
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __
Connect with friends from any web browser - no download required. Try the
new Yahoo! Canada Messenger for the Web BETA at
http://ca.messenger.yahoo.com/webmessengerpromo.php

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  _

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-27 Thread little.forest
I'm having trouble with this "conditionally show a dialog based on a property".


Now I can conditionally show the dialog. But when I click on the Next or Back 
button, there is nothing happened. I'll have to click the button again to go 
forward or back. 
I took the code from WixUI_InstallDir.wxs and renamed it as 
MyWixUI_InstallDir.wxs and used it in my project. I changed the code by using 
your example, here is my code:
1
1
1





InstallDirNextDialog

1
1


Many thanks.
I'm looking forward your kindly help.




From: little.forest 
To: General discussion for Windows Installer XML toolset. 

Sent: Tuesday, October 27, 2009 12:41:24 AM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page

Hi Richard,


You're right. I did got some weird error by not using your approach for button 
control event when I went back and forth among those dialog pages. 

So I tried your approach, the errors were gone. However, I'm getting some other 
new weird issues: every time I've to click the "Next" button or "Back" button 2 
times to go next or go back, very strange. But after this two times of 
clicking, I can go back and forth without problem. What's wrong?

You know, I took the code from WixUI_InstallDir.wxs and renamed it as 
MyWixUI_InstallDir.wxs and used it in my project. I changed the code by using 
your example, here is my code:
1
1
1





InstallDirNextDialog

1
1


As you can see, I changed the "NewDialog"(Next button) from one line to be 4 
lines of code. Is it correct? But I don't know how come I have to click the 
next button 2 times to go to the next page? Do I have to write all of those 4 
conditions(Not A and Not B, A and B, Not A and B, A and Not B) as 4 publish 
elements? In my case, I only care about two cases(A and B, A and Not B), is it 
okay?

Thanks.
/Brian





From: Richard 
To: wix-users@lists.sourceforge.net
Sent: Wednesday, October 21, 2009 9:01:14 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page


In article <664797.8163...@web59804.mail.ac4.yahoo.com>,
"little.forest"   writes:

> "Additionally, you can't have more than one NewDialog control event
> on a button, even if the conditions are mutually exclusive." - this is
> interesting. Ca n you tell me where this fact comes from?

Found it.

Its in the docs for the ControlEvent table.

<http://msdn.microsoft.com/en-us/library/aa368037(VS.85).aspx>

"The exception is that each control can publish a most one
NewDialog or one SpawnDialog event."
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __
Connect with friends from any web browser - no download required. Try the new 
Yahoo! Canada Messenger for the Web BETA at 
http://ca.messenger.yahoo.com/webmessengerpromo.php
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  
Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconf

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-27 Thread little.forest
Hi Richard,


You're right. I did got some weird error by not using your approach for button 
control event when I went back and forth among those dialog pages. 

So I tried your approach, the errors were gone. However, I'm getting some other 
new weird issues: every time I've to click the "Next" button or "Back" button 2 
times to go next or go back, very strange. But after this two times of 
clicking, I can go back and forth without problem. What's wrong?

You know, I took the code from WixUI_InstallDir.wxs and renamed it as 
MyWixUI_InstallDir.wxs and used it in my project. I changed the code by using 
your example, here is my code:
1
1
1





InstallDirNextDialog

1
1


As you can see, I changed the "NewDialog"(Next button) from one line to be 4 
lines of code. Is it correct? But I don't know how come I have to click the 
next button 2 times to go to the next page? Do I have to write all of those 4 
conditions(Not A and Not B, A and B, Not A and B, A and Not B) as 4 publish 
elements? In my case, I only care about two cases(A and B, A and Not B), is it 
okay?

Thanks.
/Brian





From: Richard 
To: wix-users@lists.sourceforge.net
Sent: Wednesday, October 21, 2009 9:01:14 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page


In article <664797.8163...@web59804.mail.ac4.yahoo.com>,
"little.forest"   writes:

> "Additionally, you can't have more than one NewDialog control event
> on a button, even if the conditions are mutually exclusive." - this is
> interesting. Ca n you tell me where this fact comes from?

Found it.

Its in the docs for the ControlEvent table.

<http://msdn.microsoft.com/en-us/library/aa368037(VS.85).aspx>

"The exception is that each control can publish a most one
NewDialog or one SpawnDialog event."
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __
Connect with friends from any web browser - no download required. Try the new 
Yahoo! Canada Messenger for the Web BETA at 
http://ca.messenger.yahoo.com/webmessengerpromo.php
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-23 Thread little.forest
Aha, you're right. I didn't schedule the CA in InstallUISequence. 

Sorry.
After add it in InstallUISequence, it seems working.

Thanks and have a good weekend!
/Brian




From: Blair 
To: General discussion for Windows Installer XML toolset. 

Sent: Friday, October 23, 2009 5:34:05 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page

Did you try scheduling the custom action in both InstallUISequence as well
as InstallExecuteSequence?

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Friday, October 23, 2009 5:01 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Hi Blair,


As what I mentioned, since our old 2.0 product's uninstaller deletes
settings but not remove the setting folder, there is a chance that the
setting folder is empty. So we can't detect folder but have to detect *.* by
writing a DLL. Anyways, I wrote a small dll and integrated it in the
installer. But from the log, the dll is never run. Could you please point
out the problem? Here is the Wix code:
 







In the dll, for testing purpose, I just set the property
NEED_MIGRATE_SETTING as 1 for now. But I checked the log, the dll itself is
never run.

Thanks.
/Brian.




From: Blair 
To: General discussion for Windows Installer XML toolset.

Sent: Tuesday, October 20, 2009 7:27:41 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Can you live with the existence (or lack thereof) of those two settings
directories? Does it matter if they are empty or not? I would assume that if
the 3.0 one didn't exist but the 2.0 one does, you have a better than even
chance you have data to upgrade. Anytime you can use a built-in custom
action instead of supplying your own, you tend to improve reliability.
However, you can add as many custom actions (and custom action binaries)
into your installation package as you wish, up to the size limit of the MSI
file (not that you would ever want an MSI file that big).

I assume your "AppData" property is the APPDATA environment variable. If
not, change my "[%AppData]\" and ensure that the property is defined before
the AppSearch action. If it is defined in your Directory table, those
properties are not populated until CostFinalize. Note that if Windows
Installer defines a path, it always includes the trailing backslash ('\').
If you supply paths via your own custom action, you should do the same.


  


  






  SETTINGS_20_EXIST
AND NOT SETTINGS_30_EXIST


If you can't use mere absence/presence of the folders for your detection
routine, don't use any of my code (except for the secure property
declaration of NEED_UPDRADE_SETTING) and instead set NEED_UPDRADE_SETTING in
your DLL action. Call your action with no condition in your
InstallUISequence where I call SetNeedUpgradeSetting.

Now, on to the InstallExecuteSequence. I am assuming that your confirmation
dialog (MyDlg) has a check box that is associated with the property
REALLY_NEED_UPGRADE_SETTING (which sets it to the value "1" if the box is
checked). What is your default? Also, if the UI is bypassed, what should the
assumed value be? I hope it is the same (checked by default, assumed checked
if never shown). That makes your logic easier.

You will need to make sure your REALLY_NEED_UPGRADE_SETTING property is also
secure. I will assume it is also checked by default. If you are using your
DLL instead of simple folder detection you should also set it to
Execute="firstSequence".




  SETTINGS_20_EXIST
AND NOT SETTINGS_30_EXIST
  NOT Installed
AND REALLY_NEED_UPGRADE_SETTING AND NEED_UPGRADE_SETTING


If your default action and your opt-in/-out experience are different, you
will have a bit more complicated logic story, but I will leave that unless
you need help with that.

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 20, 2009 5:40 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Hi Blair,


Thank you so much. I really appreciate your detailed reply. The code example
you provided is clear and neat.

Basically, we'd like to do these:
1. Detect if we need to do a setting migration: look into
"[AppData]\MyCompany\MyApp 3.0" folder and "[AppData]\MyCompany\MyApp 2.0"
folder. If there is nothing in 3.0 folder(it means the user never install
the 3.0 version) and there is something in 2.0 folder(it means the user ever
used 2.0 version), then we should do setting upgrade. We'll need to set a
property.
2. If the property is set, then we'll need to do setting upgrade.

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-23 Thread Blair
Did you try scheduling the custom action in both InstallUISequence as well
as InstallExecuteSequence?

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Friday, October 23, 2009 5:01 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Hi Blair,


As what I mentioned, since our old 2.0 product's uninstaller deletes
settings but not remove the setting folder, there is a chance that the
setting folder is empty. So we can't detect folder but have to detect *.* by
writing a DLL. Anyways, I wrote a small dll and integrated it in the
installer. But from the log, the dll is never run. Could you please point
out the problem? Here is the Wix code:
 







In the dll, for testing purpose, I just set the property
NEED_MIGRATE_SETTING as 1 for now. But I checked the log, the dll itself is
never run.

Thanks.
/Brian.




From: Blair 
To: General discussion for Windows Installer XML toolset.

Sent: Tuesday, October 20, 2009 7:27:41 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Can you live with the existence (or lack thereof) of those two settings
directories? Does it matter if they are empty or not? I would assume that if
the 3.0 one didn't exist but the 2.0 one does, you have a better than even
chance you have data to upgrade. Anytime you can use a built-in custom
action instead of supplying your own, you tend to improve reliability.
However, you can add as many custom actions (and custom action binaries)
into your installation package as you wish, up to the size limit of the MSI
file (not that you would ever want an MSI file that big).

I assume your "AppData" property is the APPDATA environment variable. If
not, change my "[%AppData]\" and ensure that the property is defined before
the AppSearch action. If it is defined in your Directory table, those
properties are not populated until CostFinalize. Note that if Windows
Installer defines a path, it always includes the trailing backslash ('\').
If you supply paths via your own custom action, you should do the same.


  


  






  SETTINGS_20_EXIST
AND NOT SETTINGS_30_EXIST


If you can't use mere absence/presence of the folders for your detection
routine, don't use any of my code (except for the secure property
declaration of NEED_UPDRADE_SETTING) and instead set NEED_UPDRADE_SETTING in
your DLL action. Call your action with no condition in your
InstallUISequence where I call SetNeedUpgradeSetting.

Now, on to the InstallExecuteSequence. I am assuming that your confirmation
dialog (MyDlg) has a check box that is associated with the property
REALLY_NEED_UPGRADE_SETTING (which sets it to the value "1" if the box is
checked). What is your default? Also, if the UI is bypassed, what should the
assumed value be? I hope it is the same (checked by default, assumed checked
if never shown). That makes your logic easier.

You will need to make sure your REALLY_NEED_UPGRADE_SETTING property is also
secure. I will assume it is also checked by default. If you are using your
DLL instead of simple folder detection you should also set it to
Execute="firstSequence".




  SETTINGS_20_EXIST
AND NOT SETTINGS_30_EXIST
  NOT Installed
AND REALLY_NEED_UPGRADE_SETTING AND NEED_UPGRADE_SETTING


If your default action and your opt-in/-out experience are different, you
will have a bit more complicated logic story, but I will leave that unless
you need help with that.

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 20, 2009 5:40 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Hi Blair,


Thank you so much. I really appreciate your detailed reply. The code example
you provided is clear and neat.

Basically, we'd like to do these:
1. Detect if we need to do a setting migration: look into
"[AppData]\MyCompany\MyApp 3.0" folder and "[AppData]\MyCompany\MyApp 2.0"
folder. If there is nothing in 3.0 folder(it means the user never install
the 3.0 version) and there is something in 2.0 folder(it means the user ever
used 2.0 version), then we should do setting upgrade. We'll need to set a
property.
2. If the property is set, then we'll need to do setting upgrade. We'll show
a new page after InstallDirDlg and before VerifyReadyDlg. In this page,
we'll say "We have detected you have 2.0 settings. Do you want to upgrade
these settings to 3.0?", and provide a checkbox. 
If the property is not set, we do not show this setting migration page.
3. After installation but before it's finished, based on the property, we'll
either run a small program to migrate se

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-23 Thread little.forest
Hi Blair,


As what I mentioned, since our old 2.0 product's uninstaller deletes settings 
but not remove the setting folder, there is a chance that the setting folder is 
empty. So we can't detect folder but have to detect *.* by writing a DLL. 
Anyways, I wrote a small dll and integrated it in the installer. But from the 
log, the dll is never run. Could you please point out the problem? Here is the 
Wix code:
 







In the dll, for testing purpose, I just set the property NEED_MIGRATE_SETTING 
as 1 for now. But I checked the log, the dll itself is never run.

Thanks.
/Brian.




From: Blair 
To: General discussion for Windows Installer XML toolset. 

Sent: Tuesday, October 20, 2009 7:27:41 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page

Can you live with the existence (or lack thereof) of those two settings
directories? Does it matter if they are empty or not? I would assume that if
the 3.0 one didn't exist but the 2.0 one does, you have a better than even
chance you have data to upgrade. Anytime you can use a built-in custom
action instead of supplying your own, you tend to improve reliability.
However, you can add as many custom actions (and custom action binaries)
into your installation package as you wish, up to the size limit of the MSI
file (not that you would ever want an MSI file that big).

I assume your "AppData" property is the APPDATA environment variable. If
not, change my "[%AppData]\" and ensure that the property is defined before
the AppSearch action. If it is defined in your Directory table, those
properties are not populated until CostFinalize. Note that if Windows
Installer defines a path, it always includes the trailing backslash ('\').
If you supply paths via your own custom action, you should do the same.


  


  






  SETTINGS_20_EXIST
AND NOT SETTINGS_30_EXIST


If you can't use mere absence/presence of the folders for your detection
routine, don't use any of my code (except for the secure property
declaration of NEED_UPDRADE_SETTING) and instead set NEED_UPDRADE_SETTING in
your DLL action. Call your action with no condition in your
InstallUISequence where I call SetNeedUpgradeSetting.

Now, on to the InstallExecuteSequence. I am assuming that your confirmation
dialog (MyDlg) has a check box that is associated with the property
REALLY_NEED_UPGRADE_SETTING (which sets it to the value "1" if the box is
checked). What is your default? Also, if the UI is bypassed, what should the
assumed value be? I hope it is the same (checked by default, assumed checked
if never shown). That makes your logic easier.

You will need to make sure your REALLY_NEED_UPGRADE_SETTING property is also
secure. I will assume it is also checked by default. If you are using your
DLL instead of simple folder detection you should also set it to
Execute="firstSequence".




  SETTINGS_20_EXIST
AND NOT SETTINGS_30_EXIST
  NOT Installed
AND REALLY_NEED_UPGRADE_SETTING AND NEED_UPGRADE_SETTING


If your default action and your opt-in/-out experience are different, you
will have a bit more complicated logic story, but I will leave that unless
you need help with that.

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 20, 2009 5:40 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Hi Blair,


Thank you so much. I really appreciate your detailed reply. The code example
you provided is clear and neat.

Basically, we'd like to do these:
1. Detect if we need to do a setting migration: look into
"[AppData]\MyCompany\MyApp 3.0" folder and "[AppData]\MyCompany\MyApp 2.0"
folder. If there is nothing in 3.0 folder(it means the user never install
the 3.0 version) and there is something in 2.0 folder(it means the user ever
used 2.0 version), then we should do setting upgrade. We'll need to set a
property.
2. If the property is set, then we'll need to do setting upgrade. We'll show
a new page after InstallDirDlg and before VerifyReadyDlg. In this page,
we'll say "We have detected you have 2.0 settings. Do you want to upgrade
these settings to 3.0?", and provide a checkbox. 
If the property is not set, we do not show this setting migration page.
3. After installation but before it's finished, based on the property, we'll
either run a small program to migrate settings, or do nothing.

So from these description, hopefully you've got our logic: we need to
"detect->set property->show message on GUI->do setting migration".

Our setting folder structure is a bit of complicated. The setting folder may
contain files(like settings.xml, or ui.xml), or may contain user's
login(like "james" or "linda&quo

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-22 Thread little.forest
Wow, you found it. Many thanks Richard.


"The annoying thing is that it will *appear* to work until it doesn't 
and there's no unifying principle as to when it will work and when it 
won't.  Its a little more work to do things through the property, but 
it is guaranteed to work every single time that way.  " - yes, it's really 
annoying.




From: Richard 
To: wix-users@lists.sourceforge.net
Sent: Wednesday, October 21, 2009 9:01:14 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page


In article <664797.8163...@web59804.mail.ac4.yahoo.com>,
"little.forest"   writes:

> "Additionally, you can't have more than one NewDialog control event
> on a button, even if the conditions are mutually exclusive." - this is
> interesting. Ca n you tell me where this fact comes from?

Found it.

Its in the docs for the ControlEvent table.

<http://msdn.microsoft.com/en-us/library/aa368037(VS.85).aspx>

"The exception is that each control can publish a most one
NewDialog or one SpawnDialog event."
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  
Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-21 Thread Richard

In article <664797.8163...@web59804.mail.ac4.yahoo.com>,
"little.forest"   writes:

> "Additionally, you can't have more than one NewDialog control event
> on a button, even if the conditions are mutually exclusive." - this is
> interesting. Ca n you tell me where this fact comes from?

Found it.

Its in the docs for the ControlEvent table.



"The exception is that each control can publish a most one
NewDialog or one SpawnDialog event."
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 

  Legalize Adulthood! 

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-21 Thread Richard

In article <664797.8163...@web59804.mail.ac4.yahoo.com>,
"little.forest"   writes:

> "Additionally, you can't have more than one NewDialog control event
> on a button, even if the conditions are mutually exclusive."

At one point I found this buried in the MSI documentation; I don't
recall where it was offhand, but we had a series of dialogs with
complex conditional transitions between them.  Occasionally, buttons
would just cease to work and the dialog sequence was hung.
Eventually we tracked it back to this constraint.  Once we went the
route of using a property to specify the target dialog and changed
everything to only a single NewDialog event per control, then
everything worked properly again.

The annoying thing is that it will *appear* to work until it doesn't
and there's no unifying principle as to when it will work and when it
won't.  Its a little more work to do things through the property, but
it is guaranteed to work every single time that way.
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 

  Legalize Adulthood! 

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-21 Thread little.forest
Hi Richard,


Thanks for your reply.

"Additionally, you can't have more than one NewDialog control event on a 
button, even if the conditions are mutually exclusive." - this is interesting. 
Can you tell me where this fact comes from? I googled, it's not mentioned in 
Wix or MSI. Also, I found this post "Customized UI's for 
WiX"(http://neilsleightholm.blogspot.com/2008/08/customised-uis-for-wix.html ). 
There is code like this - you see Niel Sleightholm does have two NewDialog 
control event for one button:
  WixUI_InstallMode = "Change"
WixUI_InstallMode = "InstallCustom"Thanks.
/Brian




From: Richard 
To: wix-users@lists.sourceforge.net
Sent: Tuesday, October 20, 2009 9:44:55 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page


In article <414331.22649...@web59815.mail.ac4.yahoo.com>,
"little.forest"   writes:

> Hmm, can you tell me how to use AppSearch to "locate folders"?

Use  with a nested 

> "Use type 19 CA to set properties"  [...]

As pointed out by others, I was wrong in saying type 19, its type 51
(set property) as already mentioned.

Not every CA requires a DLL or EXE -- only DLL/EXE CAs need them.  WiX
exposes a set property CA with .

You can reuse your upgrade_settings.exe program, but you may find that
its more trouble than its worth because this means creating a custom
action in code and interacting with this external utility to set
properties in the MSI.  You might find it easier to have this upgrade
settings utility invoke msiexec on your MSI with command-line
arguments to set properties for the installation, essentially using
the upgrade settings utility as a bootstrapper.

> And the last question, "to use condition on events to determine dialogs shown
in a wizard", is it some like this?
> NOT Installed and and REALLY_NEED_UPGRADE_SETTING

Yes, but be careful about conditions and the fact that you need to
populate those conditions on the Next button *and* the back button
*and* you need to make sure that the conditions are setup properly so
that dialog transitions are managed properly.  Additionally, you can't
have more than one NewDialog control event on a button, even if the
conditions are mutually exclusive.  You'll get weird behavior if you
try this.

The way to manage complex dialog transitions is to use a property to
hold the name of the dialog you wish to display and conditionally set
this property to the right value.  Then transition to the dialog named
by the property:

For instance, suppose the transition table for the Back button on
MyDlg looks like this:

Target Dialog   Condition
Dialog1 NOT A AND NOT B
Dialog2 A AND NOT B
Dialog3 A AND B
Dialog4 NOT A AND B

The following  events show how to implement this logic with a
single NewDialog event on the Back button of MyDlg:



A AND NOT B
A AND B
NOT A AND B


Note that the first set property event has no condition, guaranteeing
that the transition is always well defined.  You can also null out the
property and then take the NewDialog transition only when the property
is non-empty:



NOT A AND NOT B
A AND NOT B
A AND B
NOT A AND B
BackDialog

-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-21 Thread little.forest
Hi Blair,


Thank you for your kindly reply. I really appreciate it.

Yes, I think checking the folder presence instead of checking the files would 
work for us. I totally agree to use a built-in custom action instead of 
supplying my own for the reliability. The reason we wanted to check files(*.*) 
instead of folder is:
In our 2.0 installer(made by InstallShield), there is a way the end user can 
choose to "delete local settings" upon uninstallation. Actually, in 3.0, I was 
asked to do so as well. But up to now, "How to add a dialog box when uninstall" 
is still a pending issue for 
me(http://n2.nabble.com/How-to-add-a-dialog-box-when-uninstall-td3515946i20.html#a3569972).
 Anyways, we can live with it for now. But in 2.0, the setting remover just 
deletes the settings, it doesn't delete the folder. So if the end user ever 
uninstalled the 2.0 application once and she happened to choose "delete 
setting" option, chances are she'll end up with having all setting gone but 
left an empty 2.0 folder behind. By checking the folder, we'll get the result 
of "need to migrate setting", but actually there is no setting to migrate. 
Well, I agree there is nothing to lose even this happens. But still, I'll have 
a hard time to convince our QA and PM. Anyways, the bottom line is I could still
 do the DLL solution if they insist to check *.*. 

Yes, there is a checkbox in MyDlg. The default value for that is 1(to migrate 
setting for the user). And yes, if the UI is bypassed, the value will be 1 as 
well.

By the way, your code example is beautiful. I learnt quite a few things from 
your reply, such as the 'secure' attribute in property element, 
InstallExecuteSequence/InstallUIExecuteSequence, and the way you set the 
NEED_UPGRADE_SETTING property. I'll give it a try.

Thanks again!
/Brian




From: Blair 
To: General discussion for Windows Installer XML toolset. 

Sent: Tuesday, October 20, 2009 7:27:41 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page

Can you live with the existence (or lack thereof) of those two settings
directories? Does it matter if they are empty or not? I would assume that if
the 3.0 one didn't exist but the 2.0 one does, you have a better than even
chance you have data to upgrade. Anytime you can use a built-in custom
action instead of supplying your own, you tend to improve reliability.
However, you can add as many custom actions (and custom action binaries)
into your installation package as you wish, up to the size limit of the MSI
file (not that you would ever want an MSI file that big).

I assume your "AppData" property is the APPDATA environment variable. If
not, change my "[%AppData]\" and ensure that the property is defined before
the AppSearch action. If it is defined in your Directory table, those
properties are not populated until CostFinalize. Note that if Windows
Installer defines a path, it always includes the trailing backslash ('\').
If you supply paths via your own custom action, you should do the same.


  


  






  SETTINGS_20_EXIST
AND NOT SETTINGS_30_EXIST


If you can't use mere absence/presence of the folders for your detection
routine, don't use any of my code (except for the secure property
declaration of NEED_UPDRADE_SETTING) and instead set NEED_UPDRADE_SETTING in
your DLL action. Call your action with no condition in your
InstallUISequence where I call SetNeedUpgradeSetting.

Now, on to the InstallExecuteSequence. I am assuming that your confirmation
dialog (MyDlg) has a check box that is associated with the property
REALLY_NEED_UPGRADE_SETTING (which sets it to the value "1" if the box is
checked). What is your default? Also, if the UI is bypassed, what should the
assumed value be? I hope it is the same (checked by default, assumed checked
if never shown). That makes your logic easier.

You will need to make sure your REALLY_NEED_UPGRADE_SETTING property is also
secure. I will assume it is also checked by default. If you are using your
DLL instead of simple folder detection you should also set it to
Execute="firstSequence".




  SETTINGS_20_EXIST
AND NOT SETTINGS_30_EXIST
  NOT Installed
AND REALLY_NEED_UPGRADE_SETTING AND NEED_UPGRADE_SETTING


If your default action and your opt-in/-out experience are different, you
will have a bit more complicated logic story, but I will leave that unless
you need help with that.

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 20, 2009 5:40 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Hi Blair,


Thank you so much. I really appreciate your detailed reply. The code example
you provided is clear and neat.

Basically, we'd 

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-20 Thread Richard

In article <414331.22649...@web59815.mail.ac4.yahoo.com>,
"little.forest"   writes:

> Hmm, can you tell me how to use AppSearch to "locate folders"?

Use  with a nested 

> "Use type 19 CA to set properties"  [...]

As pointed out by others, I was wrong in saying type 19, its type 51
(set property) as already mentioned.

Not every CA requires a DLL or EXE -- only DLL/EXE CAs need them.  WiX
exposes a set property CA with .

You can reuse your upgrade_settings.exe program, but you may find that
its more trouble than its worth because this means creating a custom
action in code and interacting with this external utility to set
properties in the MSI.  You might find it easier to have this upgrade
settings utility invoke msiexec on your MSI with command-line
arguments to set properties for the installation, essentially using
the upgrade settings utility as a bootstrapper.

> And the last question, "to use condition on events to determine dialogs shown
 in a wizard", is it some like this?
> NOT Installed and and REALLY_NEED_UPGRADE_SETTING

Yes, but be careful about conditions and the fact that you need to
populate those conditions on the Next button *and* the back button
*and* you need to make sure that the conditions are setup properly so
that dialog transitions are managed properly.  Additionally, you can't
have more than one NewDialog control event on a button, even if the
conditions are mutually exclusive.  You'll get weird behavior if you
try this.

The way to manage complex dialog transitions is to use a property to
hold the name of the dialog you wish to display and conditionally set
this property to the right value.  Then transition to the dialog named
by the property:

For instance, suppose the transition table for the Back button on
MyDlg looks like this:

Target Dialog   Condition
Dialog1 NOT A AND NOT B
Dialog2 A AND NOT B
Dialog3 A AND B
Dialog4 NOT A AND B

The following  events show how to implement this logic with a
single NewDialog event on the Back button of MyDlg:



A AND NOT B
A AND B
NOT A AND B


Note that the first set property event has no condition, guaranteeing
that the transition is always well defined.  You can also null out the
property and then take the NewDialog transition only when the property
is non-empty:



NOT A AND NOT B
A AND NOT B
A AND B
NOT A AND B
BackDialog

-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 

  Legalize Adulthood! 

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-20 Thread Blair
Can you live with the existence (or lack thereof) of those two settings
directories? Does it matter if they are empty or not? I would assume that if
the 3.0 one didn't exist but the 2.0 one does, you have a better than even
chance you have data to upgrade. Anytime you can use a built-in custom
action instead of supplying your own, you tend to improve reliability.
However, you can add as many custom actions (and custom action binaries)
into your installation package as you wish, up to the size limit of the MSI
file (not that you would ever want an MSI file that big).

I assume your "AppData" property is the APPDATA environment variable. If
not, change my "[%AppData]\" and ensure that the property is defined before
the AppSearch action. If it is defined in your Directory table, those
properties are not populated until CostFinalize. Note that if Windows
Installer defines a path, it always includes the trailing backslash ('\').
If you supply paths via your own custom action, you should do the same.


  


  






  SETTINGS_20_EXIST
AND NOT SETTINGS_30_EXIST


If you can't use mere absence/presence of the folders for your detection
routine, don't use any of my code (except for the secure property
declaration of NEED_UPDRADE_SETTING) and instead set NEED_UPDRADE_SETTING in
your DLL action. Call your action with no condition in your
InstallUISequence where I call SetNeedUpgradeSetting.

Now, on to the InstallExecuteSequence. I am assuming that your confirmation
dialog (MyDlg) has a check box that is associated with the property
REALLY_NEED_UPGRADE_SETTING (which sets it to the value "1" if the box is
checked). What is your default? Also, if the UI is bypassed, what should the
assumed value be? I hope it is the same (checked by default, assumed checked
if never shown). That makes your logic easier.

You will need to make sure your REALLY_NEED_UPGRADE_SETTING property is also
secure. I will assume it is also checked by default. If you are using your
DLL instead of simple folder detection you should also set it to
Execute="firstSequence".




  SETTINGS_20_EXIST
AND NOT SETTINGS_30_EXIST
  NOT Installed
AND REALLY_NEED_UPGRADE_SETTING AND NEED_UPGRADE_SETTING


If your default action and your opt-in/-out experience are different, you
will have a bit more complicated logic story, but I will leave that unless
you need help with that.

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 20, 2009 5:40 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Hi Blair,


Thank you so much. I really appreciate your detailed reply. The code example
you provided is clear and neat.

Basically, we'd like to do these:
1. Detect if we need to do a setting migration: look into
"[AppData]\MyCompany\MyApp 3.0" folder and "[AppData]\MyCompany\MyApp 2.0"
folder. If there is nothing in 3.0 folder(it means the user never install
the 3.0 version) and there is something in 2.0 folder(it means the user ever
used 2.0 version), then we should do setting upgrade. We'll need to set a
property.
2. If the property is set, then we'll need to do setting upgrade. We'll show
a new page after InstallDirDlg and before VerifyReadyDlg. In this page,
we'll say "We have detected you have 2.0 settings. Do you want to upgrade
these settings to 3.0?", and provide a checkbox. 
If the property is not set, we do not show this setting migration page.
3. After installation but before it's finished, based on the property, we'll
either run a small program to migrate settings, or do nothing.

So from these description, hopefully you've got our logic: we need to
"detect->set property->show message on GUI->do setting migration".

Our setting folder structure is a bit of complicated. The setting folder may
contain files(like settings.xml, or ui.xml), or may contain user's
login(like "james" or "linda"). So when doing detection, we really couldn't
count on a specific file. What we really need is to detect "*.*" which isn't
supported by MSI. So I guess I'll have to write a DLL to do the detection
work? Inside the DLL, I'll look into the source and destination folder and
set property, right?

For display on GUI, with your code example and a lot of google searching and
trying, I've got it work. Here is the code for dialog sequence, please point
out errors if you find there is any:




NOT Installed
Installed
NOT Installed
Installed

NOT Installed and
NEED_UPGRADE_SETTING
NOT Installed and NOT
NEED_UPGRADE_SETTING


I made some testing, it seems working: if I explicitly set
NEED_UPGRADE_SETTING property in my code, I did see the message page; if I
don't, then I did

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-20 Thread little.forest
Hi Blair,


Thank you so much. I really appreciate your detailed reply. The code example 
you provided is clear and neat.

Basically, we'd like to do these:
1. Detect if we need to do a setting migration: look into 
"[AppData]\MyCompany\MyApp 3.0" folder and "[AppData]\MyCompany\MyApp 2.0" 
folder. If there is nothing in 3.0 folder(it means the user never install the 
3.0 version) and there is something in 2.0 folder(it means the user ever used 
2.0 version), then we should do setting upgrade. We'll need to set a property.
2. If the property is set, then we'll need to do setting upgrade. We'll show a 
new page after InstallDirDlg and before VerifyReadyDlg. In this page, we'll say 
"We have detected you have 2.0 settings. Do you want to upgrade these settings 
to 3.0?", and provide a checkbox. 
If the property is not set, we do not show this setting migration page.
3. After installation but before it's finished, based on the property, we'll 
either run a small program to migrate settings, or do nothing.

So from these description, hopefully you've got our logic: we need to 
"detect->set property->show message on GUI->do setting migration".

Our setting folder structure is a bit of complicated. The setting folder may 
contain files(like settings.xml, or ui.xml), or may contain user's login(like 
"james" or "linda"). So when doing detection, we really couldn't count on a 
specific file. What we really need is to detect "*.*" which isn't supported by 
MSI. So I guess I'll have to write a DLL to do the detection work? Inside the 
DLL, I'll look into the source and destination folder and set property, right?

For display on GUI, with your code example and a lot of google searching and 
trying, I've got it work. Here is the code for dialog sequence, please point 
out errors if you find there is any:




NOT Installed
Installed
NOT Installed
Installed

NOT Installed and NEED_UPGRADE_SETTING
NOT Installed and NOT 
NEED_UPGRADE_SETTING


I made some testing, it seems working: if I explicitly set NEED_UPGRADE_SETTING 
property in my code, I did see the message page; if I don't, then I didn't see 
the page. So it's good.

So my goal is to look into the DLL which can detect if need to migrate setting 
and set the property. I'll get on it.

But there are still two things I'm not sure:
1. As you know, we have an EXE program to handle the setting migration. Is it 
okay to include both the detection DLL and the upgrade program EXE in one 
installer? Here is our setting upgrade program code part:





NOT 
Installed
 

2. How to make the detection happen before the actual setting migration program?

Am I doing the right thing? Or am I in the right direction? Please let me know.

Thanks again,
/Brian




________________
From: Blair 
To: General discussion for Windows Installer XML toolset. 

Sent: Tuesday, October 20, 2009 4:55:54 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page

I don't know the logic you are looking for, but here is one possibility (may
not be your correct logic, but if you can read this, check the
documentation, and determine what it will do, you should then understand
what you need to do to implement the logic you are looking for.


  

  





NOT Installed and NEED_UPGRADE_SETTING

NOT Installed and
NEED_UPGRADE_SETTING

Installed or NOT
NEED_UPGRADE_SETTING

NOT Installed and NEED_UPGRADE_SETTING

Installed or NOT NEED_UPGRADE_SETTING


  NEED_UPGRADE_SETTING


  NEED_UPGRADE_SETTING


If you can describe the logic (including UI) you are looking for and a way
to use file/directory/registry/MSI component searches to determine your need
to perform the upgrade, we can help you craft that.

-Original Message-----
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 20, 2009 3:23 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Thanks Blair.


Frankly, I'm not getting what you just said. I'm afraid that I couldn't
translate your instructions to be actual code and make it work. Is it
possible to provide some step by step instructions? I'd just like it more
specific. 

(Even I've being dealt with Wix for more then 10 months, I'd say I'm still a
newbie. Forgive me, please.)

Thanks anyway.



________________
From: Blair 
To: General discussion for Windows Installer XML toolset.

Sent: Tuesday, October 20, 2009 3:05:32 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

"Type 19" is 
You schedule it in the sequence tables like

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-20 Thread Blair
You're right, I didn't look it up, but it was given in the context of
setting properties, not aborting installations.

A type 19 looks like this:


Error Message

Where  is an integer that is your Installer error value. Use
ones MSFT didn't define for your errors, above some number I don't remember
but I believe it is documented in MSDN (start from the Error table docs).

-Original Message-
From: Bob Arnson [mailto:b...@joyofsetup.com] 
Sent: Tuesday, October 20, 2009 4:47 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Blair wrote:
> "Type 19" is 
>   

That's a 51, actually. 19 is error, which quite different.

-- 
sig://boB
http://joyofsetup.com/




--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-20 Thread Bob Arnson
Blair wrote:
> "Type 19" is 
>   

That's a 51, actually. 19 is error, which quite different.

-- 
sig://boB
http://joyofsetup.com/



--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-20 Thread Blair
I don't know the logic you are looking for, but here is one possibility (may
not be your correct logic, but if you can read this, check the
documentation, and determine what it will do, you should then understand
what you need to do to implement the logic you are looking for.


  

  





NOT Installed and NEED_UPGRADE_SETTING

NOT Installed and
NEED_UPGRADE_SETTING

Installed or NOT
NEED_UPGRADE_SETTING

NOT Installed and NEED_UPGRADE_SETTING

Installed or NOT NEED_UPGRADE_SETTING


  NEED_UPGRADE_SETTING


  NEED_UPGRADE_SETTING


If you can describe the logic (including UI) you are looking for and a way
to use file/directory/registry/MSI component searches to determine your need
to perform the upgrade, we can help you craft that.

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 20, 2009 3:23 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Thanks Blair.


Frankly, I'm not getting what you just said. I'm afraid that I couldn't
translate your instructions to be actual code and make it work. Is it
possible to provide some step by step instructions? I'd just like it more
specific. 

(Even I've being dealt with Wix for more then 10 months, I'd say I'm still a
newbie. Forgive me, please.)

Thanks anyway.




From: Blair 
To: General discussion for Windows Installer XML toolset.

Sent: Tuesday, October 20, 2009 3:05:32 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

"Type 19" is 
You schedule it in the sequence tables like any other custom action,
including using conditions.

And, yes, on your "conditions to determine dialogs" question.

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 20, 2009 12:56 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Thanks for your reply, Richard.


Hmm, can you tell me how to use AppSearch to "locate folders"?

"Use type 19 CA to set properties" - I guess you mean I'll need a dll or exe
to detect and set the property, right? If so, is it possible that I can
"reuse" my existing setting upgrade program? I already have a small program
to handle setting upgrade - it accepts parameters to run like this
"upgrade_settings.exe -run param1 param2". Can I run it something like
"upgrade_settings.exe -detect param1 param2" just for detection reason? How
can I make sure this detection run is before the actual setting upgrade
running? I've a feeling that, for one program, we'd better not to run it
twice in one installer. Or, even I can write another program to do the
detection work, but how can I sequence these two apps to make the detection
one run first? Maybe I'm wrong, but I worry about the program sequencing.
Currently, I have these code:





NOT Installed



If, say, add the detection, can I do this?



NOT Installed and
REALLY_NEED_UPGRADE_SETTING



And the last question, "to use condition on events to determine dialogs
shown in a wizard", is it some like this?
NOT Installed and and
REALLY_NEED_UPGRADE_SETTING


Thanks!



____________________
From: Richard 
To: wix-users@lists.sourceforge.net
Sent: Monday, October 19, 2009 6:52:11 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page


Use AppSearch to locate folders.

Use type 19 CA's (property set) to set properties based on conditions

Use conditions on events to determine dialogs shown in a wizard
sequence, or a condition on the dialog action in the UI sequence to
conditionally display dialogs.
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __
Connec

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-20 Thread little.forest
Thanks Blair.


Frankly, I'm not getting what you just said. I'm afraid that I couldn't 
translate your instructions to be actual code and make it work. Is it possible 
to provide some step by step instructions? I'd just like it more specific. 

(Even I've being dealt with Wix for more then 10 months, I'd say I'm still a 
newbie. Forgive me, please.)

Thanks anyway.




From: Blair 
To: General discussion for Windows Installer XML toolset. 

Sent: Tuesday, October 20, 2009 3:05:32 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page

"Type 19" is 
You schedule it in the sequence tables like any other custom action,
including using conditions.

And, yes, on your "conditions to determine dialogs" question.

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 20, 2009 12:56 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Thanks for your reply, Richard.


Hmm, can you tell me how to use AppSearch to "locate folders"?

"Use type 19 CA to set properties" - I guess you mean I'll need a dll or exe
to detect and set the property, right? If so, is it possible that I can
"reuse" my existing setting upgrade program? I already have a small program
to handle setting upgrade - it accepts parameters to run like this
"upgrade_settings.exe -run param1 param2". Can I run it something like
"upgrade_settings.exe -detect param1 param2" just for detection reason? How
can I make sure this detection run is before the actual setting upgrade
running? I've a feeling that, for one program, we'd better not to run it
twice in one installer. Or, even I can write another program to do the
detection work, but how can I sequence these two apps to make the detection
one run first? Maybe I'm wrong, but I worry about the program sequencing.
Currently, I have these code:





NOT Installed



If, say, add the detection, can I do this?



NOT Installed and
REALLY_NEED_UPGRADE_SETTING



And the last question, "to use condition on events to determine dialogs
shown in a wizard", is it some like this?
NOT Installed and and
REALLY_NEED_UPGRADE_SETTING


Thanks!



____________________
From: Richard 
To: wix-users@lists.sourceforge.net
Sent: Monday, October 19, 2009 6:52:11 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page


Use AppSearch to locate folders.

Use type 19 CA's (property set) to set properties based on conditions

Use conditions on events to determine dialogs shown in a wizard
sequence, or a condition on the dialog action in the UI sequence to
conditionally display dialogs.
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __
Connect with friends from any web browser - no download required. Try the
new Yahoo! Canada Messenger for the Web BETA at
http://ca.messenger.yahoo.com/webmessengerpromo.php

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 

Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-20 Thread Blair
"Type 19" is 
You schedule it in the sequence tables like any other custom action,
including using conditions.

And, yes, on your "conditions to determine dialogs" question.

-Original Message-
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, October 20, 2009 12:56 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page

Thanks for your reply, Richard.


Hmm, can you tell me how to use AppSearch to "locate folders"?

"Use type 19 CA to set properties" - I guess you mean I'll need a dll or exe
to detect and set the property, right? If so, is it possible that I can
"reuse" my existing setting upgrade program? I already have a small program
to handle setting upgrade - it accepts parameters to run like this
"upgrade_settings.exe -run param1 param2". Can I run it something like
"upgrade_settings.exe -detect param1 param2" just for detection reason? How
can I make sure this detection run is before the actual setting upgrade
running? I've a feeling that, for one program, we'd better not to run it
twice in one installer. Or, even I can write another program to do the
detection work, but how can I sequence these two apps to make the detection
one run first? Maybe I'm wrong, but I worry about the program sequencing.
Currently, I have these code:





NOT Installed



If, say, add the detection, can I do this?



NOT Installed and
REALLY_NEED_UPGRADE_SETTING



And the last question, "to use condition on events to determine dialogs
shown in a wizard", is it some like this?
NOT Installed and and
REALLY_NEED_UPGRADE_SETTING


Thanks!




From: Richard 
To: wix-users@lists.sourceforge.net
Sent: Monday, October 19, 2009 6:52:11 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show
a new added dialog page


Use AppSearch to locate folders.

Use type 19 CA's (property set) to set properties based on conditions

Use conditions on events to determine dialogs shown in a wizard
sequence, or a condition on the dialog action in the UI sequence to
conditionally display dialogs.
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __
Connect with friends from any web browser - no download required. Try the
new Yahoo! Canada Messenger for the Web BETA at
http://ca.messenger.yahoo.com/webmessengerpromo.php

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-20 Thread little.forest
Thanks for your reply, Richard.


Hmm, can you tell me how to use AppSearch to "locate folders"?

"Use type 19 CA to set properties" - I guess you mean I'll need a dll or exe to 
detect and set the property, right? If so, is it possible that I can "reuse" my 
existing setting upgrade program? I already have a small program to handle 
setting upgrade - it accepts parameters to run like this "upgrade_settings.exe 
-run param1 param2". Can I run it something like "upgrade_settings.exe -detect 
param1 param2" just for detection reason? How can I make sure this detection 
run is before the actual setting upgrade running? I've a feeling that, for one 
program, we'd better not to run it twice in one installer. Or, even I can write 
another program to do the detection work, but how can I sequence these two apps 
to make the detection one run first? Maybe I'm wrong, but I worry about the 
program sequencing. Currently, I have these code:





NOT 
Installed



If, say, add the detection, can I do this?



NOT Installed and REALLY_NEED_UPGRADE_SETTING



And the last question, "to use condition on events to determine dialogs shown 
in a wizard", is it some like this?
NOT Installed and and 
REALLY_NEED_UPGRADE_SETTING


Thanks!




From: Richard 
To: wix-users@lists.sourceforge.net
Sent: Monday, October 19, 2009 6:52:11 PM
Subject: Re: [WiX-users] How to detect files presence and conditionally show a 
new added dialog page


Use AppSearch to locate folders.

Use type 19 CA's (property set) to set properties based on conditions

Use conditions on events to determine dialogs shown in a wizard
sequence, or a condition on the dialog action in the UI sequence to
conditionally display dialogs.
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  __
Connect with friends from any web browser - no download required. Try the new 
Yahoo! Canada Messenger for the Web BETA at 
http://ca.messenger.yahoo.com/webmessengerpromo.php
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-19 Thread Richard

Use AppSearch to locate folders.

Use type 19 CA's (property set) to set properties based on conditions

Use conditions on events to determine dialogs shown in a wizard
sequence, or a condition on the dialog action in the UI sequence to
conditionally display dialogs.
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 

  Legalize Adulthood! 

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] How to detect files presence and conditionally show a new added dialog page

2009-10-19 Thread little.forest
We use WiX 3.0.4805.0.

Requirement:

---
1. Detect "[AppData]\MyCompany\MyApp 2.0" folder and "[AppData]\MyCompany\MyApp 
3.0" folder, if there IS NO files/folders in 3.0 folder and there ARE 
files/folders in 2.0 folder, then setup a property
2. Based on the detection result in step one, show a dialog to ask the end user 
if she wants to migrate her settings from 2.0 folder to 3.0 folder.

Questions:
-
1. I know there is a way to detect a file's presence like this:





But I don't know how to detect *.*? I need to detect if there is any 
files/folders in 3.0 folder, and any files/folder in 2.0 folder. There is no 
way to know the exact file name or folder name until run time. The folder could 
include files like settings.xml, or it may not include any files at all but 
just include some folders like "james" or "alice". If the condition is meet, 
then set a property called MIGRATE_SETTINGS_PROPERTY.

2. Initially, I thought I can implement a popup dialog to ask if the end user 
wants to migrate the settings. If they want to, then I've a small external 
application can handle the settings migration. If they choose no, then we won't 
migrate the settings. But then I realized that I can't implement a popup dialog 
but I can insert a dialog. This solution is fine for me. I actually added one 
dialog. In this dialog, I added some elements and one checkbox called "Migrate 
my settings". It seems working. Here is some code from my version of 
WixUI_InstallDir.wxs:
NOT Installed
Installed
NOT Installed
Installed
The problem is, how can I conditionally show this dialog based on the property 
MIGRATE_SETTINGS_PROPERTY in the previous question? Namely, if we need to 
migrate settings, then show this dialog, otherwise, we shouldn't even show this 
dialog. How to do this?


Many thanks. 
/Brian


  __
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now
http://ca.toolbar.yahoo.com.
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users