Hello Ben,
Although the
ServiceInstall table's
Arguments column is a
"Formatted" string field (ServiceInstall Table docs), and Microsoft's own docs don't state an explicit character cap for it, it looks like it is actually capped at 255 characters.
ServiceInstall Table
This is something common for Microsoft, to not have everything documented properly.
This seems to be, as per my research so far, a design-time validation convention of some MSI columns.
I have realized that from the
ICE03 article (read the "String overflow" part).
A possible solution to this would be to take advantage of the fact that the
Arguments field is formatted and therefore allows us to use properties.
As per my tests, the
Properties table,
Value column does not inherit the 255 characters cap.
With that in mind, could you please do the following:
- create a property, in the
Properties page, with the value of your
Arguments field, e.g.:
Name: MY_PROP
Value: your value
- in the
Services page, in the
Arguments field, use the property we earlier defined, like this:
From my tests so far, the property can accept more than 250 characters and does not truncate the value.
I have created a property with 260 characters and then retrieved it in a Powershell custom action:
Code: Select all
$propValue = AI_GetMsiProperty MY_PROP
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.MessageBox]::Show("Length: $($propValue.Length)`n`nValue: $propValue", "Property Test")
which resulted in this:

- Screenshot_183.png (5.51 KiB) Viewed 7428 times
Hope this helps!
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging