[WiX-users] Conditional Components based on OS ?

2011-12-08 Thread Michael Tissington
I have four components XP, XP64, Vista32+ and Vista64+

How can I create conditions for these components?


--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Conditional Components based on OS ?

2011-12-08 Thread Chad Petersen
http://msdn.microsoft.com/en-us/library/windows/desktop/aa370556(v=vs.85
).aspx

Would probably look about like this. You don't have to use CDATA blocks,
but my example used the  symbol so I just went with it.


Component Id=XP Guid=[yourguid]
  Condition![CDATA[(VersionNT = 501)]]/Condition
/Component

Component Id=XP64 Guid=[yourguid]
  Condition![CDATA[(VersionNT64 = 501)]]/Condition
/Component

Component Id=Vista32+ Guid=[yourguid]
  Condition![CDATA[(VersionNT = 600)]]/Condition
/Component

Component Id= Vista64+ Guid=[yourguid]
  Condition![CDATA[(VersionNT64 = 600)]]/Condition
/Component


-Original Message-
From: Michael Tissington [mailto:michael_tissing...@ciqual.com] 
Sent: Thursday, December 08, 2011 7:04 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: [WiX-users] Conditional Components based on OS ?

I have four components XP, XP64, Vista32+ and Vista64+

How can I create conditions for these components?



--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and
point of 
discussion for anyone considering optimizing the pricing and packaging
model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] conditional components

2006-11-15 Thread André Pönitz


Hi all.

I want to write a certain registry key during an installation
and the same key with a different value during uninstall.

So I thought I could have something like 

  Component Id='install_reques' Guid='x'
RegistryValue Id='InstallNetlmCommand' Root='HKLM' 
Key='$(var.InstallerHKLM)\Netlm'
  Name='InstallCommand' Action='write' Type='string' Value='msiexec /i 
[SourceDir] netlm.msi' /
 Condition (Netlm = 3) AND NOT (!Netlm = 3) /Condition
   /Component

  Component Id='uninstall_request' Guid='x'
 RegistryValue Id='InstallNetlmCommand' Root='HKLM' 
Key='$(var.InstallerHKLM)\Netlm'
  Name='InstallCommand' Action='write' Type='string' Value='msiexec /qb 
/x {x}'/
 Condition (Netlm = 2) AND (!Netlm = 3) /Condition
  /Component

under the main Feature ('Netlm' is a sub-feature) 

but I get:

u:\src\fesetup\wix\setup.wxs(562) : error CNDL0104 : Not a valid source file; 
detail: Beim Analysieren von 'EntityName' ist ein Fehler aufgetreten. Zeile 
562, Position 22.

[When analizing 'EntityName' an error occured].

It compiles when I replace the condition with, say, '1'.

What am I doing wrong here?

Andre'

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] conditional components

2006-11-15 Thread André Pönitz
 Hi André,

Hi Stefan.
 I realy don't know what is wrong.
 
 Maybe you should try to use the ![CDATA[Condition]] to avoid
 conflicts with XML.

Well, you did know what was wrong after all. CDATA helps indeed,
Netlm is no valid XML...

 But I know that you cannot write to the registry during
 uninstallation using standard action WriteRegistryValues.

Urm, that's bad. Do you know why?

 If you need during uninstallation to write something to registry you
 should write the CustomAction for it.

I already tried to do so but failed to figure out how to
write a registry key from a custom action.

I found all kind of fancy stuff for executings a function in a dll
or an script or such, but no registry access. 

Would I have to use an embedded script in the custom action?

Regards,
Andre'

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] conditional components

2006-11-15 Thread Stefan Pavlik
Hi again...

André Pönitz wrote:
 But I know that you cannot write to the registry during
 uninstallation using standard action WriteRegistryValues.
 
 Urm, that's bad. Do you know why?

The Registry Table of Windows installer does not support such
action. see MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/registry_table.asp

 If you need during uninstallation to write something to registry you
 should write the CustomAction for it.
 
 I already tried to do so but failed to figure out how to
 write a registry key from a custom action.

I would prefer to use C++ Custom Action DLL. You should use the
RegSetValueEx() function to write the values to registry.
http://msdn2.microsoft.com/en-us/library/ms724923.aspx

Hope it wil help you.

Stefan
-- 
Stefan Pavlik | [EMAIL PROTECTED]
Whitestein Technologies | www.whitestein.com
Panenska 28 | SK-81103 Bratislava | Slovak Republic
Tel +421(2)5930-0735 | Fax +421(2)5443-5512

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] conditional components

2006-11-15 Thread André Pönitz


Stefan Pavlik wrote:
 The Registry Table of Windows installer does not support such
 action. see MSDN:
 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/registry_table.asp

Too bad...

 If you need during uninstallation to write something to registry you
 should write the CustomAction for it.
 
 I already tried to do so but failed to figure out how to
 write a registry key from a custom action.

I would prefer to use C++ Custom Action DLL. You should use the
RegSetValueEx() function to write the values to registry.
http://msdn2.microsoft.com/en-us/library/ms724923.aspx

Hope it wil help you.

Ok, done that and it sort-of-works (or not).

The problem right now is that the uninstall custom action is not
called because 'the condition is false'. At least that's what the
log file says.

So my current workaround is to call the uninstall ca unconditionally
and the install ca during install (this one _is_ called), un-doing the
effect of the first ca.

This will, of course, horribly break if the user is modifying the
installation.

Do you (or anybody else for that matter) where (i.e. in what sequence)
and when (i.e. what sequence number or after which standard item) 
the uninstall ca should be called such that !Feature and Feature contain
'proper' values?

Regards (and of course thanks for the help)
Andre'
-- 
View this message in context: 
http://www.nabble.com/conditional-components-tf2635711.html#a7360841
Sent from the wix-users mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] conditional components

2006-11-15 Thread André Pönitz

Stefan Pavlik wrote: 
 I would prefer to use C++ Custom Action DLL. You should use the
 RegSetValueEx() function to write the values to registry.
 http://msdn2.microsoft.com/en-us/library/ms724923.aspx

Just for the record: I just found out why the uninstall CA
was not called: The feature on which they were conditioned
did not contain any components anymore, so it was not 
considered as 'installed' when the installer run.

Puttting a dummy component in the feature 'helps'.

Andre', wondering what the clean solution might be...

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users