Wix bootstrapping. Check if Sap Crystal reports is already installed - crystal-reports

I have tried with following registry searches
<util:RegistrySearch Root="HKLM"
Key="SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\"
Value="CRRuntime32Version"
Variable="CR32Version"
Format="raw"
Result="value"/>
<util:RegistrySearch Root="HKLM"
Key="SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\"
Value="CRRuntime64Version"
Variable="CR64Version"
Format="raw"
Result="value"/>
And I have used Install condition for the msi packages as shown below
<MsiPackage SourceFile="$(var.MyDir)\CRRuntime_64bit_13_0_9.msi"
InstallCondition="VersionNT64 AND (NOT (CR64Version >= 13.0.9))"
Permanent="yes"/>
<MsiPackage SourceFile="$(var.MyDir)\CRRuntime_32bit_13_0_9.msi"
InstallCondition="NOT VersionNT64 AND (NOT (CR32Version >= 13.0.9))"
Permanent="yes"/>
When I tried to install the exe generated with above settings I am getting the following error.
[1B0C:0A7C][2014-08-08T17:54:35]i000: Registry value not found. Key = 'SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\', Value = 'CRRuntime64Version'
[1B0C:0A7C][2014-08-08T17:54:35]i000: Registry value not found. Key = 'SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\', Value = 'CRRuntime32Version'
[1B0C:0A7C][2014-08-08T17:54:37]e000: Error 0x8007000d: Failed to parse condition "VersionNT64 AND (NOT (CR64Version >= 13.0.9))". Unexpected character at position 39.
When I checked manually opening the regedit and checked, I could find the CRRuntime64Version to 13.0.9.
I am really lost in solving this issue. It took me almost one day already trying to resolve this issue.
I also googled this issue and I did not get the relevant information.
Please help me the solution.

Use Win64="yes" in your registry search to tell it to search the 64-bit registry. Replace > with > in your condition to fix your other error.

Related

OpenCobol & PostgreSQL on Windows with Visual Studio

I'm currently facing a problem with this team of 4.
Using binaries I downloaded on kiska's site. I'm able to compile cobol to C and run it with cobcrun or compile it to an executable. However I can 't get opencobol to find the postgres commands.
Here is the strat of my cobol script :
identification division.
program-id. pgcob.
data division.
working-storage section.
01 pgconn usage pointer.
01 pgres usage pointer.
01 resptr usage pointer.
01 resstr pic x(80) based.
01 result usage binary-long.
01 answer pic x(80).
procedure division.
display "Before connect:" pgconn end-display
call "PQconnectdb" using
by reference "dbname = postgres" & x"00"
by reference "host = 10.37.180.146" & "00"
returning pgconn
end-call
...
the call PQconnectdb fail with module ont found : PQconnectdb
I noticed that if i rename the libpq.dll the error message change to can't find entry point. So at least I'm sure it can get my dll.
After digging into the code of the call method of the libcob library. I found it it was possible to pre load some dll using an environment variable COB_PRE_LOAD but sitll no results.
Here is what look the script to compile the cobol :
call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat"
set COB_CONFIG_DIR=C:\OpenCobol\config
set COB_COPY_DIR=C:\OpenCobol\Copy
set COB_LIBS=%COB_LIBS% c:\OpenCobol\libpq.lib
set COB_LIBRARY_PATH=C:\OpenCobol\bin
set COB_PRE_LOAD=C:\OpenCobol\libpq.dll
#echo on
cobc -info
cobc -free -o pgcob -L:"C:\OpenCobol" -llibpq.lib test_cobol\postgres.cob
call cobcrun pgcob
I don't see anything missing, I'm using the 64-bit binaries from kiska's site and use the 64-bit cl.exe from Visual Studio, Postgres is a 64 bit version too (checked with dependencyChecker).
I even tryed to compile the generated C from Visual Studio, same result, but I may miss something, I'm pretty rotten in C and never really had to manage DLL or use Visual Studio.
What am I missing ?
COB_PRE_LOAD doesn't take any path or extension, see the short documentation for the available runtime configurations. I guess
set COB_LIBRARY_PATH=C:\OpenCobol\bin;C:\OpenCobol
set COB_PRE_LOAD=libpq
Will work. You can omit the C:\OpenCobol\bin if you did not placed any additional executables there.
If it doesn't work (even if it does) I'd try to get the C functions resolved at compile time. Either use
CALL STATIC "PQconnectdb" using ...
or an appropriate CALL-CONVENTION or leave the program as-is and use
cobc -free -o pgcob -L"C:\OpenCobol" -llibpq -K PQconnectdb test_cobol\postgres.cob
From cobc --help:
-K generate CALL to <entry> as static
In general: the binaries from kiska.net are quite outdated. I highly suggest getting newer ones from the official download site or ideally build them on your own from source, see the documentation for building GnuCOBOL with VisualStudio.

