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