Gravure cd avec nerocmd depuis appli vb

Soyez le premier à donner votre avis sur cette source.

Vue 14 891 fois - Téléchargée 1 887 fois

Description

Slt , Aprés qq semaines d'absence sur vbfrance.com, ci joint une petite source qui permet de graver un fichier sur un cd (cd-rw), mais aussi d'effacer un cd-rw.

La source utilise Nerocmd.exe : utilitaire de gravure en ligne de commande se trouvant dans le dossier de nero.

ATTENTION : UTILISER UN CD-RW POUR TESTER CETTE APPLI, CAR JE N'AI PAS TROUVE LE MOYEN DE FAIRE DE MULTISESSION POUR LE MOMENT!!!!!!!!!!

Le code et l'interface sont trés simple, mais l'important ici est de pouvoir adapter ce code a vos appli en vu de pouvoir automatiser une sauvegarde ou autres.....

Conclusion :


PS : Si qq a des infos sur les commandes de "nerocmd" pour faire de la multissession, gravure de plusieurs fichiers etc....)

Codes Sources

A voir également

Ajouter un commentaire

Commentaires

busagp
Messages postés
6
Date d'inscription
vendredi 12 août 2005
Statut
Membre
Dernière intervention
12 juin 2008
-
Bonjour, je suis très intéressé par cette source, mais je me pose une question : n'y a t-il pas une licence de nero pour pouvoir utiliser NeroCmd ?
cs_lilouti
Messages postés
3
Date d'inscription
lundi 7 mai 2007
Statut
Membre
Dernière intervention
31 mai 2007
-
toutes les commandes de nerocmd, enjoy!!!
_______________
| List available| --listdrives
| drives |
|_______________|
| Obtain drive | --driveinfo --drivename <name>
| info |
|_______________|
| Obtain disc | --discinfo --drivename <name>
| info |
|_______________|
| Write | --write --drivename <name> [--real] [--tao]
| ISO/Audio Disc| [--artist ] [--title <title>] [--speed <speed>]
| | [--audio] [--cdextra] [--iso <volumename>]
| | [--iso-no-joliet] [--iso-mode2] [--speedtest]
| | [--enable_abort] [--close_session] [--detect_non_empty_disc]
| | [--cd_text] [--underrun_prot]
| | [--import_udf] [--import_vms_session]
| | [--use_rockridge] [--create_iso_fs] [--create_udf_fs]
| | [--disable_eject] [--verify] [--dvd] [--use_allspace]
| | <disk file> ...
| | [--force_erase_disc] [--nero_log_timestamp]
| | [--output_image <filename>]
| | [--userobot <robotname>] [--robot_port_type <type>]
| | [--robot_port_num <num>] [--set_robot_flag <flagtype>]
| | [--robot_flag_value <value>]
| |
| | NOTE: At least one audio file or one disk file needs to be
| | specified!
|_______________|
| | [--disable_eject] [--verify] [--dvd] [--use_allspace]
| | <disk file> ...
| | [--force_erase_disc] [--nero_log_timestamp]
| | [--output_image <filename>]
| | [--userobot <robotname>] [--robot_port_type <type>]
| | [--robot_port_num <num>] [--set_robot_flag <flagtype>]
| | [--robot_flag_value <value>]
| |
| | NOTE: At least one audio file or one disk file needs to be
| | specified!
|_______________|
| Write | --write --drivename <name> [--real] [--tao]
| Video CD | --videocd [--speed <speed>] [--speedtest] [--enable_abort]
| | [--close_session] <video files> [--iso <volumename>]
| | [--iso-no-joliet] [--iso-mode2] [--speedtest]
| | [--enable_abort] [--close_session] [--detect_non_empty_disc]
| | [--underrun_prot] [--disable_eject] <disk file>...
| | [--force_erase_disc] [--nero_log_timestamp]
| | [--temp_path ] [--output_image <filename>]
| | [--userobot <robotname>] [--robot_port_type <type>]
| | [--robot_port_num <num>] [--set_robot_flag <flagtype>]
| | [--robot_flag_value <value>]
|_______________|
| Write Super | --write --drivename <name> [--real] [--tao]
| Video CD | --svideocd [--speed <speed>] [--speedtest] [--enable_abort]
| | [--close_session] <video files> [--iso <volumename>]
| | [--iso-no-joliet] [--iso-mode2] [--speedtest]
| | [--enable_abort] [--close_session] [--detect_non_empty_disc]
| | [--underrun_prot] [--disable_eject] <disk file>...
| | [--force_erase_disc] [--nero_log_timestamp]
| | [--temp_path ] [--output_image <filename>]
| | [--userobot <robotname>] [--robot_port_type <type>]
| | [--robot_port_num <num>] [--set_robot_flag <flagtype>]
| | [--robot_flag_value <value>]
|_______________|
| Write image | --write --drivename <name> [--real] [--tao] [--dvd]
| | --image [--speed <speed>] [--speedtest]
| | [--enable_abort] [--close_session] [--detect_non_empty_disc]
| | [--underrun_prot] [--disable_eject]
| | [--force_erase_disc] [--nero_log_timestamp]
| | [--output_image <filename>]
| | [--userobot <robotname>] [--robot_port_type <type>]
| | [--robot_port_num <num>] [--set_robot_flag <flagtype>]
| | [--robot_flag_value <value>]
|_______________|
| Write | --write --drivename <name> [--real] [--tao]
| freestyle disc| [--artist ] [--title <title>] [--speed <speed>]
| | [--cdextra] [--iso <volumename>]
| | [--freestyle_mode1 <filename>]
| | [--freestyle_mode2 <filename>]
| | [--freestyle_audio <filename>]
| | [--iso-no-joliet] [--iso-mode2] [--speedtest]
| | [--enable_abort] [--close_session] [--detect_non_empty_disc]
| | [--cd_text] [--underrun_prot]
| | [--import_udf] [--import_vms_session]
| | [--use_rockridge] [--create_iso_fs] [--create_udf_fs]
| | [--disable_eject] [--verify] [--use_allspace] <disk file>...
| | [--force_erase_disc] [--nero_log_timestamp]
| | [--output_image <filename>]
| | [--userobot <robotname>] [--robot_port_type <type>]
| | [--freestyle_mode2 <filename>]
| | [--freestyle_audio <filename>]
| | [--iso-no-joliet] [--iso-mode2] [--speedtest]
| | [--enable_abort] [--close_session] [--detect_non_empty_disc]
| | [--cd_text] [--underrun_prot]
| | [--import_udf] [--import_vms_session]
| | [--use_rockridge] [--create_iso_fs] [--create_udf_fs]
| | [--disable_eject] [--verify] [--use_allspace] <disk file>...
| | [--force_erase_disc] [--nero_log_timestamp]
| | [--output_image <filename>]
| | [--userobot <robotname>] [--robot_port_type <type>]
| | [--robot_port_num <num>] [--set_robot_flag <flagtype>]
| | [--robot_flag_value <value>]
| |
| | NOTE: Any number of freestyle tracks can be specified up to
| | a maximum of 99 tracks.!
|_______________|
| Estimate | --estimate --drivename <name> [--tao]
| track size | [--iso <volumename>] [--iso-no-joliet] [--iso-mode2]
| | [--close_session] [--import_udf] [--import_vms_session]
| | [--use_rockridge] [--create_iso_fs] [--create_udf_fs]
| | [--disable_eject] [--dvd] [--use_allspace]
| | [--estimate_no_fs_overhead] [--estimate_no_data]
| | [--estimate_no_exact_size] <disk file> ...
|_______________|
| Read audio | --read --drivename <name> [--read_speed <speed>]
| track(s) | --XY <filename> [-XY <filename> ...]
|_______________|
| List audio | --listformats
| formats |
|_______________|
| Erase disc | --erase [--entire] --drivename <name>
| | [--userobot <robotname>] [--robot_port_type <type>]
| | [--robot_port_num <num>] [--set_robot_flag <flagtype>]
| | [--robot_flag_value <value>]
|_______________|
| Eject disc | --eject --drivename <name>
|_______________|
| Load disc | --load --drivename <name>
|_______________|
| Obtain image | --imageinfo <filename>
| file disc info|
|_______________|
| Version info | --version
|_______________|
| List available| --listrobot_port_types
| robot port |
| types |
|_______________|
| List available| --listrobots
| robot drivers |
|_______________|
| List available| --listrobotflags
| robot options |
|_______________|

