Installshield prq target runtime - installshield

I am building a setup file that requires me to deploy SQL CE 4 using installshield.
What do I need to add to my prq file to only install the required runtime version of sql ce. Currently when I try to run the setup wizard I am getting an error if I try to install the x64 version on a x86 machine and also the same when the machines are reversed.
My files look like this
<?xml version="1.0" encoding="UTF-8"?>
<SetupPrereq>
<files>
<file LocalFile="<ISProductFolder>\SetupPrerequisites\SQL CE4\SSCERuntime_x64-ENU.exe" CheckSum="A417082ECAEDD95AFB41F73DC140C350" FileSize="0,2621240"></file>
</files>
<execute file="SSCERuntime_x64-ENU.exe" cmdlinesilent="/q /norestart"></execute>
<properties Id="{F7BF54C1-CA2C-4410-98DB-480769CE6547}" Description="This prerequisite installs the Microsoft SQL Server Compact 4."></properties></SetupPrereq>
And
<?xml version="1.0" encoding="UTF-8"?>
<SetupPrereq>
<files>
<file LocalFile="<ISProductFolder>\SetupPrerequisites\SQL CE 4\SSCERuntime_x86- ENU.exe" CheckSum="0A55733CF406FBD05DFCFF5A27A0B4F7" FileSize="0,2379544"></file> </files>
<execute file="SSCERuntime_x86-ENU.exe" cmdlinesilent="/q /norestart"></execute>
<properties Id="{6BD58ED0-FA9A-44BC-A201-B9D6128459AD}" Description="This prerequisite installs the Microsoft SQL Server Compact 4."></properties>
</SetupPrereq>
ANy suggestions?

It doesn't look like you've specified any platform or OS conditions on that prerequisite. Try adding those so each prerequisite only runs on the correct system. You may also want to add regular "existence" conditions that ensure the prerequisite is only run when it's not already installed.

Related

"Error 87 the all option is not recognised in this context" using DISM to enable IIS

I am trying to use a bat to enable IIS to run an asp.net application on a windows 7 (professional) 64bit machine and seem to be constantly encountering this issue. I am running the bat file as an administrator. The entry in my bat file I am using is as follows:
%systemroot%\sysnative\dism /online /enable-feature /all /featurename:IIS-ASPNET45
According to the documentation I have read the all switch should enable all parent features needed to needed to run ASP.net 4.5. I've also tried using just IIS-ASPNET and IIS-ASPNET40 all received the same error.
Error 87 the all option is not recognised in this context
I originally tried to do each feature needed to run my application individually but encountered similar issues.
You have 2 problems. The first is that the /all flag was introduced in Windows 8, and so nonexistent in Windows 7. The second is that the IIS-ASPNET45 feature also isn't a part of Windows 7, because .Net 4.5 came out after it did.
What you need to do is:
Enable the specific features you need for IIS explicitly using DISM:
dism.exe /NoRestart /Online /Enable-Feature /FeatureName:IIS-ApplicationDevelopment /FeatureName:IIS-CommonHttpFeatures /FeatureName:IIS-DefaultDocument /FeatureName:IIS-ISAPIExtensions /FeatureName:IIS-ISAPIFilter /FeatureName:IIS-ManagementConsole /FeatureName:IIS-NetFxExtensibility /FeatureName:IIS-RequestFiltering /FeatureName:IIS-Security /FeatureName:IIS-StaticContent /FeatureName:IIS-WebServer /FeatureName:IIS-WebServerRole
Register ASP.Net 4.5 (assuming .Net 4.5 is already installed):
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe /i
ERROR_INVALID_PARAMETER
87 (0x57)
The parameter is incorrect.
The /all flag is not recognized as a valid parameter.
dism /online /enable-feature /featurename:IIS-ASPNET /all
DISM # MSDN
See l3arnon's answer.

How can I check whether with ASP.NET 4 is registered to run in IIS 7.5?

