I've not come across the Vista scripting issue that Blair mentioned, but AV 
programs are always looking for scripts that might be dangerous. In some cases 
I believe they even intercept calls to the scripting engines. This is typically 
the reason so many setups ask you to disable AV programs before doing an 
install. Another common issue I see is that writing VBScript seems to turn off 
any programming skills the writer may have had. Almost every VBScript I've seen 
is guilty of abusing On Error Resume Next, of not using explicit declarations, 
and generally just plowing through without error handling. In addition, it's 
not the same as Windows Script Host, and that also seems to lead to some 
confusion.

There's no native support for calling C# Dlls from Windows Installer. Various 
solutions exist, but they all have the characteristic that something has to 
crank up and host some version of the .NET Framework before it can run your 
code. Anything that goes wrong in there will require some understanding of that 
framework hosting mechanism. Calling a Win32 C++ Dll custom action with a fixed 
signature from some other Win32 code is trivial, and the call from MSI into 
your function about as simple as a function call can get, and errors are 
usually obvious.

Phil Wilson

-----Original Message-----
From: Dominique Louis [mailto:dominique.lo...@amxeurope.com]
Sent: Tuesday, September 15, 2009 9:07 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ value

I find it weird that the WI would reject VBS but accept a C/C++ dll?
There is nothing stopping someone from writing dodgy code in C/C++ and
shipping it with an installer.
Just because it is compiled it's safer?

Out software should be installed by Administrators, so I'm hoping they
will allow our VBS scripts, as I don't fancy writing any C/C++ code. If
it was C# or Delphi I wouldn't mind.

-----Original Message-----
From: Blair [mailto:os...@live.com]
Sent: 15 September 2009 16:44
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

Make sure it is before LaunchConditions and after AppSearch (you can
move
either one of those if needed)

For example:
<InstallExecuteSequence>
  <AppSearch Before="ParseSqlServerForMSSQL"/>
  <Custom Action="ParseSqlServerForMSSQL" Before="LaunchConditions"/>
</InstallExecuteSequence>
<InstallUISequence>
  <AppSearch Before="ParseSqlServerForMSSQL"/>
  <Custom Action="ParseSqlServerForMSSQL" Before="LaunchConditions"/>
</InstallUISequence>

The usual caveat about VBS (or any other) script CA goes here: they are
unreliable (there are anti-virus systems that prevent the script from
running and, esp. on Vista, incorrect installations/repairs cause
Windows
Installer to reject the scripting engine runtime). For reliability, a
C/C++
CA statically linked to its runtime is considered best practice.

-----Original Message-----
From: Dominique Louis [mailto:dominique.lo...@amxeurope.com]
Sent: Tuesday, September 15, 2009 6:53 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

I'm using v4.5.6001.22159 if that is any help to anyone.

Is putting my CustomAction before LaunchConditions the best place to run
my vbs, or would there be another more appropriate place?

Dominique.

-----Original Message-----
From: Pally Sandher [mailto:pally.sand...@iesve.com]
Sent: 15 September 2009 10:23
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

No but you could attribute it to a bug in whichever version of Windows
Installer you're using to test the MSI (v3.1 or v4.0 whether you're on
XP/2k3 or Vista/2k8 respectively I'm guessing).

People on this list really need to learn the difference between WiX &
Windows Installer. They are *not* the same thing & should never be used
interchangeably as if far too often the case.

You'll have to write your own Custom Action to parse the registry value
before you compare it as far as I know. Would be nice if there was some
sort of Standard Custom Action in WiX for manipulating regex but then
there's already plenty of features which existed in WiX v2.0 which we
have to live without in WiX v3.0 so I wouldn't hold my breath.

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

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


-----Original Message-----
From: Dominique Louis [mailto:dominique.lo...@amxeurope.com]
Sent: 15 September 2009 09:42
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

Hi Blair,
  Can we attribute this to a bug in WiX 3.0 then?