Each command supports the following switches: [--no_error_log],
[--error_log <log filename>], [--no_user_interaction] and [@parameter_file]

_______________
| List available| --listrobots
| robot drivers |
|_______________|
| List available| --listrobotflags
| robot options |
|_______________|

Each command supports the following switches: [--no_error_log],
[--error_log <log filename>], [--no_user_interaction] and [@parameter_file]

_______________
| --write | Burn disc.
|_______________|
| --drivename | <name> is either the "full name" of the drive or the
| <name> | drive letter.
|_______________|
| --real | Forces the disc to be actually burned. If --real is not
| | specified the process is only simulated.
|_______________|
| --tao | Disc is burned in TAO mode (DAO is default).
|_______________|
| --burnproof | Obsolete option, use --underrun_prot instead.
|_______________|
| --artist | is the artist name as to be written on disc.
| |
|_______________|
| --title | <title> is the title to be written on disc.
| <title> |
|_______________|
| --read_speed | <speed> is the speed at which the audio tracks will be read
| <speed> | (in x150KB/s).
|_______________|
| --speed | <speed> is the speed at which the disc will be burned
| <speed> | (for CD in x150 KB/s and for DVD in x1,385 KB/s).
|_______________|
| --speed_in_ | <speed> is the speed at which the disc will be burned
| kbps <speed> | (in KB/s).
|_______________|
| --audio | The disc is burned with audio information.
|_______________|
| | is a list of audio files (wav, mp3, wma, pcm).
|_______________|
| --cdextra | Use the CDExtra feature.
|_______________|
| --iso | <volume name> is the volume name to be stored on the disc.
| <volume name> |
|_______________|
|--iso-no-joliet| Do not use Joliet format.
|_______________|
| --iso-mode2 | Burn the disc using mode 2.
|_______________|
| --speedtest | Perform speed test before burning.
|_______________|
| --enable_abort| Notify which operations can and which cannot be aborted.
|_______________|
|--close_session| Close the session, not the whole disc.
|_______________|
|--detect_non_ | Detect if the disc for burning is a non empty
| empty_disc | RW media and offer to take certain actions.
|_______________|
| --iso-mode2 | Burn the disc using mode 2.
|_______________|
| --speedtest | Perform speed test before burning.
|_______________|
| --enable_abort| Notify which operations can and which cannot be aborted.
|_______________|
|--close_session| Close the session, not the whole disc.
|_______________|
|--detect_non_ | Detect if the disc for burning is a non empty
| empty_disc | RW media and offer to take certain actions.
|_______________|
| --cd_text | Write CD text (if supported by device).
|_______________|
| --videocd | Burn a Video CD.
|_______________|
| --svideocd | Burn a Super Video CD.
|_______________|
| <video files> | <video files> represents a list of video files (mpeg, jpeg).
|_______________|
| --image | <filename> is the filename to the image file.
| <filename> |
|_______________|
| --read | Read audio track(s).
|_______________|
| --XY | XY is the number of the audio track that is to be saved to
| <filename> | <filename>.
|_______________|
| --erase | Erase an RW media.
|_______________|
| --entire | Erase the entire disc (the default is quick erase).
|_______________|
| --eject | Eject disc.
|_______________|
| --load | Load disc.
|_______________|
| --version | Print NeroAPI version information.
|_______________|
| --underrun_ | Protect from underrun condition.
| prot |
|_______________|
| --use_ | Use rockridge format.
| rockridge |
|_______________|
| --create | Create ISO filesystem.
| _iso_fs |
|_______________|
| --create | Create UDF filesystem.
| _udf_fs |
|_______________|
| --dvdvideo | Perform reallocation of files in VIDEO_TS
| _realloc | directory.
|_______________|
| --dvdvideo | Create DVD-Video compatible disc.
| _cmpt | --create_iso_fs --create_udf_fs and
| | --iso_no_joliet also need to be specified.
|_______________|
| --import | Obsolete option; will be ignored.
| rockridge |
|_______________|
| --import_udf | Import UDF format.
| --dvdvideo | Perform reallocation of files in VIDEO_TS
| _realloc | directory.
|_______________|
| --dvdvideo | Create DVD-Video compatible disc.
| _cmpt | --create_iso_fs --create_udf_fs and
| | --iso_no_joliet also need to be specified.
|_______________|
| --import | Obsolete option; will be ignored.
| rockridge |
|_______________|
| --import_udf | Import UDF format.
|_______________|
| --import_vms | Import Virtual Multisession (VMS) session
| _session | (session number treated as VMS session).
|_______________|
| --import | Obsolete option; will be ignored.
| _iso_only |
|_______________|
| --import | Import session number (if omitted, the last
| <session #> | session is imported).
|_______________|
| --prefer | Obsolete option; will be ignored.
| _rockridge |
|_______________|
| --freestyle_ | Burn the file in mode 1.
| mode1 |
|_______________|
| --freestyle_ | Burn the file in mode 2.
| mode2 |
|_______________|
| --freestyle_ | Burn the file in audio mode.
| audio |
|_______________|
| --disable_ | Disables disc ejection after burn completion.
| eject |
|_______________|
| --verify | Verify ISO filesystem after writing.
|_______________|
| --dvd_high_ | Used for better compatibility of burned DVDs.
| compatibility| At least 1GB will be written.
|_______________|
| --dvd | Select DVD as media type.
|_______________|
| --recursive | Do a recursive file search.
|_______________|
| --force_erase_| Delete disc without user interaction
| disc | (requires --detect_non_empty_disc).
|_______________|
| --nero_log_ | Add a timestamp to the log's file name.
| timestamp |
|_______________|
| --temp_path | Specify a temporary path for Video CD files.
|_______________|
| --media_type | Specify a media type (combine with +)
| <type> | media_cd, media_ddcd, media_dvd_m, media_dvd_p,
| | media_dvd_any, media_dvd_ram, media_ml, media_mrw,
| | media_no_cdr, media_no_cdrw, media_cdrw, media_cdr
| | media_dvd_rom, media_cdrom, media_no_dvd_m_rw,
| | media_no_dvd_m_r, media_no_dvd_p_rw,
| | media_no_dvd_p_r, media_dvd_m_r, media_dvd_m_rw,
| timestamp |
|_______________|
| --temp_path | Specify a temporary path for Video CD files.
|_______________|
| --media_type | Specify a media type (combine with +)
| <type> | media_cd, media_ddcd, media_dvd_m, media_dvd_p,
| | media_dvd_any, media_dvd_ram, media_ml, media_mrw,
| | media_no_cdr, media_no_cdrw, media_cdrw, media_cdr
| | media_dvd_rom, media_cdrom, media_no_dvd_m_rw,
| | media_no_dvd_m_r, media_no_dvd_p_rw,
| | media_no_dvd_p_r, media_dvd_m_r, media_dvd_m_rw,
| | media_dvd_p_r, media_dvd_p_rw, media_fpacket,
| | media_vpacket, media_packetw, media_hdb or
| | media_dvd_p_r9).
|_______________|
| --no_user_ | Allow the whole process to take place with no user
| interaction | interaction (no questions asked).
|_______________|
| --output_image| Specify output image file name if image recorder is used
| | to avoid prompting for filename.
|_______________|
| --use_allspace| Use all space on the media.
|_______________|
| --relax_joliet| Relax Joliet file name length limitations.
|_______________|
| --japanese_ | CD Text is treated as Japanese CD Text (must include
| cd_text | --cd_text as well).
|_______________|
|--disable_eject| Do not eject the RW media after erasing it.
| _after_erase |
|_______________|
| --force_eject | Force disc ejection after erasing the RW media.
| _after_erase |
|_______________|
| --system_ | <text> is the "system identifier" of an ISO track.
| identifier |
| <text> |
|_______________|
| --volume_set | <text> is the "volume set" of an ISO track.
| <text> |
|_______________|
| --publisher | <text> is the "publisher" of an ISO track.
| <text> |
|_______________|
| --data_ | <text> is the "data preparer" of an ISO track.
|preparer <text>|
|_______________|
| --application | <text> is the "application" of an ISO track.
| <text> |
|_______________|
| --copyright | <text> is the "copyright" of an ISO track.
| <text> |
|_______________|
| --abstract | <text> is the "abstract" of an ISO track.
| <text> |
|_______________|
|--bibliographic| <text> is the "bibliographic" of an ISO track.
| <text> |
|_______________|
| --backup | Replace imported files only if newer are found.
|_______________|
| --copyright | <text> is the "copyright" of an ISO track.
| <text> |
|_______________|
| --abstract | <text> is the "abstract" of an ISO track.
| <text> |
|_______________|
|--bibliographic| <text> is the "bibliographic" of an ISO track.
| <text> |
|_______________|
| --backup | Replace imported files only if newer are found.
|_______________|
| --booktype | The book type of a burned DVD will be set to
| _dvdrom | DVD-ROM.
|_______________|
| --no_booktype | Do not change the book type of a DVD even if the default
| _change | setting is to change the book type to DVD-ROM.
|_______________|
| --estimate_no | Do not include the file system overhead in calculation.
| fs_overhead |
|_______________|
| --estimate_no | Do not include data in calculation.
| data |
|_______________|
| --estimate_no | Do not calculate the exact size (quicker).
| exact_size |
|_______________|
| --cd_overburn | Specify CD overburn size in blocks.
| <size> |
|_______________|
| --dvd_overburn| Specify DVD overburn size in blocks.
| <size> |
|_______________|
| --copy_temp_ | Specify temporary image path for a disc copy operation.
| image_path | Omitting it causes on-the-fly copy.
|_______________|
| --copy_keep_ | Do not delete temporary image path after disc copy
| temp_image | operation.
|_______________|
| --copy_retries| Specify retry count on read errors.
| <num> |
|_______________|
| --copy_read_ | Specify disc copy read speed in kb/s.
| speed <spd> |
|_______________|
| --copy_ | Ignore data errors during disc copy.
| continue_on_ | Default is to abort.
| data_read_ |
| errors |
|_______________|
| --copy_ | Abort on audio errors during disc copy.
| abort_on_audio| Default is to ignore.
| read_errors |
|_______________|
| --copy_raw_ | Use raw read mode for disc copy.
| read_mode |
|_______________|
| --copy_read_ | Read ISRC and media catalog number during disc copy.
| isrc |
|_______________|
|_______________|
| --estimate_no | Do not include data in calculation.
| data |
|_______________|
| --estimate_no | Do not calculate the exact size (quicker).
| exact_size |
|_______________|
| --cd_overburn | Specify CD overburn size in blocks.
| <size> |
|_______________|
| --dvd_overburn| Specify DVD overburn size in blocks.
| <size> |
|_______________|
| --copy_temp_ | Specify temporary image path for a disc copy operation.
| image_path | Omitting it causes on-the-fly copy.
|_______________|
| --copy_keep_ | Do not delete temporary image path after disc copy
| temp_image | operation.
|_______________|
| --copy_retries| Specify retry count on read errors.
| <num> |
|_______________|
| --copy_read_ | Specify disc copy read speed in kb/s.
| speed <spd> |
|_______________|
| --copy_ | Ignore data errors during disc copy.
| continue_on_ | Default is to abort.
| data_read_ |
| errors |
|_______________|
| --copy_ | Abort on audio errors during disc copy.
| abort_on_audio| Default is to ignore.
| read_errors |
|_______________|
| --copy_raw_ | Use raw read mode for disc copy.
| read_mode |
|_______________|
| --copy_read_ | Read ISRC and media catalog number during disc copy.
| isrc |
|_______________|
| --userobot | Use robot to move the disc to and from recorder.
| <robotname> |
|_______________|
| --robot_port_ | Specify the port type the robo is connected to: COM, LPT,
| type <type> | USB. Default is COM.
|_______________|
| --robot_port_ | Specify the port number the robo is connected to: 1, 2, 3...
| num <num> | Default is 1.
|_______________|
| --set_robot_ | Set special robot flag before burning: robo_cleanup,
| flag | robo_insertcd_retries.
| <flagtype> |
|_______________|
| --robot_flag_ | Set value for flag specified above.
| value |
| <value> |
|_______________|
| @param_file | param_file contains the command line arguments.
|_______________|
cs_Pestouille
Messages postés
58
Date d'inscription
lundi 23 décembre 2002
Statut
Membre
Dernière intervention
30 octobre 2008
-
Bonsoir tout le monde !!

