Failed to install WPF in client PC - 0x80073CFD - wpf

I have an internal WPF application to be installed in client's PC.
Usually I start with the installation of these three dependency files
Microsoft.NET.CoreFramework.Debug.2.2.appx
Microsoft.NET.CoreRuntime.2.2.appx
Microsoft.VCLibs.x64.Debug.14.00.appx
Then, I need to install the appxbundle file to complete the installation.
But this client's PC don't have app installer and I was told to run PowerShell as administrator for installation. The command I used was
Add-AppxPackage -Path "file location/file"
I managed to install the dependency files but I couldn't install the appxbundle file.
The error appeared was as below
Deployment failed with HRESULT: 0x80073CFD, A Prerequisite for an
install could not be satisfied
How should I go about solving this error? For it only happens when the installation is done using PowerShell.

Related

Install SQL Server LocalDB on Server Core 2019 in Docker container

Within a Docker container (image = mcr.microsoft.com/windows/servercore:ltsc2019), I have downloaded the SQL Server Express 2019 installer.
I have successfully downloaded the LocalDB msi with:
SQL2019-SSEI-Expr.exe /Action=Download /MediaType=LocalDB /Quiet
The file is downloaded to:
C:\Users\ContainerAdministrator\Downloads\en-us\SqlLocalDB.msi
However... running msiexec fails without any error messages. After navigating to the path mentioned above, I execute:
msiexec.exe /qb /i .\SqlLocalDB.msi IAcceptSqlLocalDBLicenseTerms=YES
The command immediately drops back to the command line after zero delay. Nothing ever gets installed.
What am I missing?
Edit:
I'm trying to use LocalDB because this will eventually be an Azure Pipelines build agent. We use Redgate's "SqlChangeAutomation" powershell tools which uses LocalDB.
Edit 2:
Not sure if this is progress yet, however... I mucked around with msiexec logging for a bit and discovered I could run it with the /a flag instead of /i and get it to successfully install.
msiexec.exe /qn /a SqlLocalDB.msi IAcceptSqlServerLicenseTerms=YES /L*V "C:\installers\SQL\install.log"
Unfortunately, however, upon navigating to C:\Program Files\Microsoft SQL Server\150\tools\binn and running SqlLocalDB.exe info, I get this:
Call to LocalDBFormatMessage failed. Error code returned:
2311389462.
Error in LocalDBFormatMessage! Error code returned:
2311389462.
SQL LocalDB requires the Visual C++ redistributables, else many things won't go right (my problem was that SqlWriter service wouldn't create during install at all).
EDIT: it seems that I can use chocolatey to install the vc_redist and a older version of localdb. (Filing ticket to ask for the sqllocaldb package to be updated to 2019) so that would simplify things for most people. Keeping raw arguments/commands below just in case though.
My powershell steps for exact arguments (assuming you collect required files):
start-process .\VC_redist.x64.exe -Wait -ArgumentList #('/install','/norestart','/passive') Note I am using the redist from https://aka.ms/vs/16/release/vc_redist.x64.exe which should be the 2019, but spattering of comments say I should have used either the one in the SQL installer package, or some 2015 version. However neither of those "worked" for me in the containers, but that could have been me invoking them wrong. Besides which, further packages I need to install want 2019 anyways.
start-process msiexec -Wait -ArgumentList #('/i','SqlLocalDB.msi','/qn','/norestart','/L*V','install.log','IACCEPTSQLLOCALDBLICENSETE RMS=YES') Note that "/i" instead of "/a" worked correctly at this point, and the "/norestart" option. This was found from the choco localdb command source.
Useful powershell snippet to get some event logs (change "System" for "Application" for others) that helped me puzzle things out since no event-viewer in container: get-eventlog -LogName System -After (Get-Date).AddMinutes(-5) | ? {-not $_.Source.Contains("DCOM") } |?{-not $_.Message.Contains("depends on the Background Tasks Infrastructure Service")}| Format-List This and inspecting the "install.log" line-by-line from the SqlLocalDB.msi were what eventually led me on the right track.
I was trying to create images for pipelines too, installing via chocolatey, so I simply installed the chocolatey package for the redistributable too and that resolved the issue:
choco install vcredist-all -y
choco install sqllocaldb -y

PowerShell v5.1 - Loading SqlServer Module does not load Read-SqlTableData or Write-SqlTableData, but Loads All Other Commands

