Generate project installation package using command line

I can create the Transfer.pil just fine:

C:\BrAutomation\AS48\Bin-en\BR.AS.Build.exe C:\Projects\Test\Test.apj -c TestTS17 -o "C:\Projects\Install Test" -buildRUCPackage

But this is as far as I can get next:

C:\BrAutomation\Pvi\V4.8\Pvi\Tools\PVITransfer\PviTransfer.exe -GenerateInstallPackage -"C:\Projects\Install Test\TestTS17\5PC900_TS17_00\RUCPackage\Transfer.pil"

Which produces:

I can’t figure out how to add the Destination directory and Error handling to the command line so it can start automatically. Everything I have tried produces errors. And information in the Help has not been helpful. Anyone know how to do this?

Hello and welcome,

should be possible according to the Automation Help.

Which help entry are you referring to?

What goal are you trying to achieve? Is a InstallationPackage the component you need? Or do you want to generate a Project Installation Package?

BR Fabian

Fabian,

Thank you. While writing up my reply I realized I was pursuing the wrong thing. I had not realized there was a difference between an Installation Package and a Project Installation Package. I am trying to create and a Project Installation Package.
B&R Online Help

I will update the title of my question.

It is easy to create manually through AS via “Generate Project Installation Package”. Which we use to send updates to our customer that they then copy onto a USB stick and install on the control. And this works fine. But we are now trying to automate our build process.

In my AS4.8 Help I would have assumed I needed to use CreatePIP, but the online help looks like the command should be OfflineUpdate:
B&R Online Help

Regardless, I am still struggling to get either command to work.

I have tried both of the following commands (plus some variants thereof):

C:\BrAutomation\Pvi\V4.8\Pvi\Tools\PVITransfer\PviTransfer.exe -CreatePIP -"C:\Projects\Install Test\TestTS17\5PC900_TS17_00\RUCPackage\RUCPackage.zip", -"DestinationDirectory='C:\Projects\Install Test'"
C:\BrAutomation\Pvi\V4.8\Pvi\Tools\PVITransfer\PviTransfer.exe -OfflineUpdate -"C:\Projects\Install Test\TestTS17\5PC900_TS17_00\RUCPackage\RUCPackage.zip", -"UsbStick", -"DestinationDirectory='C:\Projects\Install Test'"

And they just open the Runtime Utility Center and do nothing.

What am I missing to get this to work?

Hello,

I did not see that you want to use the Runtime Utility Center directly from the command line which I think is not possible. At least I am not aware of that.

What you want to do is create a “Transfer.pil” (or “CreatePIP.pil”) where your commands are written and start the *.pil from the command line using the Runtime Utility Center.

PIL:

CreatePIP "C:\tmp\del\com\RucPackage.zip", "InstallMode=Consistent InstallRestriction=AllowUpdatesWithoutDataLoss KeepPVValues=0 ExecuteInitExit=1 IgnoreVersion=1 AllowDowngrade=0", "Default", "SupportLegacyAR=1", "DestinationDirectory='C:\tmp\del\com\PIP'"

Or graphical:

Then use a *.bat to start this in silent mode.
e.g.

@echo off
"C:\<your path here>\PVI\V4.12\PVI\Tools\PVITransfer\PviTransfer.exe" -silent -C:\tmp\del\com\Transfer.pil
if errorlevel = 28324 goto cant_find_module
if errorlevel = 28321 goto no_file_name_specified
if errorlevel = 28320 goto file_not_found
if errorlevel = 4808 goto connection_failed
if errorlevel = 0 goto success
:file_not_found
echo FEHLER: Datei nicht gefunden
goto end
:no_file_name_specified
echo FEHLER: Kein Dateiname angegeben
goto end
:cant_find_module
echo FEHLER: Modul wurde nicht gefunden
goto end
:connection_failed
echo PVI Fehler: Keine Verbindung zur SPS verfügbar
goto end
:success
echo Programm erfolgreich ausgeführt
:end

See also Automation Help

BR
Fabian

Hi @Joseph_Carroll , what is the status of your topic, can you update us and close it?

We abandoned the effort as not possible.

1 Like

Hello @Joseph_Carroll,

I think I was able to achieve what you wanted with AS 4.12. I guess it should also work with AS 4.8.
To me it looks like your missing step is the creation of the RUC package:

"C:\BrAutomation\AS412\bin-en\BR.AS.RUCPackageCreator.exe" "C:\MyProjects\Project1\Project1.apj" -c Config1 -o C:\RUCPackage\RUCPackage.zip

Then you create a .pil file (InstallationPackageCreator.pil) with the following content:

CreatePIP "C:\RUCPackage\RUCPackage.zip", "InstallMode=Consistent InstallRestriction=AllowUpdatesWithoutDataLoss KeepPVValues=1 ExecuteInitExit=1 IgnoreVersion=1 AllowDowngrade=0", "Default", "SupportLegacyAR=1", "DestinationDirectory='C:\RUCPackage\'"

And finally you call PVI and point to the location of the created .pil file (InstallationPackageCreator.pil):

"C:\BrAutomation\PVI\V4.12\PVI\Tools\PVITransfer\PVITransfer.exe" -silent -C:\InstallationPackageCreator.pil

This should generate the project installation package.

I’m doing something like this with a Python script and it works well for me. Let me know if you can make it work.

Best regards,

Jordi

That mostly works with AS 4.8.

BR.AS.RUCPackageCreator.exe comes back with:
error 505: Expect command line option instead of ‘C:\Projects\Test\Test.apj’.

But I was able to use BR.AS.Build.exe from my original post as it also creates a RUCPackage.zip.

PVITransfer.exe created what appears to be correct. Thank you.

1 Like