If I need to write a work around, does WiX provide any parsing
capabilities, or should I look at using VBScript or similar to get this
working?

Dominique.

-----Original Message-----
From: Blair [mailto:os...@live.com]
Sent: 14 September 2009 17:34
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

In my tests using a simple installation package, it would appear that
the conditional comparison routines for strings stop looking through the
string at the first NUL character. Since REG_MULTI_SZ strings start with
a NUL, then terminate each value with an additional NUL (remember that
the conditional is evaluated AFTER the string is parsed replacing all
"[whatever]" property references) means that the conditional syntax
can't "see" any values after the first [~] value (which would include
all values retrieved using RegistrySearch involving REG_MULTI_SZ
strings.

You can check for presence of the property, however. (If the property
were truly empty, it would be removed).

To see what I am talking about, compare these three lines from my log:
AppSearch: Property: MYMULTIVALUE, Signature: MyMultiValue MSI (c)
(38:98) [09:26:38:902]: PROPERTY CHANGE: Adding MYMULTIVALUE property.
Its value is ''.
Property(C): MYMULTIVALUE =
[~]SysClass.Dll,StorageCoInstaller[~]WmiProp.dll,WmiPropCoInstaller[~]

Those are the only references to that property in the entire debug
verbose log.

You would need some custom action to parse or otherwise "escape" the
property values in the property before using the condition syntax to
search them.

-----Original Message-----
From: Dominique Louis [mailto:dominique.lo...@amxeurope.com]
Sent: Monday, September 14, 2009 8:53 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

OK based on Pally's earlier post, it would seem that
SQLSERVER><"MSSQLSERVER" or the property equivalent should work, but
neither works for me.
Do they work for anyone else?



-----Original Message-----
From: Dominique Louis [mailto:dominique.lo...@amxeurope.com]
Sent: 14 September 2009 15:54
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

Nope, Changing it to a Property does not work either.
I'm guessing that changing it to a property just makes it the equivalent
of writing SQLSERVER><"MSSQLSERVER"
Which would be incorrect as well.

Is the >< the correct conditional operator for what I'm trying to
achieve?
What is the difference between >< and <> if any?

As I mentioned in my original post, some kind of website or official
documentation showing exactly how each operator is used in a conditional
situation would be really, really useful at this point. At the moment I
feel like I'm walking through the woods, blind folded.

Dominique.

-----Original Message-----
From: Pally Sandher [mailto:pally.sand...@iesve.com]
Sent: 14 September 2009 14:47
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

Have you tried using a Property with its value set to "MSSQLSERVER" as I
first assumed you were doing? Even something as simple as <Property
Id="MSSQLSERVER" Value="MSSQLSERVER" /> added to your first code
fragment might cause this to work.

Essentially your code is doing exactly what you're trying to achieve
from how I understand it but a quirk of Windows Installer could be
fooling both of us and the above might be the solution.


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

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


-----Original Message-----
From: Dominique Louis [mailto:dominique.lo...@amxeurope.com]
Sent: 14 September 2009 14:23
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

Hi Pally,
  Thanks for taking the time to answer my query. I should have mentioned
that I had already tried putting quotes around MSSQLSERVER, but that
does not work either.

What I need is some kind of conditional code the does the equivalent of
a "Does this SQLSERVER property *contain* MSSQLSERVER"

Dominique.

-----Original Message-----
From: Pally Sandher [mailto:pally.sand...@iesve.com]
Sent: 14 September 2009 13:15
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

<Condition Message="This application requires Microsoft SQL Server.
Please install Microsoft SQL Server then run this installer again.">
    <![CDATA[Installed OR (SQLSERVER><MSSQLSERVER)]]>
  </Condition>

That says to throw the condition 'If the Property SQLSERVER does not
contain the Property MSSQLSERVER or the product is not already
Installed'

Try putting quotes around MSSQLSERVER if you want it to be a string
rather than a Property.