Getting an error while upgrading an MSI application

I'm getting below error while upgrading one software on my Windows 2003 server.
"Error 1260 : Windows cannot open this program because it has been prevented by a software restriction policy. For more information, open event viewer."
I searched lot on internet and one thing I got to know that, this error occurs because of one Windows's security update, KB2918614. I uninstalled that update & tried upgrade of my product, it worked fine for me.
But my question is, without uninstalling that update how I can make my upgrade of software successful ?
Here are some logs that I'm getting while failure :
MSI (s) (E4:24) [10:39:07:097]: SECREPAIR: Hash Database: C:\WINDOWS\Installer\SourceHash{97353D18-281D-42B5-8855-21E08089EFB8}
MSI (s) (E4:24) [10:39:07:128]: SECREPAIR: CryptAcquireContext succeeded
MSI (s) (E4:24) [10:39:07:878]: SECREPAIR: filename: **********.msi Stored Hash Value:+VE6k8PVr******************RjSWBjatbw= Current Hash:jhsyK1CivGh*************V2MlyUZsICUx83w=
MSI (s) (E4:24) [10:39:07:878]: SECREPAIR: UAC not supported and could not take approval from user
MSI (s) (E4:24) [10:39:07:878]: SECUREREPAIR: SecureRepair Failed. Error code: 4ec4E6A3388
Finally I got the answer !!
There is one more update Microsoft provided to get rid from current security update KB2918614. Here is the Microsoft article
In this article they have mentioned some registry changes. After doing those change my issue got resolved. Here are those registry changes :
Locate and then click the following subkey in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer
On the Edit menu, point to New, and then click DWORD Value.
Type SecureRepairPolicy for the name of the DWORD, and then press Enter.
Right-click SecureRepairPolicy, and then click Modify.
In the Value data box, type 2, and then click OK.
Locate and then click the following subkey in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer
On the Edit menu, point to New, and then click Key.
Type SecureRepairWhitelist for the name of the key, and then press Enter.
Double-click the SecureRepairWhitelist key to open it.
On the Edit menu, point to New, and then click String Value. Create String Values that contain the product codes (including braces {}) of the products that have to be added to the Safe Recipients list.

Crystal report fails to load when application is deployed in IIS

I copied the packageTmp over to the inetpub/wwwroot, then added a website and included it as my path.
Installed the crystal report runtime, CRRuntime_32bit_13_0_4 - but still did not work.
I also have crystalreportviewers13 folder in wwwroot/aspnet _client/systemweb/4_0_30319
This is the error I encountered when I go to the page with crystal report. May i know where the path is defined? This problem occurs when I deploy my application in IIS.
Exception Details: System.Runtime.InteropServices.COMException: Invalid file name.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[COMException (0x800001fb): Invalid file name.]
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +95
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +270
[CrystalReportsException: Load report failed.]
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +333
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +877
CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob) +1183
CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport() +113
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type) +53
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataTable dataTable)
....
This is the .cs code behind the .aspx code,for reportxx.rpt
m_reportxx = new reportxx();
CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
DataTable dt = data.GetReport();
reportxx.SetDataSource(dt);
CrystalReportViewer1.ReportSource = m_reportxx;
I tried this and it worked while debugging in the visual studio environment.
I know this is an old post. but For anyone still looking for the answer:
You need to register crystal reports in page markup
<% # Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
Set the property 'Copy to Output Directory' of the report to 'Copy always'
the path of the file in the crystalreportsource will be ~/bin/YOURFOLDER/YOURFILE
<CR: CrystalReportSource ID ="CrystalReportSource1" runat ="server">
<Report FileName="~/bin/oilmovement/rptOMDayEnd.rpt">
</Report>
</CR: CrystalReportSource>
Now the report should work
In my case, I found by 2 days the error and not see nothing wrong...Finally I used Procmon.exe (https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx?f=255&MSPPError=-2147217396) to trace the error.
I Filter by Result + is not + SUCCESS, I tried to run again the web application and appear the Error: ACCESS DENIED to Folder X.
I give the right permission to X folder and works fine.

