cedrozor / myrtille

A native HTML4 / HTML5 Remote Desktop Protocol and SSH client
https://www.myrtille.io
Apache License 2.0
1.78k stars 372 forks source link

Unattended command line installation override parameters not working #353

Closed mulebm closed 11 months ago

mulebm commented 1 year ago

I am trying to script a silent/unattended installation of myrtille but it appears I am unable to pass in parameters to override the default, eg. Start-Process msiexec -ArgumentList "/i $pathToMsi /quiet /log $tmpFile SERVICESPORT=80" -NoNewWindow -Wait

I found in the logs it looks like it is being passed in and then being overwritten again:

MSI (s) (C8:04) [22:08:23:328]: PROPERTY CHANGE: Modifying SERVICESPORT property. Its current value is '80'. Its new value: '8080'.
MSI (s) (C8:04) [22:08:23:989]: PROPERTY CHANGE: Adding _E6478927_12B9_48D9_A231_BA6AB3FB6424.commit property. Its value is '/installtype=notransaction /action=commit /LogFile= /TargetDir="c:\Program Files (x86)\Myrtille\\"
/LogToConsole=true /LogFile="c:\Program Files (x86)\Myrtille\\log\Myrtille.Setup.log" /ServicesPort="8080" /AdminServicesPort="8008" /SslCert="1" /PdfPrinter="1" /SessionUrl="1" "c:\Program Files
(x86)\Myrtille\bin\Myrtille.Web.dll" "C:\Windows\TEMP\CFG436D.tmp"'.
MSI (s) (C8:04) [22:08:24:005]: PROPERTY CHANGE: Adding _C80AAD90_B75A_4789_8975_F2FA90FD58FD.commit property. Its value is '/installtype=notransaction /action=commit /LogFile= /TargetDir="c:\Program Files (x86)\Myrtille\\"
/LogToConsole=true /LogFile="c:\Program Files (x86)\Myrtille\\log\Myrtille.Setup.log" /OasisApiKey="" /OasisAppKey="" /OasisAppId="" /EnterpriseAdminGroup="" /EnterpriseDomain="" /EnterpriseNetbiosDomain="" /ServicesPort="8080"
/PdfPrinter="1" "c:\Program Files (x86)\Myrtille\bin\Myrtille.Services.exe" "C:\Windows\TEMP\CFG436D.tmp"'.
MSI (s) (C8:04) [22:08:24:005]: PROPERTY CHANGE: Adding _1E6FF7EA_65E3_48E5_9DF0_74D1B8FE24AC.rollback property. Its value is '/installtype=notransaction /action=rollback /LogFile= /TargetDir="c:\Program Files (x86)\Myrtille\\"
/LogToConsole=true /LogFile="c:\Program Files (x86)\Myrtille\\log\Myrtille.Setup.log" /OasisApiKey="" /OasisAppKey="" /OasisAppId="" /EnterpriseAdminGroup="" /EnterpriseDomain="" /EnterpriseNetbiosDomain="" /ServicesPort="8080"
/PdfPrinter="1" "c:\Program Files (x86)\Myrtille\bin\Myrtille.Services.exe" "C:\Windows\TEMP\CFG436D.tmp"'.
MSI (s) (C8:04) [22:08:24:005]: PROPERTY CHANGE: Adding _EDBE9EE8_798D_4D72_B141_10001A25A4F2.rollback property. Its value is '/installtype=notransaction /action=rollback /LogFile= /TargetDir="c:\Program Files (x86)\Myrtille\\"
/LogToConsole=true /LogFile="c:\Program Files (x86)\Myrtille\\log\Myrtille.Setup.log" /ServicesPort="8080" /AdminServicesPort="8008" /SslCert="1" /PdfPrinter="1" /SessionUrl="1" "c:\Program Files
(x86)\Myrtille\bin\Myrtille.Web.dll" "C:\Windows\TEMP\CFG436D.tmp"'.
MSI (s) (C8:04) [22:08:24:020]: PROPERTY CHANGE: Adding _7C487AA9_B469_4E37_8000_AB8891C22F98.install property. Its value is '/installtype=notransaction /action=install /LogFile= /TargetDir="c:\Program Files (x86)\Myrtille\\"
/LogToConsole=true /LogFile="c:\Program Files (x86)\Myrtille\\log\Myrtille.Setup.log" /ServicesPort="8080" /AdminServicesPort="8008" /SslCert="1" /PdfPrinter="1" /SessionUrl="1" "c:\Program Files
(x86)\Myrtille\bin\Myrtille.Web.dll" "C:\Windows\TEMP\CFG436D.tmp"'.
MSI (s) (C8:04) [22:08:24:020]: PROPERTY CHANGE: Adding _3A9CC970_FC92_4277_BAC7_7C118EE32A32.install property. Its value is '/installtype=notransaction /action=install /LogFile= /TargetDir="c:\Program Files (x86)\Myrtille\\"
/LogToConsole=true /LogFile="c:\Program Files (x86)\Myrtille\\log\Myrtille.Setup.log" /OasisApiKey="" /OasisAppKey="" /OasisAppId="" /EnterpriseAdminGroup="" /EnterpriseDomain="" /EnterpriseNetbiosDomain="" /ServicesPort="8080"
/PdfPrinter="1" "c:\Program Files (x86)\Myrtille\bin\Myrtille.Services.exe" "C:\Windows\TEMP\CFG436D.tmp"'.

I'm guessing something is wrong with the installer... ?

mulebm commented 1 year ago

a quick update on this, I installed Orca and created a transform which was a bit of a workaround but not ideal. I am guessing something in the MSI is not correct, perhaps it is missing from the Property table in the MSI as I couldn't see options like SERVICESPORT, ADMINSERVICESPORT and SESSIONURL in the table. My "hack" was to create a transform where I added those in the Property table and ran the msiexec using the TRANSFORM="transform_file.mst" in order to get it to install silently with the parameters I need.

cedrozor commented 12 months ago

Thanks for the update. I'm not an msiexec expert, but could you have added the other parameters you needed to change to the default (not just SERVICESPORT)? I'm glad you were able to find a workaround, using a transform (I didn't know you could do that with msiexec).

Anyway, msiexec is getting old; If I have some time to work on Myrtille again, I'll try to improve the installation via docker, or create a chocolatey package or anything newer.

mulebm commented 11 months ago

nice, chocolatey and docker would be awesome.