GoogleCloudPlatform / GoogleCloudPlatform/osconfig

Wrong order of default installation parameters for msiexec

Open
#654 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
99
Forks
113
Avg merge
2d 10h
Merged PRs (30d)
5

Description

**Steps to reproduce:**
1. create software installation recipe without definition of flags
2. launch recipe

**Result:** msiexec dialog window with usage information

**Expected result:** installed msi package

**Analyze:**
Function policies/recipes/steps.go/_stepInstallMsi_ contains code with default msiexec options
```
args := step.Flags
if len(args) == 0 {
args = []string{"/i", "/qn", "/norestart"}
}
args = append(args, path)
```
where _path_ contain full path to *.msi file

By msiexec [documentation](https://learn.microsoft.com/en-us/windows/win32/msi/command-line-options) parameter /i must contain value - package or product code. Then code may look like this:
```
args := step.Flags
if len(args) == 0 {
args = []string{"/qn", "/norestart", "/i"}
}
args = append(args, path)
```

Contributor guide

Open the contributing guide

Research direction

Start in policies/recipes/steps.go at _stepInstallMsi_, where default msiexec options are assembled. Review the msiexec command-line documentation and reproduce the recipe without flags. Done means the default arguments install the MSI package instead of opening the msiexec usage dialog.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.