mirror of
https://github.com/google/glazier.git
synced 2025-12-19 18:27:35 -05:00
Glazier: DISM Package
The Glazier DISM package is a wrapper for Microsoft's Deployment Image Servicing and Management (DISM) API.
Example Usage
// Connect to DISM
s, err := dism.OpenSession(dism.DISM_ONLINE_IMAGE, "", "", dism.DismLogErrorsWarningsInfo, "", "")
if err != nil {
return err
}
defer s.Close()
// Disable Features
for _, f := range []string{
"SMB1Protocol",
}{
if err := s.DisableFeature(f, "", nil, nil); err != nil && !errors.Is(err, windows.ERROR_SUCCESS_REBOOT_REQUIRED) {
return err
}
}