Files
Matt LaPlante 2c148e9742 Migrating Glazier logging from logger to deck.
PiperOrigin-RevId: 495869797
2022-12-16 07:32:59 -08: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
  }
}