windows_exporter icon indicating copy to clipboard operation
windows_exporter copied to clipboard

Can't install with --% EXTRA_FLAGS: got "Invalid command line argument" error from windows installer

Open rc5hack opened this issue 1 year ago • 4 comments

This works:

$PSNativeCommandArgumentPassing = 'Legacy'
msiexec /i windows_exporter-0.23.1-amd64.msi ENABLED_COLLECTORS="cpu,cpu_info,cs,logical_disk,net,os,service,system,process"

This don't work:

$PSNativeCommandArgumentPassing = 'Legacy'
msiexec /i windows_exporter-0.23.1-amd64.msi ENABLED_COLLECTORS="cpu,cpu_info,cs,logical_disk,net,os,service,system,process" --% EXTRA_FLAGS="--collector.service.services-where ""Name LIKE '%foo%'""";

I got pop-up window with text:

Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.

What's wrong with my installation command?

rc5hack avatar Sep 15 '23 12:09 rc5hack

The command looks alright, I just tested it. It might be some weird msiexec issue. Maybe you could checkout this and try to reregister msiexec

DiniFarb avatar Sep 15 '23 19:09 DiniFarb

I experimented with command syntax and the problem was solved when I removed the semicolon at the end of the command.

So this didn't work (";" symbol at the end):

$PSNativeCommandArgumentPassing = 'Legacy'
msiexec /i windows_exporter-0.23.1-amd64.msi ENABLED_COLLECTORS="..." --% EXTRA_FLAGS="--collector.service.services-where ""Name LIKE '%foo%'""";

And this worked (no ";" at the end):

$PSNativeCommandArgumentPassing = 'Legacy'
msiexec /i windows_exporter-0.23.1-amd64.msi ENABLED_COLLECTORS="..." --% EXTRA_FLAGS="--collector.service.services-where ""Name LIKE '%foo%'"""

rc5hack avatar Sep 17 '23 11:09 rc5hack

And this worked(cmd):

msiexec /i D:\soft\windows_exporter-0.24.0-amd64.msi ENABLED_COLLECTORS="cpu,cs,logical_disk,net,os,service,system,textfile,mssql" EXTRA_FLAGS="--collectors.mssql.classes-enabled=accessmethods,availreplica,bufman,databases,dbreplica,genstats,locks,memmgr,sqlstats"

Rabbit-st avatar Oct 31 '23 07:10 Rabbit-st

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

github-actions[bot] avatar Jan 30 '24 02:01 github-actions[bot]