Vous allez me trouver casse-pieds mais ma blondeur ( et mon super niveau débutante) me le permet :p

Voilà moi je voudrais que ce code fonctionne avec XP et son outil (merdique certes) de gravure !

J'ai fait le code suivant en VBS (actionné via les tâches pplannifiées) :

sPath = "C:\cecile"
sPath2 = "E:"

Set oFSO = CreateObject("Scripting.FileSystemObject")
sNewestFile = GetNewestFile(sPath)

If sNewestFile <> "" Then

oFSO.CopyFile sPath & sNewestFile, sPath2 & sNewestFile

End If

Function GetNewestFile(ByVal sPath)

sNewestFile = Null

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder(sPath)
Set oFiles = oFolder.Files

For Each oFile In oFiles
On Error Resume Next
If IsNull(sNewestFile) Then
sNewestFile = oFile.Path
dPrevDate = oFile.DateLastModified
Elseif dPrevDate < oFile.DateLastModified Then
sNewestFile = oFile.Name
End If
On Error Goto 0
Next

If IsNull(sNewestFile) Then sNewestFile = ""

GetNewestFile = sNewestFile

End Function

Dès que je le lance via les taches plannifiées , il me dit
"permission refusée" quand il y a un cd vierge dedans
Du coup, j'ai essayé de le copier dans le dossier de gravure de
windows (chez moi : C:\Documents and Settings\pestouille01\Local
Settings\Application Data\Microsoft\CD Burning) et rien, il ne se copie
pas.

une âme charitable svp :p

Merci d'avance pour toutes vos réponses

Biz
Cécile
DraaFil
Messages postés
264
Date d'inscription
mercredi 16 avril 2003
Statut
Membre
Dernière intervention
23 mars 2012
-
bonjour a vsou, j'ai 2 petite question, comment je peux dire de graver un repertoireou plustot le contenue d'un repertoire (plusieurs fichier et dossier)


Merci
DraaFil
soldier8514
Messages postés
295
Date d'inscription
vendredi 20 décembre 2002
Statut
Membre
Dernière intervention
24 janvier 2014
1 -
lol venez voir ça si vous êtes interressés par la gravure des cds :

http://vbfrance.com/code.aspx?id=33308

vous allez trouver votre bonheur ;)

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.