Hide the "Add a program from CD-ROM or floppy disk" option
Masquer l’option « Ajouter un programme à partir d’un CD-ROM ou d’une disquette »
Explanation
Removes the "Add a program from CD-ROM or floppy disk" section from the Add New Programs page. This prevents users from using Add or Remove Programs to install programs from removable media.
If you disable this setting or do not configure it, the "Add a program from CD-ROM or floppy disk" option is available to all users.
This setting does not prevent users from using other tools and methods to add or remove program components.
Note: If the "Hide Add New Programs page" setting is enabled, this setting is ignored. Also, if the "Prevent removable media source for any install" setting (located in User Configuration\Administrative Templates\Windows Components\Windows Installer) is enabled, users cannot add programs from removable media, regardless of this setting.
Supprime la section « Ajouter un programme à partir d’un CD-ROM ou d’une disquette » de la page « Ajouter de nouveaux programmes ». Ce paramètre empêche les utilisateurs d’utiliser Ajouter ou supprimer des programmes pour installer des programmes à partir d’un média amovible.
Si vous désactivez ce paramètre ou ne le configurez pas, l’option « Ajouter un programme à partir d’un CD-ROM ou d’une disquette » est disponible pour tous les utilisateurs.
Ce paramètre n’empêche pas les utilisateurs d’utiliser d’autres outils ou méthodes pour ajouter ou supprimer des composants de programme.
Remarque : si le paramètre « Masquer la page Ajouter de nouveaux programmes » est activé, ce paramètre est ignoré. De même, si le paramètre « Éviter l’utilisation de la source de média amovible pour toutes les installations » (situé dans Configuration ordinateur\Modèles d’administration\Composants Windows\Windows Installer) est activé, les utilisateurs ne peuvent pas ajouter de programmes à partir de médias amovibles, indépendamment de la valeur de ce paramètre.
Registry
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall- Value name
NoAddFromCDorFloppy
| State | Value written |
|---|---|
| Enabled | not defined in the ADMX |
| Disabled | not defined in the ADMX |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: AddRemovePrograms/NoAddFromCDorFloppy
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'NoAddFromCDorFloppy' -Value 1 -Type DWord # assumed value (not defined in the ADMX)Disable
# Disable: AddRemovePrograms/NoAddFromCDorFloppy
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'NoAddFromCDorFloppy' -Value 0 -Type DWord # assumed value (not defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": AddRemovePrograms/NoAddFromCDorFloppy
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall'
Remove-ItemProperty -Path $k -Name 'NoAddFromCDorFloppy' -ErrorAction SilentlyContinue