[WiX-users] [wix-users] Conditions for setup in GUI and without GUI?

2007-06-26 Thread Mailinglist
Hi WiX-Users,

in our Setup we use a personalized GUI, that checks in its first dialog several 
conditions and shows messages, if one condition fails. Most of this conditions 
handle previously needed software, like MMC 3.0 and Powershell 1.0.

This just works fine for us, but if the install is done with /quiet 
parameter, those checks won't ever be run, since the dialog is not initialized 
anyway. So I tried of checking those conditions in the product itself, which 
works, but even while install with gui the messages pop up from the msi and not 
in our gui. How can I trigger the conditions to only be checked if the 
installation is done in quiet mode?

Snippet of the project itself:

!-- Launch conditions --
Condition Message='You have to be a local administrator to install 
$(var.AppName).'
  Privileged
/Condition
Condition Message=Windows XP or Windows Server 2003 or later is 
required.
  ![CDATA[VersionNT = 501]]
/Condition
Condition Message='This setup requires the .NET Framework 2.0 or 
higher.'
  ![CDATA[MsiNetAssemblySupport = 2.0.50727]]
/Condition
Condition Message=Microsoft SQL Server 2005 or SQL Server Express 
have to be present for this version to be installed.
  ![CDATA[ NOT(VERSIONFULLSQL) AND NOT(VERSIONEXPRESSSQL) ]]
/Condition
Condition Message='This setup requires the Microsoft Management 
Console 3.0 or higher.'
  ![CDATA[NOT(MMC3) AND NOT(VersionNT = 600)]]
/Condition
Condition Message='This setup requires the Microsoft Powershell 
v1.0 or higher.'
  ![CDATA[NOT (POWERSHELL)]]
/Condition

Snippet of the GUI with its conditions:

Control Id=Next Type=PushButton X=236 Y=243 Width=56 Height=17 
Default=yes Text=!(loc.WixUINext)
  Publish Event=NewDialog 
Value=[WixUI_WelcomeDlg_Next]1/Publish

  Condition Action=disable
![CDATA[ ((VersionNT  502) OR (VersionNT = 502 AND 
NOT(ServicePackLevel = 1))) ]]
  /Condition
  Condition Action=disable
![CDATA[ NOT(VERSIONFULLSQL) AND 
NOT(VERSIONEXPRESSSQL) ]]
  /Condition
  Condition Action=disable
![CDATA[NOT(MMC3) AND NOT(VersionNT = 600) ]]
  /Condition
  Condition Action=disable
![CDATA[NOT POWERSHELL]]
  /Condition
  Condition Action=enable
![CDATA[ ALLOWSERVER
AND (VERSIONFULLSQL OR VERSIONEXPRESSSQL)
AND (MMC3 OR (VersionNT = 600))
AND (POWERSHELL)
AND NOT((VersionNT  502) OR (VersionNT = 502 AND NOT(ServicePackLevel = 1)))
]]
  /Condition

  Publish Property=IDIR 
Value=[NEWINSTALLDIR]Aldi-Ews\MSSERVER/Publish

  Publish Property=WixUI_InstallMode 
Value=InstallComplete/Publish
/Control


Any hints welcome.


Oliver Friedrich
Consultant - Software Solutions

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] [wix-users] Conditions for setup in GUI and without GUI?

2007-06-26 Thread Rob Hamflett
Hmm, haven't seen that before.  I've been using 2000+ for all my error codes.  
Should probably get 
round to fixing that some day, then.

Rob

