We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

leeroy
Posts: 41
Joined: Mon May 03, 2021 11:13 pm

Empty Command Line Parameters Merged Together

Hi, we are running an Inline Powershell Script and passing in parameters, but when a user passes in empty parameters on the command line the values are munged together in an unusual way.

Command:

Code: Select all

msiexec.exe /i installer.msi /qn HP_URL="" IDS="123456"
Powershell Inline Script:

Code: Select all

Parameter values: 
-cfPath "[APPDIR]/Config.json" -tkURL [TK_URL] -hpURL [HP_URL] -ids [IDS]
Params (cfPath and tkURL are calculated from other scripts): :

Code: Select all

Param($cfPath , $tkURL , $hpURL , $ids )
$hpURL = "IDS=123456" <-- This has been munged together
$ids = ""
However if HP_URL is provided a value other then empty string it works fine.
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Empty Command Line Parameters Merged Together

Hello,

If possible, could you please create a sample project that reproduces this and forward it to me?

I'm afraid I wasn't quite able to reproduce this on my end.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
leeroy
Posts: 41
Joined: Mon May 03, 2021 11:13 pm

Re: Empty Command Line Parameters Merged Together

Hi Catalin,

I made a simple install. After you build it just run it like the following.

Code: Select all

msiexec.exe /i paramTester.msi /qn BAR="" BAZ="2041860278"
Output:
Image

The baz param ends up in the bar param.
Attachments
Your Application.aip
Sample Application
(15.83 KiB) Downloaded 285 times
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Empty Command Line Parameters Merged Together

Hello,

I have tested this using the AIP file you provided, but I'm afraid I'm not able to reproduce this:
Screenshot_107.png
Screenshot_107.png (31.01 KiB) Viewed 9443 times

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
leeroy
Posts: 41
Joined: Mon May 03, 2021 11:13 pm

Re: Empty Command Line Parameters Merged Together

Hi Catalin,

I wonder if you ran this in a regular command prompt, not PowerShell. I believe this only occurs in PowerShell.

Kind regards,
Lee
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Empty Command Line Parameters Merged Together

Hello Lee,

There shouldn't be any differences if you run the setup from a PowerShell or a CMD shell.

I have tested this with PowerShell and the results are the same:
Screenshot_110.png
Screenshot_110.png (56.03 KiB) Viewed 8252 times

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”