Skip to content

proper command to install with config.yaml and web.config.file options #2167

@lkowitz

Description

@lkowitz

Problem Statement

I'm trying to install windows_exporter with a prewritten config.yaml and web.config.yaml web.config.file. However, I'm not getting the results I'd expect. The install directory has the below files in it.
c:\Temp\windows_exporter_install>dir
Volume in drive C is Windows
Volume Serial Number is 183B-1E6B

Directory of c:\Temp\windows_exporter_install

08/07/2025 10:31 AM

.
08/07/2025 10:32 AM ..
08/05/2025 10:45 AM 154 config.yaml
08/06/2025 03:33 PM 4,838 web.config.yaml
07/28/2025 03:56 PM 11,403,264 windows_exporter-0.31.1-amd64.msi

I've tried a couple of different versions of the command without success. Can you provide some guidance?

msiexec.exe /l*v C:\Windows\companyName\windows_exporter_install.log /i windows_exporter-0.31.1-amd64.msi ADDLOCAL=FirewallException CONFIG_FILE="config.yaml" EXTRA_FLAGS="--web.config.file='C:\Program Files\windows_exporter\web.config.yaml'"

This command will not complete installation and fails at the starting service section. The install fails and rolls back- I'm guessing because the web.config.yaml file is not in the C:\Program Files\windows_exporter directory, but how could it be there? We just started installing and the directories didn't previously exist.

msiexec.exe /l*v C:\Windows\companyName\windows_exporter_install.log /i windows_exporter-0.31.1-amd64.msi ADDLOCAL=FirewallException CONFIG_FILE="config.yaml" EXTRA_FLAGS="--web.config.file='web.config.yaml'"

This command completes the installation but I can't start the service even with the web.config.yaml file copied to the c:\program files\windows_exporter\ directory.

I attached the log from the msiexec command. Also, below are some logs from the windows system event log:
A service was installed in the system.

Service Name: windows_exporter
Service File Name: "c:\Program Files\windows_exporter\windows_exporter.exe" --config.file="c:\Program Files\windows_exporter\config.yaml" --web.config.file='web.config.yaml'
Service Type: user mode service
Service Start Type: auto start
Service Account: LocalSystem

The windows_exporter service entered the running state.

The windows_exporter service entered the stopped state.

The windows_exporter service terminated with the following service-specific error:
Incorrect function.

windows_exporter_install.txt

Environment

  • windows_exporter Version:0.31.1
  • Windows Server Version: 2022

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions