Mega Code Archive

 
Categories / Delphi / Examples
 

Does a computer have a cd burner installed [windows xp]

If your application needs to check on a system whether a CD burner is installed, and you know that you are running on Windows XP, then you can check the registry. Starting with Windows XP, Microsoft equipped their operating system with CD burning capabilities as part of Explorer. Therefore, the registry holds a key under Explorer now, called: Software\Microsoft\Windows\CurrentVersion\Explorer\CD Burning On XP, you can use the wrapper function HasCDBurner() : boolean as shown below. function HasCDBurner : boolean; var reg: TRegistry; begin { HasCDBurner } reg := TRegistry.Create; try reg.RootKey := HKEY_CURRENT_USER; reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Explorer\CD Burning', False); Result := reg.ValueExists('CD Recorder Drive'); reg.CloseKey finally reg.Free end; { try } end; { HasCDBurner }