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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top