I may be wrong but that's how I understand it. See
http://msdn.microsoft.com/en-us/library/aa368012.aspx

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

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


-----Original Message-----
From: Dominique Louis [mailto:dominique.lo...@amxeurope.com]
Sent: 14 September 2009 12:48
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

MSSQLSERVER Is not a property, it is a literal string that should exist
within the Registry.
I'm essentially trying to check if 'MSSQLSERVER' exists within the
multi-string SQLSERVER.



-----Original Message-----
From: Pally Sandher [mailto:pally.sand...@iesve.com]
Sent: 14 September 2009 12:36
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Conditional installed based on REG_MULTI_SZ
value

What is the property MSSQLSERVER set to? You appear to have omitted this
from your code fragment.


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

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



-----Original Message-----
From: Dominique Louis [mailto:dominique.lo...@amxeurope.com]
Sent: 14 September 2009 11:29
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Conditional installed based on REG_MULTI_SZ value

Hi WiX gurus,
  I'm using the "supposed" standard way of detecting multiple SQLServer
instances...

<Property Id="SQLSERVER">
    <RegistrySearch Id="SQLServer" Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server" Type="raw"
Name="InstalledInstances"/>
  </Property>

  <Condition Message="This application requires Microsoft SQL Server.
Please install Microsoft SQL Server then run this installer again.">
    <![CDATA[Installed OR (SQLSERVER><MSSQLSERVER)]]>
  </Condition>

But the Condition...
<![CDATA[Installed OR (SQLSERVER><MSSQLSERVER)]]>

Does not evaluate correctly.

For instance if the Property SQLSERVER only contains "[~]SQLEXPRESS[~]"
( according to the log )
It still allows the installation to proceed when it should not, so I'm
not convinced that using the >< is the correct way to check if 1 value
exists within a REG_MULTI_SZ variable.

Can anyone enlighten me as to what I may be doing wrong.

Also where can I find the correct documentation/list to find out what
are the correct conditional operatives I can use within a Condition
statement in WiX, preferably with examples. I Googled various sites, but
nothing definitive or helpful.


Thanks.


Dominique.
AMX

AMX UK
Auster Road
Clifton Moor
York, North Yorkshire
United Kingdom
YO30 4GD

+44 (0) 1904 343100     office
+44 (0) 1904 343101     fax

AMX South
6th Floor Salisbury House
London Wall
London
United Kingdom
EC2M 5QQ

+44 (0) 2076 529450     office
+44 (0) 8701 991661     fax

AMX Belgium
Boerenkrijglaan, 96a
B-2260
Westerlo
Belgium


+ 32 (0) 1454 2763      office
+ 32 (0) 1454 2766      fax



------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and deployment -
and focus on what you do best, core application coding. Discover what's
new with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
AMX

AMX UK
Auster Road
Clifton Moor
York, North Yorkshire
United Kingdom
YO30 4GD

+44 (0) 1904 343100     office
+44 (0) 1904 343101     fax

AMX South
6th Floor Salisbury House
London Wall
London
United Kingdom
EC2M 5QQ

+44 (0) 2076 529450     office
+44 (0) 8701 991661     fax

AMX Belgium
Boerenkrijglaan, 96a
B-2260
Westerlo
Belgium


+ 32 (0) 1454 2763      office
+ 32 (0) 1454 2766      fax


------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
trial. Simplify your report design, integration and deployment - and
focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
AMX

AMX UK
Auster Road
Clifton Moor
York, North Yorkshire
United Kingdom
YO30 4GD

+44 (0) 1904 343100     office
+44 (0) 1904 343101     fax

AMX South
6th Floor Salisbury House
London Wall
London
United Kingdom
EC2M 5QQ

+44 (0) 2076 529450     office
+44 (0) 8701 991661     fax

AMX Belgium
Boerenkrijglaan, 96a
B-2260
Westerlo
Belgium


+ 32 (0) 1454 2763      office
+ 32 (0) 1454 2766      fax

