Frustration with MSI

10 views
Skip to first unread message

Kurt Buff

unread,
Apr 2, 2024, 6:46:11 PM4/2/24
to ntpowe...@googlegroups.com
This works in cmd shell locally, but not locally in powershell, and especially not remotely in powershell:

msiexec.exe /i ScanAssistantInstaller.msi CLIENT_CERTIFICATE="-----BEGIN CERTIFICATE-----PEMgoop -----END CERTIFICATE-----"

Where PEMgoop is the Base64 encoded cert

I've tried an inordinate number of incantations to get this to work, but can't make it go - all it does on my machine is pop up the msi help dialog, and it just hangs in a remote pssession.

Looked at a lot of pages, and nothing helped

This has worked for other msi packages for local and remote deployment, such as:
start-process "C:\Windows\System32\msiexec.exe" -argumentlist "/i C:\installs\windows__Insight_Agent\AgentInstaller-x86_64.msi /quiet /qn" -wait

and so has this:
msiexec /i agentInstaller-x86_64.msi /l*v insight_agent_install_log.log /quiet CUSTOMTOKEN=us:GUIDgoop

So, gurus, how do I make this go?

Thanks,
Kurt

Fut Dey

unread,
Apr 2, 2024, 7:34:01 PM4/2/24
to ntpowe...@googlegroups.com
Long shot.

What happens if you use single quotes instead of double quotes for everything in powershell?

'C:\Windows\System32\msiexec.exe' and/or '-----BEGIN CERTIFICATE-----PEMgoop -----END CERTIFICATE-----'

Had encountered an issue with using double quotes in powershell to call a DLL to read a FOB's pubkey. The exact line worked in CMD but not in powershell until the quotes were replaced in my case.

Regards,
Fut



From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com> on behalf of Kurt Buff <kurt...@gmail.com>
Sent: Tuesday, April 2, 2024 3:45 PM
To: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com>
Subject: [ntpowershell] Frustration with MSI
 
--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntpowershell...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntpowershell/CADy1Ce4UBohX2VH5PbG53gyh%2BDzeh_Rc0j35i_i%3DyNJKUMHv9Q%40mail.gmail.com.

Kurt Buff

unread,
Apr 2, 2024, 8:37:42 PM4/2/24
to ntpowe...@googlegroups.com
This finally worked:

msiexec /i ScanAssistantInstaller.msi 'CLIENT_CERTIFICATE="-----BEGIN CERTIFICATE-----PEMgoop -----END CERTIFICATE-----"'

Thanks for pointing me in the right direction.

Kurt


Michael B. Smith

unread,
Apr 3, 2024, 8:39:18 AM4/3/24
to ntpowe...@googlegroups.com

Different quoting standards between cmd.exe and PowerShell. There is an option to use “native command quoting” in PS 7.2+, but not in PS 5.1.

 

Something like this should work:

 

msiexec.exe /i ScanAssistantInstaller.msi 'CLIENT_CERTIFICATE="-----BEGIN CERTIFICATE-----PEMgoop -----END CERTIFICATE-----" '

 

…and this is why I tend to use single-quotes except when I NEED double-quotes for interpolation…

 

From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com> On Behalf Of Kurt Buff
Sent: Tuesday, April 2, 2024 6:46 PM
To: ntpowe...@googlegroups.com
Subject: [ntpowershell] Frustration with MSI

 

This works in cmd shell locally, but not locally in powershell, and especially not remotely in powershell:

--

Michael B. Smith

unread,
Apr 3, 2024, 8:39:19 AM4/3/24
to ntpowe...@googlegroups.com

This is what I get for reading email top-to-bottom. 😊

 

Kurt Buff

unread,
Apr 3, 2024, 2:51:03 PM4/3/24
to ntpowe...@googlegroups.com
Good to know. I'll try to remember this - again.

I think you've pointed this out before.

Kurt

Kurt Buff

unread,
Apr 3, 2024, 2:51:11 PM4/3/24
to ntpowe...@googlegroups.com
Heh

On Wed, Apr 3, 2024 at 6:39 AM Michael B. Smith <mic...@smithcons.com> wrote:
Reply all
Reply to author
Forward
0 new messages