Stefan Pavlik wrote:
 I know that the code below is just an example but to be precise:
 
 MSDN: Error Table
 The range from 25000 to 3 is reserved for errors from custom
 actions. Authors of custom actions may use this range for their
 custom actions.
 
 
 Regards
 
 Stefan
 
 
 Rob Hamflett wrote:
 Yuo could create custom errors like this:
 Error Id=2000This is my error message/Error
 and create a custom action to trigger it like this:
 CustomAction Id=MyError Error=2000 /

 You can call this in the InstallExecuteSequence like this:
 Custom Action=MyErrorNOT WANTED_CONDITION /Custom

 The additional problem is how do you stop them triggering if the UI ran?
 You can create another CA like this:
 CustomAction Id=setUI_RAN Property=UI_RAN Value=1 /
 and schedule it at some point in the InstallUISequence (as long as it's 
 before ExecuteAction). 
 There's no need to declare the UI_RAN property; it will be created when the 
 CA is run.  The 
 condition on your CA would then be something like:
 Custom Action=MyErrorNOT WANTED_CONDITION AND NOT UI_RAN/Custom

 Rob



 Mailinglist wrote:
 Hi WiX-Users,

  

 in our Setup we use a personalized GUI, that checks in its first dialog 
 several conditions and shows messages, if one condition fails. Most of 
 this conditions handle previously needed software, like “MMC 3.0” and 
 “Powershell 1.0”.

  

 This just works fine for us, but if the install is done with “/quiet” 
 parameter, those checks won’t ever be run, since the dialog is not 
 initialized anyway. So I tried of checking those conditions in the 
 product itself, which works, but even while install with gui the 
 messages pop up from the msi and not in our gui. How can I trigger the 
 conditions to only be checked if the installation is done in quiet mode?

  

 Snippet of the project itself:

  

 !-- Launch conditions --

 Condition Message='You have to be a local administrator to 
 install $(var.AppName).'

   Privileged

 /Condition

 Condition Message=Windows XP or Windows Server 2003 or 
 later is required.

   ![CDATA[VersionNT = 501]]

 /Condition

 Condition Message='This setup requires the .NET Framework 
 2.0 or higher.'

   ![CDATA[MsiNetAssemblySupport = 2.0.50727]]

 /Condition

 Condition Message=Microsoft SQL Server 2005 or SQL Server 
 Express have to be present for this version to be installed.

   ![CDATA[ NOT(VERSIONFULLSQL) AND 
 NOT(VERSIONEXPRESSSQL) ]]

 /Condition

 Condition Message='This setup requires the Microsoft 
 Management Console 3.0 or higher.'

   ![CDATA[NOT(MMC3) AND NOT(VersionNT = 600)]]

 /Condition

 Condition Message='This setup requires the Microsoft 
 Powershell v1.0 or higher.'

   ![CDATA[NOT (POWERSHELL)]]

 /Condition

  

 Snippet of the GUI with its conditions:

  

 Control Id=Next Type=PushButton X=236 Y=243 Width=56 
 Height=17 Default=yes Text=!(loc.WixUINext)

   Publish Event=NewDialog 
 Value=[WixUI_WelcomeDlg_Next]1/Publish

  

   Condition Action=disable

 ![CDATA[ ((VersionNT  502) OR (VersionNT = 502 
 AND NOT(ServicePackLevel = 1))) ]]

   /Condition

   Condition Action=disable

 ![CDATA[ NOT(VERSIONFULLSQL) AND 
 NOT(VERSIONEXPRESSSQL) ]]

   /Condition

   Condition Action=disable

 ![CDATA[NOT(MMC3) AND NOT(VersionNT = 600) ]]

   /Condition

   Condition Action=disable

 ![CDATA[NOT POWERSHELL]]

   /Condition

   Condition Action=enable

 ![CDATA[ ALLOWSERVER

 AND (VERSIONFULLSQL OR VERSIONEXPRESSSQL)

 AND (MMC3 OR (VersionNT = 600))

 AND (POWERSHELL)

 AND NOT((VersionNT  502) OR (VersionNT = 502 AND NOT(ServicePackLevel 
  = 1)))

 ]]

   /Condition

  

   Publish Property=IDIR 
 Value=[NEWINSTALLDIR]Aldi-Ews\MSSERVER/Publish

  

   Publish Property=WixUI_InstallMode 
 Value=InstallComplete/Publish

 /Control

  

  

 Any hints welcome.

  

  

 */Oliver Friedrich/*

 /Consultant - Software Solutions/

  


 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/


 

Re: [WiX-users] [wix-users] Conditions for setup in GUI and without GUI?

2007-06-26 Thread Stefan Pavlik
Another info from MSDN (Windows Installer Error Messages):

Windows Installer errors have an error code of 1000 or greater. The
error codes numbered 1000 to 1999 are ship errors and must be
authored into the Error table. The error codes numbered greater than
2000 are internal errors and do not have authored strings, but these
can occur if the installation package has been incorrectly authored.
For a list of reserved error codes, see Error table.


Stefan



Rob Hamflett wrote:
 Hmm, haven't seen that before.  I've been using 2000+ for all my error codes. 
  Should probably get 
 round to fixing that some day, then.
 
 Rob
 
 Stefan Pavlik wrote:
 I know that the code below is just an example but to be precise:

 MSDN: Error Table
 The range from 25000 to 3 is reserved for errors from custom
 actions. Authors of custom actions may use this range for their
 custom actions.


 Regards

 Stefan


 Rob Hamflett wrote:
 Yuo could create custom errors like this:
 Error Id=2000This is my error message/Error
 and create a custom action to trigger it like this:
 CustomAction Id=MyError Error=2000 /

 You can call this in the InstallExecuteSequence like this:
 Custom Action=MyErrorNOT WANTED_CONDITION /Custom

 The additional problem is how do you stop them triggering if the UI ran?
 You can create another CA like this:
 CustomAction Id=setUI_RAN Property=UI_RAN Value=1 /
 and schedule it at some point in the InstallUISequence (as long as it's 
 before ExecuteAction). 
 There's no need to declare the UI_RAN property; it will be created when the 
 CA is run.  The 
 condition on your CA would then be something like:
 Custom Action=MyErrorNOT WANTED_CONDITION AND NOT UI_RAN/Custom

 Rob



 Mailinglist wrote:
 Hi WiX-Users,

  

 in our Setup we use a personalized GUI, that checks in its first dialog 
 several conditions and shows messages, if one condition fails. Most of 
 this conditions handle previously needed software, like “MMC 3.0” and 
 “Powershell 1.0”.

  

 This just works fine for us, but if the install is done with “/quiet” 
 parameter, those checks won’t ever be run, since the dialog is not 
 initialized anyway. So I tried of checking those conditions in the 
 product itself, which works, but even while install with gui the 
 messages pop up from the msi and not in our gui. How can I trigger the 
 conditions to only be checked if the installation is done in quiet mode?

  

 Snippet of the project itself:

  

 !-- Launch conditions --

 Condition Message='You have to be a local administrator to 
 install $(var.AppName).'

   Privileged

 /Condition

 Condition Message=Windows XP or Windows Server 2003 or 
 later is required.

   ![CDATA[VersionNT = 501]]

 /Condition

 Condition Message='This setup requires the .NET Framework 
 2.0 or higher.'

   ![CDATA[MsiNetAssemblySupport = 2.0.50727]]

 /Condition

 Condition Message=Microsoft SQL Server 2005 or SQL Server 
 Express have to be present for this version to be installed.

   ![CDATA[ NOT(VERSIONFULLSQL) AND 
 NOT(VERSIONEXPRESSSQL) ]]

 /Condition

 Condition Message='This setup requires the Microsoft 
 Management Console 3.0 or higher.'

   ![CDATA[NOT(MMC3) AND NOT(VersionNT = 600)]]

 /Condition

 Condition Message='This setup requires the Microsoft 
 Powershell v1.0 or higher.'

   ![CDATA[NOT (POWERSHELL)]]

 /Condition

  

 Snippet of the GUI with its conditions:

  

 Control Id=Next Type=PushButton X=236 Y=243 Width=56 
 Height=17 Default=yes Text=!(loc.WixUINext)

   Publish Event=NewDialog 
 Value=[WixUI_WelcomeDlg_Next]1/Publish

  

   Condition Action=disable

 ![CDATA[ ((VersionNT  502) OR (VersionNT = 502 
 AND NOT(ServicePackLevel = 1))) ]]

   /Condition

   Condition Action=disable

 ![CDATA[ NOT(VERSIONFULLSQL) AND 
 NOT(VERSIONEXPRESSSQL) ]]

   /Condition

   Condition Action=disable

 ![CDATA[NOT(MMC3) AND NOT(VersionNT = 600) ]]

   /Condition

   Condition Action=disable

 ![CDATA[NOT POWERSHELL]]

   /Condition

   Condition Action=enable

 ![CDATA[ ALLOWSERVER

 AND (VERSIONFULLSQL OR VERSIONEXPRESSSQL)

 AND (MMC3 OR (VersionNT = 600))

 AND (POWERSHELL)

 AND NOT((VersionNT  502) OR (VersionNT = 502 AND NOT(ServicePackLevel 
  = 1)))

 ]]

   /Condition

  

   Publish Property=IDIR 
 Value=[NEWINSTALLDIR]Aldi-Ews\MSSERVER/Publish

  

   Publish Property=WixUI_InstallMode 
 Value=InstallComplete/Publish

 /Control

  

  

 Any hints