http://msdn.microsoft.com/en-gb/library/windows/desktop/aa368585%28v=vs.85%29
.aspx

INSTALLLEVEL is the property that defines the threshold beyond which features
arent installed. That doesnt change - 1 is the default. What changes (or
stays the same) is the *feature's* level, depending on the condition.

-----Original Message-----
From: Martin Johnson [mailto:mjohn...@mpjconsultancy.com]
Sent: Mon 1/21/2013 6:21 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Installing files for MS SQL folder only
ifSQLispresent
 
I must be missing something, I now have my feature level at 1 and my 
condition at 1000

    <Feature Id="SSISMSSQL" Title="SSIS Components" Display='expand' 
Level='1' ConfigurableDirectory='SQLINSTALLDIR'>
      <ComponentRef Id='SSISPipelineComponents' />
      <ComponentRef Id='SSISConnections' />
      <Condition Level='1000'>not ISSQLSERVERSERVICEINSTALLED</Condition>
    </Feature>


But from a verbose log it would appear that the level is still being set to 
1 even if ISSQLSERVERSERVICEINSTALLED is not set, because SQL is not 
installed.

MSI (s) (AC:D0) [17:22:31:737]: Dir (target): Key: SQLINSTALLDIR        ,
Object: 
C:\SQLINSTALLDIR\
MSI (s) (AC:D0) [17:22:31:737]: Dir (target): Key: DTS  , Object: 
C:\SQLINSTALLDIR\DTS\
MSI (s) (AC:D0) [17:22:31:737]: Dir (target): Key: CONNECTIONS  , Object: 
C:\SQLINSTALLDIR\DTS\Connections\
MSI (s) (AC:D0) [17:22:31:737]: Dir (target): Key: PIPELINECOMPONENTS   , 
Object: C:\SQLINSTALLDIR\DTS\PipelineComponents\
MSI (s) (AC:D0) [17:22:31:737]: PROPERTY CHANGE: Adding INSTALLLEVEL 
property. Its value is '1'.


I have proved I don't understand the INSTALLLEVEL, I have tried setting the 
feature to 1 and the condition to 2000 and also feature to 2000, condition 
to 1 and reversed the condition to <Condition 
Level='1'>ISSQLSERVERSERVICEINSTALLED</Condition>. And the INSTALLLEVEL 
remains at 1 and the hooky directory c:\SQLINSTALLDIR gets created

Can anyone recommend some reading material before my head explodes

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

From: "Peter Shirtcliffe" <pshirtcli...@sdl.com>
Sent: 18 January 2013 13:56

Your feature and condition both have level 1 which won't work  - the
condition causes nothing to change.
The default value of INSTALLLEVEL is 1. This means any feature set to level 
1
will be installed. To prevent installation, the feature level must be 
higher.
Keep the feature level as 1.
Set the condition level to something larger, say 10, and set the condition 
to
be 
not ISSQLSERVERSERVICEINSTALLED 

e.g.
<Condition Level='10'>not ISSQLSERVERSERVICEINSTALLED</Condition>

When sql is not found, the property will be blank and the condition will
evaluate to true, setting the feature's level to 10 which prevents
installation.
When sql *is* found, the property will be set to the registry value, the
condition will not be true and the feature's level will stay at 1 which 
will
allow installation.

-----Original Message-----
From: Martin Johnson [mailto:mjohn...@mpjconsultancy.com] 
Sent: 18 January 2013 12:06
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Installing files for MS SQL folder only if
SQLispresent

Thanks for that, it now writes to the correct place if SQL is installed.  
It now seems that the condition is not being applied correctly if SQL is 
not
installed and it is installing in c:\ISSQLSERVERSERVICEINSTALLED

<Feature Id="SSISMSSQL" Title="SSIS Components" Display='expand' Level='1' 

ConfigurableDirectory='ISSQLSERVERSERVICEINSTALLED'>
<ComponentRef Id='SSISComponents' />
<Condition Level='1'>ISSQLSERVERSERVICEINSTALLED</Condition>
</Feature>

Apologies for the numpty questions, but this is the first time I've had to
make my install very clever.

Martin

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

Subject: RE: [WiX-users] Installing files for MS SQL folder only if SQL
ispresent

Use ISSQLSERVERSERVICEINSTALLED as the directory ID rather than the name. 
Set
the Name as the default directory name
It's the same way as you'd use INSTALLDIR (if you're familiar with the
convention) but setting the value from a registry search instead of on the
command line.
If it doesn't work, check the registry value contains a full path. If it
doesn't, try adding directory entries surrounding the
ISSQLSERVERSERVICEINSTALLED element to provide the reset of the path.

-----Original Message-----
From: Martin Johnson [mailto:mjohn...@mpjconsultancy.com]
Subject: [WiX-users] Installing files for MS SQL folder only if SQL 
ispresent

I am attempting to set a property to a registry entry, I have looked at 
the
install log and it is set.

I am then attempting to write files to a subfolder of that property, what 
I
actually achieve is to write it to a subfolder of a folder name
ISSQLSERVERSERVICEINSTALLED, i.e. the property id rather than its value.

I am only expecting this to be done if the registry entry exists i.e. SQL 
is
installed, it is writing the files whether or not SQL is installed.

Hopefully the following snippets give enough information, any hints tips 
or
suggestions welcomed.

<Property Id="ISSQLSERVERSERVICEINSTALLED"> <RegistrySearch
Id="SQLInstalledInstances" Root="HKLM" 
Key="SOFTWARE\Microsoft\Microsoft SQL Server\100" Name="VerSpecificRootDir" 


Type="raw" />
</Property>

<Directory Id="MSSQL_SSIS" Name="ISSQLSERVERSERVICEINSTALLED">
<Directory Id="DTS" Name="DTS">
<Directory Id="PIPELINECOMPONENTS" Name="PipelineComponents"> <Component
Id="SSISComponents" 
Guid="ef1c1033-f78a-4505-a042-d10cd8395053">
<File Id="ID1" Name="1.dll" DiskId="1" KeyPath="yes" 
Source="..\..\API\DotNet\Assemblies\v3.5\1.dll" /> <File Id="ID2"
Name="2.dll" DiskId="1" KeyPath="no" 
Source="..\..\API\DotNet\Assemblies\v3.5\2.dll" /> </Component> 
</Directory>
</Directory> </Directory>

<Feature Id="SSISMSSQL" Title="SSIS Components" Display='expand' 
Level='1' ConfigurableDirectory='MSSQL_SSIS'>
<ComponentRef Id='SSISComponents' />
<Condition Level='1'>ISSQLSERVERSERVICEINSTALLED</Condition>
</Feature>

Thanks
Martin


-----------------------------------------------------------------------------
-
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to