Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Install Nero if CDRW/DVDRW exist

Featured Replies

Like the topic title says I want to automaticly install Nero if a CDRW or DVDRW drive is present in the system. Since we build a lot of systems and almost every system has a DVDRW or CDRW in it. Only a few don't have it so I want the preinstallation to automaticly skip Nero here.

The install stuff will be easy to make, only how can the preinstallation find out if theres a writer in the system? How to find that out in a cmd-box? Can someone point me to the right direction?

I want to do the same with PowerDVD, but thats project two ;)

Thanks in advance !

  • Author
try checking somehow if a device has imapi as a lower filter...

Explain yourself...?

I am not good programmer but here is the sloppy code.

hDevice = CreateFile("\\\\.\\F:",  // drive to open
                   GENERIC_READ | GENERIC_WRITE,
                   FILE_SHARE_READ |  FILE_SHARE_WRITE,
                   NULL,             // default security attributes
                   OPEN_EXISTING,    // disposition
                   0,                // file attributes
                   NULL);            // do not copy file attributes
if (hDevice == INVALID_HANDLE_VALUE) // cannot open the drive
 {

   return (FALSE); //error handling
 }

bResult = DeviceIoControl(hDevice,  // device to be queried
     IOCTL_STORAGE_GET_MEDIA_TYPES_EX,  // operation to perform
                            NULL, 0, // no input buffer
                           obuff, sizeof(*obuff),     // output buffer
                           &rtnd,                 // # bytes returned
                           (LPOVERLAPPED) NULL);  // synchronous I/O

Now you will have

GET_MEDIA_TYPES struct

DeviceType dd ?

MediaInfoCount dd ?

MediaInfo DEVICE_MEDIA_INFO <>

GET_MEDIA_TYPES ends

at obuff.Its size depends on the capabilities of device.You have MediaInfoCount*DEVICE_MEDIA_INFO structure at that buffer which is union you have to parse according to its type.More info at MSDN.I have written some of the code but failed on parsing unions will try later if no one attempts:)

If you are using a RunOnce.CMD or such, you could look for the appropriate driver of the cdrw/dvdrw, something like:

if NOT exist %systemroot%\system32\CD-driver.abc goto NoCD
start /wait Nero.exe
:NoCD

Of course if you install many brands or if the burner and non-burner use the same driver that might not help much...

You could also use CDRECORD (which requires cygwin) to search for CD burners.

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

SET CDROM=
SET CDR=
FOR /F "SKIP=2 TOKENS=1,8 DELIMS=       '" %%A IN ('CDRECORD -scanbus') DO (
 IF /I "%%B" EQU " REMOVABLE CD-ROM" SET CDROM=!CDROM! "%%A"
)
ECHO CD Drives: %CDROM%

FOR %%X IN (%CDROM%) DO FOR /F "SKIP=2 DELIMS=" %%A IN ('CDRECORD -dev %%X -prcap') DO (
 IF /I "%%A" EQU "  DOES WRITE CD-R MEDIA" SET CDR=%%X
)
ECHO CD Burners: %CDR%

IF "%CDR%"="" GOTO NO_CDR
rem Install Nero


:NO_CDR

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.