On my Windows Server 2012 R2 server, the same server as my SQL Server service instance is running, I had upgraded to PowerShell v5.1. I proceeded to load the SqlServer module v21.1.18121. All commands loaded fine except for Read-SqlTableData and Write-SqlTableData. The darndest thing! When I load the same SqlServer module on my Win10 development box, all commands are present. I suspect something like a version problem with the available .Net framework or some such, or a collision with SQL Server's modules. Anyone with thoughts on this one?
The SqlServer module comes with the SQL Server installation and thems to be in a different version.
Module location on a SQL Server
(Get-Module -l SqlServer).path
-> C:\Program Files\WindowsPowerShell\Modules\SqlServer\SqlServer.psd1
Module location from PowerSehll gallery
(Get-Module -l SqlServer).path
-> C:\Program Files\WindowsPowerShell\Modules\SqlServer\21.0.17279\SqlServer.psd1
You can enforce PowerSell to load a module from specific location
Install-Module -Name SqlServer
Import-Module -Name (Get-Module -l SqlServer).path -Verbose
I've just encountered the same problem. I've tried many things, but I think the problem stems from having the module SQLPS installed alongside SqlServer module. (SQLPS being an older version of sqlserver).
The steps I used: (probably a little excessive)
Close every application that may have a reference to Powershell
modules. For me this list included Visual Studio, SSMS, SQL Agent,
and of course all Powershell cmd and/or IDE.
Open a Administrator PowerShell command shell.
execute:
Uninstall-Module sqlps
Uninstall-Module sqlserver
Check the Powershell modules folder to make sure you've cleared the modules.
The place to look is:
ls "c:\program files\WindowsPowerShell\Modules"
Both of the folders "sqlps" and "sqlserver" should be missing or empty.
Now re-install sqlserver module:
Install-Module sqlserver
Check that you have the Write-SqlTableData:
Get-Command -module sqlserver
In case you suspect you have an error with versioning: I have tried and tested sqlserver module versions: 21.1.18218 & 21.0.17099

Powershell sql server module 2017 manual install

Just installed sql server 2017 RTM. After that I installed SSMS version 17. Funny enough this won't install the powershell module but you have to install it from PowerShell Gallery. Now my servers of course (being an enterprise environment) have no direct connection to the internet and not even the management computers in that domain have. From the Powershell Gallery website I was not able to manually install the powershell module. Question is do anybody here managed to have latest sql server powershell module installed for sql server 2017?
I'm not in an environment to test this but one method would be to install the module on a computer/server that does have access to the internet, download and install it there, locate the module, and then copy it to the other server and import it. So, something like:
On the other computer (with internet access):
Install-Module -Name SqlServer
(Get-Module -ListAvailable SqlServer).Path
Go to the path and copy the file(s) to the same location on the other server. Then, on the other server, and run:
Import-Module -Name SqlServer
This assumes that both hosts are running the same version of Powershell; or at least compatible ones.

Creating a MSI package with batch file

we have a requirement to uninstall an application from windows machine.I have created a batch file to with uninstall commands,converted the batch file into a exe and by using MSI package installer created a package.
When i tried to install this other machine this was found as virus/Spyware.
Is this because of bat file in the exe?
I would assume this is due to the tool you used to create the EXE file with. Other than that you can take a look at various ways to uninstall MSI files.
I don't know what kind of network you are on, but normally an uninstall like this is best done via a deployment tool, WMI, PowerShell or similar. There are many ways.

Can deb packages from one machine be installed in another?

Install python-netinterfaces on machine1 using apt-get
Copy the python-interfaces deb package cached in /var/cache/apt/archive from machine to machine2
Change the /etc/apt/sources.list to point to the directory where the package is copied in machine2
Run teh following command
sudo apt-get install python-interfaces
It inturn tries to install python-chardet-whl
and I get the error
warning: the following packages cannot be authenticated!
If I install the python-chardlet-whl from command line it fails with the authentication error message. however, it passes with --force-yes message.
I searched in the web for solutions and tried some suggestions like apt-key update, but nothing worked.
Is it possible to install package installed from one machine in another?
note: Both have same hardware and OS/other-software is installed is same
Are you sure destination machine has same repository list as source machine?
apt-cache showpkg python-chardet-whl
After adding repository to destination machine it would show you repository that package belongs to
Then you need to run:
sudo apt-get update
To update the repository list, by doing this you problem should fix
Also make sure that package does not need any dependency that is not installed on the system.

Resources