Domanda

We're setting up an automated build process using Teamcity

We need to have ABCPDF install itself automatically on each server, I'd like to be able to do this from the command prompt/powershell?

Has anyone done this?

È stato utile?

Soluzione

Figured it out! Need to run powershell in 32bit mode for this to work.

$abcPdfPath = "C:\temp\abcpdf\ABCpdf.dll"
[Reflection.Assembly]::LoadFrom($abcPdfPath)

if ([WebSupergoo.ABCpdf9.XSettings]::InstallSystemLicense("cd9b5c07fb69sf2bf57c0a04d9bca58b10c44889c9fb197984e592f49addfce5ec5fe85d7b9205bc"))
{
    "Successfully Installed"
}
else
{
    "Failed"
}   

EDIT

Teamcity runs in 64bit mode powershell which caused problems with the above script. There are two ways of getting around this. Once is to launch a 32bit version of powershell from powershell running the script. Alternatively; the approach we took was to create an executable with the above command and run that from powershell. This worked nicely.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top