Use AppCmd to LIST CONFIG in APPHOST only

I have a requirement to use powershell to configure IIS7.5 on WebApplications that have not yet had code deployed (possibly at all, possibly old/broken web.configs exist) to the file system. I would like to be able to do this all at the APPHOST level. (Note at the bottom about use of Powershell > AppCmd).
I can SET all the values properly, however, being somewhat diligent, I like to also validate the values were set properly by retrieving them after setting.
Here's the scenario:
I can set this value using AppCmd so the setting is applied at the APPHOST level using the /Commit:APPHOST flag. However, I havent found a way to READ the values exclusively at the APPHOST level.
Setting the Code is successful:
C:\Windows\System32\inetsrv\appcmd.exe set config "webSiteName/webAppName" -section:system.webServer/security/authentication/anonymousAuthentication /enabled:"True" /commit:apphost
However, I cant find a way to read the values using AppCmd (or Powershell):
Running the following AppCmd returns an error due to the broken pre-existing web.config in the folder (the specific error is unimportant, as it is reading the WebApp's web.config instead of the ApplicationHost.config/APPHOST):
C:\Windows\System32\inetsrv\appcmd.exe list config "MACHINE/WEBROOT/APPHOST/webSiteName/webAppName" -section:system.webServer/security/authentication/anonymousAuthentication
ERROR ( message:Configuration error
Filename: \\?\c:\inetpub\wwwroot\webSiteName\webAppName\web.config
Line Number: 254
Description: The configuration section 'system.runtime.caching' cannot be read because it is missing a section declaration
. )
Note: I would prefer to do this all in Powershell instead of using AppCmd, so if anyone has the syntax for modifying the APPHOST settings for anonymousAuthentication section of a WebApplication, that lives under a Website, from inside Powershell (Get-WebConfiguration seems to only use the WebApp web.config), that would be totally awesome and much appreciated!
Here's how to do this in PowerShell:
[Reflection.Assembly]::Load(
"Microsoft.Web.Administration, Version=7.0.0.0,
Culture=Neutral, PublicKeyToken=31bf3856ad364e35") > $null
$serverManager = New-Object Microsoft.Web.Administration.ServerManager
$config = $serverManager.GetApplicationHostConfiguration()
$anonymousAuthenticationSection = $config.GetSection("system.webServer/security/authentication/anonymousAuthentication", "simpleasp.net")
Write-Host "Current value: " $anonymousAuthenticationSection["enabled"]
# Now set new value
$anonymousAuthenticationSection["enabled"] = $true
$serverManager.CommitChanges()

Unable to install a VSTO excel 2003 AddIn

I developped a VSTO SE Excel 2003 add in.
When launching and debuging the add in from visual studio, it works well.
But when I try to deploy it from my own install it never works.
To sum up, here is my install process:
the files are copied at the right location
I register the addin:
HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\
with the appropriate values (Default, CommandLineSage, Description, FriendlyName, LoadBehavior, Manifest).
I also add entries in
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ (with CLSID key including an UUID)
And HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
with InprocServer32 (with the manifest name and path, the addinloader.dll fullpath), ProgID (with the assembly name (without extension)), Programmable and VersionIndependententProgID (with the assembly name too).
I set the fulltrust policy to the url of every assemblies using caspol -m -ag "xxx" -url "MyUrl\Assemblies.dll" FullTrust -name "name"
Do I miss something ?
In the deployment machine, check whether the following are available:
Currect version of VSTO Runtime
Office 2003 Primary Interop Assesmblies
regards,
yenkay...
A good way to debug VSTO installation/loading issues is to have VSTO show you all errors. To do that, create an environment variable called VSTO_SUPPRESSDISPLAYALERTS with the value 0, reinstall/repair your addin, then try running Excel again.
It looks like the problem is with your registry keys. Check out the following link:
http://msdn.microsoft.com/en-us/library/bb386106.aspx
Your Software\Classes and Software\Microsoft entries should be under the same key, either HKCU or HKLM. If you have one under HKCU and the other under HKLM, it messes up the addin.
So I think the registry entry HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\ should be HKEY_LOCAL_MACHINE\Software\Microsoft\Office\Excel\Addins.
HTH...