How can I check whether with ASP.NET 4 is registered to run in IIS 7.5?
There must be some way to determine this for sure, other than running
aspnet_regiis -i
from within the framework's folder.
I don't need to check this programmatically, just via IIS Manager or the commend line. I have an .NET page that is returing a 500 error, which I have determined could be due to ASP.NET 4 not being registered with IIS.
However, I want to be certain before I make changes to the server configuration.
Try to run aspnet_regiis with parameter -lv, i.e.:
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -lv
This will give you the following output:
Microsoft (R) ASP.NET RegIIS version 4.0.30319.34209
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved.
2.0.50727.0 C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll
4.0.30319.0 C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll
4.0.30319.0 C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
In this example, you can see that v4.0.30319.0, 32 and 64 bit dll's, are installed.
To install the latest version, for example after applying a .NET Framework update, use
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -iru
Note: On 64 bit IIS servers, you need to use "Framework64" instead of "Framework" in the paths above. Strangely, I found on some servers with 64 bit "Framework" in the path worked, on others I had to use "Framework64" - simply try it out. If the registration does not work, run it again with "Framework64" in the path, it does not harm. In one case, I had to change the path using cd C:\Windows\Microsoft.NET\Framework, then I typed aspnet_regiis -iru to make it finally work.
You mentioned that you need to check it programmatically: The command above can be used in a batch file, and via this article you can find the string "4.0.30319.0" in the output (provided you're using "aspnet_regiis -lv > outputfile.txt" to write the output into a text file).
appcmd list config /section:globalModules /text:[name='ManagedEngine'].image

How to deploy 64-bit version of DLL on Azure, but use the 32-bit version on dev boxes

My business partner and I are co-developing a web app that's deployed on Azure. My box is based on 64-bit Windows 7, but my partner is using 32-bit Windows 7.
From within the VS2010 IDE when I added a reference to 'ieframe.dll' from my System32 directory (64-bit on my box), the IDE actually brought over the SysWoW64 (32-bit) version of the DLL.
Both dev boxes work perfectly with the 32-bit WOW version of 'ieframe.dll', but when we deploy to Azure we're getting a EntryPointNotFoundException when making an Interop/DllImport call into 'ieframe.dll'. So it seems like Azure wants to have the 64-bit version.
How can we deploy the 64-bit version to Azure but keep using the 32-bit version on our dev boxes?
EDIT: Obviously, we can do this manually by copying 64-bit 'ieframe.dll' somewhere and then manually place it in the 'bin' directory, but is there a better best-practice way to do this in Azure?
EDIT #2: For this scenario, we ended up changing the node for Azure from osFamily="1" to osFamily="2". Doing this installs Windows Server 2008 R2 which includes IE8 (rather than IE7 in Windows Server 2008 SP1). No need to mess with 32 versus 64 bit versions or manually copy DLLs up to the server.
If you are always deploying to Azure from a 64-bit machine, you can alter the project file to copy the correct DLL to the bin folder at build time based on the processor type of the machine performing the build. This works great for us because we deploy to Azure from a 64-bit build server. If this sounds like a good solution, follow these steps:
1 - Create an external lib folder that contains two sub folders named 32 and 64.
2 - Place the 32-bit version of the DLL in the 32 folder and the 64-bit version in the 64 folder.
3 - Open the offending project file in a text editor.
4 - Add the following node to the project file just after the ItemGroup that conatins the "reference include" items. This will copy the correct DLL based on system supplied environment variables:
<ItemGroup>
<DllToCopy Condition=" '$(PROCESSOR_ARCHITECTURE)' == 'x86' And '$(PROCESSOR_ARCHITEW6432)' == '' " Include="..\ext-lib\32\mydll.dll" />
<DllToCopy Condition=" '$(PROCESSOR_ARCHITECTURE)' == 'AMD64' Or '$(PROCESSOR_ARCHITEW6432)' == 'AMD64' " Include="..\ext-lib\64\mydll.dll" />
</ItemGroup>
5 - Finally, alter the project's BeforeBuild target like so:
<Target Name="BeforeBuild">
<Copy SourceFiles="#(DllToCopy)" DestinationFolder="$(OutputPath)" />
</Target>
Another option would be to copy the correct DLL to the bin folder based on a build configuration (less ideal). For example, if you had a build configuration named Production you'd follow the steps above, except step 4 would contain this:
<ItemGroup>
<DllToCopy Condition=" '$(Configuration)' != 'Production' " Include="..\ext-lib\32\mydll.dll" />
<DllToCopy Condition=" '$(Configuration)' == 'Production' Include="..\ext-lib\64\mydll.dll" />
</ItemGroup>
Yet another (and even less ideal) option would be to copy the 64-bit version of the DLL to the bin folder using an Azure startup task.
Hope this helps.

Check IIS6 Meta data in windows server 2008 x64

when I check if IIS6 metabase has been installed , in Window server 2008 x64 enterprise Edition.
use those code :
<Property Id="IIS_METABASE_COMPAT">
<RegistrySearch Id="CheckIISMetabase" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp\Components" Name="ADSICompatibility" Type="raw" />
</Property>
<Condition Message="IIS 6 Metabase Compatibility feature must be installed">
Installed OR ((VersionNT < 600) OR IIS_METABASE_COMPAT)
</Condition>
whether I installed the IIS6 MetaBase or not, it always say "IIS 6 Metabase Compatibility feature must be installed",I have checked ,the registKey is exist.is Wix support this Windows Version? This one already reported by some one in the bug list. please check the below url for that bug.
http://sourceforge.net/tracker/index.php?func=detail&aid=3126222&group_id=105970&atid=642714
Please suggest some solution
You're probably looking into the wrong place in the system registry. If your package is x86 (see Package/#Platform attribute), and you're installing on a 64-bit (according to your question), the RegistrySearch will look 32-bit registry. See RegistrySearch/#Win64 attribute for more details.

Installshield installation ask the user to have iisadmin on a machine with iis7 installed

I am creating an installation that is adding a web site to IIS. But when I am trying to run the installation on a machine with IIS 7 installed and IIS 6 compatibility mode not installed, it fails the installation with:
Error 1920.Service IISADMIN (IISADMIN) failed to start. Verify that
you have sufficient privileges to start system services
If I install the compatibility feature it fixes the problem and the installation succeeds.
I want to know if there is a way to not install this feature on IIS 7.
Or if it must be installed - how can I install it automatically?
btw, I have installShield 2011 Professional.
Eventually what I did is to run as custom actions this lines
dism /online /enable-feature /featurename:IIS-IIS6ManagementCompatibility
dism /online /enable-feature /featurename:IIS-Metabase
and use as condition Not Installed and IIS_VERSION > "#6"
Thanks for Cosmin Privu help
Ben
You can try adding the compatibility fix as a custom prerequisite to your package:
http://kb.flexerasoftware.com/doc/Helpnet/installshield12helplib/SetupPrereqEditor.htm
For example you can create a custom EXE which uses pkmgr.exe to install the IIS-IIS6ManagementCompatibility feature (it's like installing it from Control Panel).
It can be configured to install only when it's not found and only if IIS 7 is installed. This way you can make sure that the service can always be started for IIS 7.

Resources