MSI installer. Error 1603 - c#

I am using MSI installer to upgrade my service from one version to another in Windows 7 and in windows server. The upgrade in windows 7 machine is working fine but it is failing in Windows Server 2012.
Here is what I am doing -
I am stopping the old release service using C# code.
NativeWinServiceMethod.ControlService(service, NativeWinServiceMethod.SERVICE_CONTROL.STOP, ref lpServiceStatus);
Then removing all the files from installed path using MSI installer exe.
And finally installing the new version again.
This upgrade works fine in windows 7 but failing in windows server.
MSI log shows 1603
I know the cause of it now but need a solution for it -
Cause -
MSI installer is uninstalling the previous version and starting to
install the new version but before the previous version could be
removed from the registry. Since service removal from registry is
taking time - new version service installation is failing.

While installing on Windows If you get 1603 error that maybe means you have failed to install visual studio redistributable package install problem. Maybe uninstall already installed version and try install new again can be fix this problem.

Related

Error with Windows App Certification Kit (HighVersionLie failure)

I'm experimenting the following error when I run the Windows App Certification Kit on a brain new C# Universal App: "Task failed to enable HighVersionLie".
Windows 10 1709 (Build 16299.125)
Visual Studio Pro 2017 (15.5.4)
New project C# Universal App (no additional code added to the project)
Min SDK version: Windows 10 (10.0; Build 10240)
Target SDK version: Windows 10 Fall Creators Update (10.0; Build 16299)
Windows App Certification Kit: 10.0.16299.15
If I generate the appxbundle, the certification kit fails with error "Task failed to enable HighVersionLie".
If I copy this appxbundle on another Windows 10 instance with the same certification kit and pass the test again, there is no error (the HighVersionLie passed successfully)
The "HighVersionLie" test checks to see if your app will crash if it is told that it is running on a new, higher version of Windows (a version which has not been released yet).
I'm guessing that the machine you are seeing the problem on has a problem running this test, and it is not the app's problem.
If you run Visual Studio as Administrator, and then run the tests, do you still see the problem?
You might also check for a corrupt installation by running sfc /scannow from a command prompt, or reinstalling Visual Studio
Finally, you might try running Event Viewer, and checking the "Application" log to see if there are any Errors around the time you ran your certification test. If you see an error here, Google the description to find out what's wrong.
If you still think it is a problem with the app, you might check out my HighVersionLie answer here.

unable to install or run C# application on client PC

I have developed a desktop application in c# & SQL server 2012 using Visual Studio 2013. I have included the reference for Microsoft.VisualStudio.DebuggerVisualizers and set copy local : true.
The application runs perfectly on client systems with windows 8, 10.
But its showing this error while installing on a windows 7 system.
- OS Windows 7 Ultimate
- already installed .NET Framework 4.5
- installed Report Viewer.exe 2012
- installed report viewer.msi 2010
- installed sqlclr types
- the system doesnt have any microsoft c++ redistributable , i am not sure whether it has any impact.
I checked in the assembly folder, but couldnt find the Microsoft.VisualStudio.DebuggerVisualizers.dll
Am I missing any prerequisites here? How to solve this issue so that i can install the application
Error Message
It needs the Microsoft.VisualStudio.DebuggerVisualizers.dll in the global assembly cache. The GAC is the area where libs are placed which can be accessed from all of the system.
It's kinda a ugly fix but you could place this lib in the same or subdirectory of the same directory where the application is.
Is it possibly that you haven't installed VS on that Win7 machine but on the others?
Unintentionally the Microsoft.VisualStudio.DebuggerVisualizers.dll had been included in the project reference. And in the client system the specified dll could not be found even after trying to install it. Hence I removed it from reference and then it worked perfectly fine without any issues. I guess instead of report visualizer i have included debuggervisualizer. It was a manual error.
Thank you for your support

WCF Service setup does not uninstall previous version

I have a setup project which gives me a .msi file
Installation attempts fail on this machine, which already had an earlier version installed. A MessageBox reports an error and asks me to remove it from Add/Remove programs.
I have set RemovePreviousVersions = true
Using an updated version it now installs without error, however the referenced dll has not updated to the new version.
What should i do, so that the installer either repairs or uninstalls and reinstalls it automatically?
Please help.

UWP (Windows 10 APP) - appcert.exe crashes before my app get tested

I've developed an simple and small Universal Windows App that uses EF7 and SQLite. The app builds normally and it runs perfectly from Visual Studio. I also can run it directly from Windows 10 in the start menu after the I side loaded it (once the app package is generated).
My problem is that I can't test the app after it's package is generated because of an error on appcert.exe.
If I generate app package to x86 when launching windows app certification from visual studio right after the package is generated I get the error "the appxbundle could not be implanted" even before the test starts.
If I generate app package to x64 when launching windows app certification from visual studio right after the package is generated the test starts normally but before it's done I get the following error: "an unhandled microsoft .netframework exception occurred in appcertui.exe".
The appcert.exe crashes and does not tell me why.
I've searched in google and I've looked at windows log event but found nothing helpful.
I just don't know what to do. My app is finished, I can generate it´s package but I can´t generate the ".appxupload" because of this error I mentioned.
Can someone help me?
The file C:\Program Files (x86)\Windows Kits\10\App Certification Kit\binaryinfo.dll is CLSID {3866CD68-0FC3-4563-8888-E107295BC485} on my machine.
I was able to reproduce your crash by unregistering binaryinfo.dll on my machine and clicking "Validate Store App".
Maybe a fix for your issue to do register this dll (maybe all of them?).
From an administrator/elevated command prompt
regsvr32 "C:\Program Files (x86)\Windows Kits\10\App Certification Kit\binaryinfo.dll"
How your machine got into this state...unknown.
I've made a fresh install of Windows 10 and its SDK in a virtual machine on Virtual Box. The appcertui.exe is running fine and my app was tested successfully.
It might be a problem in the installation of the .NET Framework since I updated from Windows 7 to Windows 10.
I will try to completely reinstall both .NET Framework and the SDK to solve this issue. If none of this works I will reinstall Windows 10 from scratch on my computer.

Fresh install on new pc visual studio sql error

I have just installed visual studio on a new windows 8.1 PC. When I try to run a new MVC project I get the following error when registring in the default mvc framework:
"Your sql server installation is either corrupt or has been tampered with (unknown package id)."
This is a brand new install and I have tampered with nothing. I saw it typically has to due with renaming your computer, but since this is a fresh install it shouldn't be an issue.
Please try the below mentioned options.
Change the name of the computer where it was originally might sort
this error.
Update the SQL server to the latest version and verify if it is compatible with installed visual studio.
If above option fails, then re-install SQL Server.
This error occurred because it might have got installed alongside with visual studio. Better install the version that is compatible with your system.
http://blog.sqlauthority.com/2009/05/28/sql-server-fix-error-sqldumper-library-failed-initialization-your-installation-is-either-corrupt-or-has-been-tampered-with-please-uninstall-then-re-run-setup-to-correct-to-correct-this-problem/
Fix/Workaround/Solution:
Go to Add/Remove Program in windows Control Panel
Remove “microsoft SQL server vss writer” program
Reboot the computer.

Categories