{"id":14965227,"url":"https://github.com/saltstack/salt-windows-msi","last_synced_at":"2025-06-23T09:35:31.465Z","repository":{"id":25404979,"uuid":"28833873","full_name":"saltstack/salt-windows-msi","owner":"saltstack","description":"Windows MSI installer build toolkit","archived":false,"fork":false,"pushed_at":"2023-03-14T15:50:53.000Z","size":1339,"stargazers_count":30,"open_issues_count":2,"forks_count":18,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-05T06:23:08.609Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saltstack.png","metadata":{"files":{"readme":"README-how-to-build.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-05T21:59:35.000Z","updated_at":"2023-12-29T12:25:58.000Z","dependencies_parsed_at":"2024-09-14T04:16:57.780Z","dependency_job_id":null,"html_url":"https://github.com/saltstack/salt-windows-msi","commit_stats":{"total_commits":786,"total_committers":17,"mean_commits":46.23529411764706,"dds":"0.45674300254452926","last_synced_commit":"4ac41a2d7a156c861b981b617d462957e3d2a705"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/saltstack/salt-windows-msi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack%2Fsalt-windows-msi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack%2Fsalt-windows-msi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack%2Fsalt-windows-msi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack%2Fsalt-windows-msi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saltstack","download_url":"https://codeload.github.com/saltstack/salt-windows-msi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack%2Fsalt-windows-msi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261453294,"owners_count":23160483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:34:24.221Z","updated_at":"2025-06-23T09:35:26.453Z","avatar_url":"https://github.com/saltstack.png","language":"C#","readme":"# How to build the msi\n\n## Build client requirements\n\nThe build client is where the msi installer is built.\n\nYou need\n- 64bit Windows 10\n- Git repositories `salt`, `salt-windows-nsis` and `salt-windows-msi`\n- .Net 3.5 SDK (for WiX)\u003csup\u003e*\u003c/sup\u003e\n- [Wix 3](http://wixtoolset.org/releases/)\u003csup\u003e**\u003c/sup\u003e\n- [Build tools 2015](https://www.microsoft.com/en-US/download/confirmation.aspx?id=48159)\u003csup\u003e**\u003c/sup\u003e\n- Microsoft_VC140_CRT_x64.msm from Visual Studio 2015\u003csup\u003e**\u003c/sup\u003e\n- Microsoft_VC140_CRT_x86.msm from Visual Studio 2015\u003csup\u003e**\u003c/sup\u003e\n- Microsoft_VC120_CRT_x64.msm from Visual Studio 2013\u003csup\u003e**\u003c/sup\u003e\n- Microsoft_VC120_CRT_x86.msm from Visual Studio 2013\u003csup\u003e**\u003c/sup\u003e\n\nNotes:\n- \u003csup\u003e*\u003c/sup\u003e `build.cmd` will open `optionalfeatures` if necessary.\n- \u003csup\u003e**\u003c/sup\u003e `build.cmd` will download them to `.\\_cache.dir` and install if necessary.\n\n### Step 1: build the Nullsoft (NSIS) exe installer or use the mockup\n\n- Build the Nullsoft (NSIS) exe installer\n\n- Or execute `test-copy_mock_files_to_salt_repo.cmd` for only testing configuration\n\n### Step 2: build the msi installer\n\nExecute\n\n    build.cmd\n\n### Remark on transaction safety\n\n- Wix is transaction safe: either the product is installed or the prior state is restored/rolled back.\n- C# is not.\n\n### Directory structure\n\n- Product.wxs: main file.\n  - (EXPERIMENTAL) salt-minion Windows Service\n    - requires [saltminionservice](https://github.com/saltstack/salt/blob/167cdb344732a6b85e6421115dd21956b71ba25a/salt/utils/saltminionservice.py) or [winservice](https://github.com/saltstack/salt/blob/3fb24929c6ebc3bfbe2a06554367f8b7ea980f5e/salt/utils/winservice.py) [Removed](https://github.com/saltstack/salt/commit/8c01aacd9b4d6be2e8cf991e3309e2a378737ea0)\n- CustomAction01/: custom actions in C#\n- *-discovered-files.wxs: TEMPORARY FILE\n\n### Naming conventions\n\n- **Immediate** custom actions serve initialization (before the install transaction starts) and must not change the system.\n- **Deferred** custom action may change the system but run in a \"sandbox\".\n\nPostfix  | Example                            | Meaning\n-------- | ---------------------------------- | -------\n`_IMCAC` | `ReadConfig_IMCAC`                 | Immediate custom action written in C#\n`_DECAC` | `WriteConfig_DECAC`                | Deferred custom action written in C#\n`_CADH`  | `WriteConfig_CADH`                 | Custom action data helper (only for deferred custom action)\n\n\"Custom action data helper\" send properties to the deferreed actions in the sandbox.\n\n### Other Notes\nmsi conditions for install, uninstall, upgrade:\n- https://stackoverflow.com/a/17608049\n\n\nInstall sequences documentation:\n\n- [standard-actions-reference](https://docs.microsoft.com/en-us/windows/win32/msi/standard-actions-reference)\n- [suggested-installuisequence](https://docs.microsoft.com/en-us/windows/win32/msi/suggested-installuisequence)\n- [suggested-installexecutesequence](https://docs.microsoft.com/en-us/windows/win32/msi/suggested-installexecutesequence)\n- [other docs](https://www.advancedinstaller.com/user-guide/standard-actions.html)\n\nThe Windows installer restricts the maximum values of the [ProductVersion property](https://docs.microsoft.com/en-us/windows/win32/msi/productversion):\n\n- major.minor.build\n- `255.255.65535`\n\nTherefore we generate an \"internal version\":\n - Salt 3002.1 becomes `30.02.1`\n\n\n[Which Python version uses which MS VC CRT version](https://wiki.python.org/moin/WindowsCompilers)\n\n- Python 2.7 = VC CRT 9.0 = VS 2008\n- Python 3.6 = VC CRT 14.0 = VS 2017\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack%2Fsalt-windows-msi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaltstack%2Fsalt-windows-msi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack%2Fsalt-windows-msi/lists"}