######################################################################
Attention:
This e-mail message is privileged and confidential. If you are not the
intended recipient please delete the message and notify the sender.
Any views or opinions presented are solely those of the author.

This email was scanned and cleared by NetIQ MailMarshal.
######################################################################

------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
trial. Simplify your report design, integration and deployment - and
focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
AMX

AMX UK
Auster Road
Clifton Moor
York, North Yorkshire
United Kingdom
YO30 4GD

+44 (0) 1904 343100     office
+44 (0) 1904 343101     fax

AMX South
6th Floor Salisbury House
London Wall
London
United Kingdom
EC2M 5QQ

+44 (0) 2076 529450     office
+44 (0) 8701 991661     fax

AMX Belgium
Boerenkrijglaan, 96a
B-2260
Westerlo
Belgium


+ 32 (0) 1454 2763      office
+ 32 (0) 1454 2766      fax

######################################################################
Attention:
This e-mail message is privileged and confidential. If you are not the
intended recipient please delete the message and notify the sender.
Any views or opinions presented are solely those of the author.

This email was scanned and cleared by NetIQ MailMarshal.
######################################################################

------------------------------------------------------------------------
----
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
trial. Simplify your report design, integration and deployment - and
focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
trial. Simplify your report design, integration and deployment - and
focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
AMX

AMX UK
Auster Road
Clifton Moor
York, North Yorkshire
United Kingdom
YO30 4GD

+44 (0) 1904 343100     office
+44 (0) 1904 343101     fax

AMX South
6th Floor Salisbury House
London Wall
London
United Kingdom
EC2M 5QQ

+44 (0) 2076 529450     office
+44 (0) 8701 991661     fax

AMX Belgium
Boerenkrijglaan, 96a
B-2260
Westerlo
Belgium


+ 32 (0) 1454 2763      office
+ 32 (0) 1454 2766      fax

######################################################################
Attention:
This e-mail message is privileged and confidential. If you are not the
intended recipient please delete the message and notify the sender.
Any views or opinions presented are solely those of the author.

This email was scanned and cleared by NetIQ MailMarshal.
######################################################################

------------------------------------------------------------------------
------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register
now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------
------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register
now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
AMX

AMX UK
Auster Road
Clifton Moor
York, North Yorkshire
United Kingdom
YO30 4GD

+44 (0) 1904 343100     office
+44 (0) 1904 343101     fax

AMX South
6th Floor Salisbury House
London Wall
London
United Kingdom
EC2M 5QQ

+44 (0) 2076 529450     office
+44 (0) 8701 991661     fax

AMX Belgium
Boerenkrijglaan, 96a
B-2260
Westerlo
Belgium


+ 32 (0) 1454 2763      office
+ 32 (0) 1454 2766      fax

######################################################################
Attention:
This e-mail message is privileged and confidential. If you are not the
intended recipient please delete the message and notify the sender.
Any views or opinions presented are solely those of the author.

This email was scanned and cleared by NetIQ MailMarshal.
######################################################################

------------------------------------------------------------------------
----
--
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register
now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------
------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register
now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
AMX

AMX UK
Auster Road
Clifton Moor
York, North Yorkshire
United Kingdom
YO30 4GD

+44 (0) 1904 343100     office
+44 (0) 1904 343101     fax

AMX South
6th Floor Salisbury House
London Wall
London
United Kingdom
EC2M 5QQ

+44 (0) 2076 529450     office
+44 (0) 8701 991661     fax

AMX Belgium
Boerenkrijglaan, 96a
B-2260
Westerlo
Belgium


+ 32 (0) 1454 2763      office
+ 32 (0) 1454 2766      fax

######################################################################
Attention:
This e-mail message is privileged and confidential. If you are not the
intended recipient please delete the message and notify the sender.
Any views or opinions presented are solely those of the author.

This email was scanned and cleared by NetIQ MailMarshal.
######################################################################

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to