Announcement
Collapse
No announcement yet.
Is there a limit to msiexec command line length in custom bootstrapper?
Collapse
X
-
Hello, sorry for the late reply. No, there is nothing wrong in using Shell.Execute() or File.Run() to start msiexec.exe with the same arguments. I do not have access to the source code, so I cannot answer if there is a limit for the length of the argument to MSI.RunMsiexec(), but based on your findings, I agree that it certainly looks as there is one.
Update: I asked the team for a confirmation, and it appears that they used MAX_PATH for the buffer size for the argument. I suggest that you stick with the Shell.Execute() or File.Run() approach.
UlrichLast edited by Ulrich; 12-23-2019, 05:17 AM.
Leave a comment:
-
It definitely seems like there is a bug if the command line string passed to MSI.RunMsiexec() is greater than 400 something characters in length (not sure on the exact length that breaks it).
With a large string, this works:
Code:local nReturnCode = Shell.Execute("msiexec.exe", "open", strCommandLine, "", SW_HIDE, true);
Code:local nReturnCode = MSI.RunMsiexec(strCommandLine);
Leave a comment:
-
Is there a limit to msiexec command line length in custom bootstrapper?
I have my own bootstrapper that calls MSI.RunMsiexec(). It seems like if the command line gets really long, I get a 1639 MSI setup return code (invalid command line)
Code:[12/06/2019 11:19:08] Notice Launch MSI setup. [12/06/2019 11:19:08] Notice Command line: /norestart /qb -i "C:\Users\sen.SEN-VMWARE\AppData\Roaming\Downloaded Installations\{BCE4798C-5B13-46BE-9F90-BC67259FB635}\{B5209E18-D57B-4D1C-9A9D-38A92315C0D6}.msi" REINSTALL=ALL REINSTALLMODE=vomus MSIENFORCEUPGRADECOMPONENTRULES=1 PROP_HOST="zeus" PROP_PORT=22 PROP_USERNAME="ppro" PROP_UPLOAD_USERNAME="upload_ppro" PROP_TERM_WIDTH="81" PROP_TERM_HEIGHT="27" PROP_PRIVATEKEY="C:\ProgramData\ProducePro\PProClient\ppro-key.ppk" PROP_UPLOAD_PK="C:\Test\another\long\test.ppk" /l*v "C:\Users\sen.SEN-VMWARE\Documents\PProClientMSI.LOG" [12/06/2019 11:19:11] Notice MSI setup return code: 1639
Code:[12/06/2019 10:57:53] Notice Launch MSI setup. [12/06/2019 10:57:53] Notice Command line: /norestart /qb -i "C:\Users\sen.SEN-VMWARE\AppData\Roaming\Downloaded Installations\{BCE4798C-5B13-46BE-9F90-BC67259FB635}\{AE128CC8-CE73-40B1-B4F0-7804AE8E934A}.msi" REINSTALL=ALL REINSTALLMODE=vomus MSIENFORCEUPGRADECOMPONENTRULES=1 PROP_HOST="zeus" PROP_PORT=22 PROP_USERNAME="ppro" PROP_UPLOAD_USERNAME="upload_ppro" PROP_TERM_WIDTH="81" PROP_TERM_HEIGHT="27" PROP_PRIVATEKEY="C:\ProgramData\ProducePro\PProClient\ppro-key.ppk" PROP_UPLOAD_PK="C:\Test\test.ppk" /l*v "C:\Users\sen.SEN-VMWARE\Documents\PProClientMSI.LOG" [12/06/2019 10:57:56] Notice MSI setup return code: 0
Tags: None
Leave a comment: