• AnyStream is having some DRM issues currently, Netflix is not available in HD for the time being.
    Situations like this will always happen with AnyStream: streaming providers are continuously improving their countermeasures while we try to catch up, it's an ongoing cat-and-mouse game. Please be patient and don't flood our support or forum with requests, we are working on it 24/7 to get it resolved. Thank you.

[Solved by DrXenos] [Feature Request] Eject Disc after successfull copy

DeepSpace

Well-Known Member
Thread Starter
Joined
Apr 6, 2019
Messages
4,622
Likes
1,839
I've already asked this question before, but I've got no helpful answer. So I try it again:

Can you add a checkbox to let AnyDVD eject the disc after the copy finished successfully?
This could be placed instead of "Create Image as sparse File" to avoid to change the windows size. I don't even know what this does and if I did a test (I think I did one with one disc) it did not made a difference.
If someone uses this funktion, then it can be a setting if I want to replace this or not.

If there was an error (like bad sector), the disc should not be ejected. Only when AnyDVD made it to 100% by itself (can also be a setting if I want it always or only when the copy was successfull).

In addition it should not be greyed out like every other setting after the copy has been started. If I change my mind, I want to be able to deselect the checkbox even if AnyDVD is already at 95%.

Here you have the link to my german post. It got a few answers, but only with a script and none of them told me how I should do this, but I simply want to get a checkbox anyway.
https://forum.redfox.bz/threads/disc-nach-kopiervorgan-automatisch-auswerfen.78146/

Edit:
Almost forgot about it, but can you add the green progress bar to the taskbar icon like AS? I always have to reopen the copy windows to see the progress, AS shows it in the taskbar icon.

Also the shortcuts where changed some versions ago. Why did this happen? I had the rip to iso windows pinned to my taskbar to directly open it since this is the only thing I need and to avoid a rightclick onto the AnyDVD icon in the systray. If you only did it... because, then please revert it. Although it is not a big issue, I did not understand why this was done.
Of course it is fine when it is a technical reason and therefore not avoidable.
 
Last edited:
I wonder why I get no answer. Is it hard to say if it is already possible or if you don't want to implement it?
 
It is not possible and there are no plans to implement it at the moment.
Thank you, all what I want to know.

But may I ask I have another software called WinCDEmu that you can use to create iso files (I don't use it with AnyDVD in combination) that has a button to eject the disc after iso has been created. So it should be possible.
 
It's not ideal, but you can use something like AutoIt to do it. That's what I do. I even have it text my phone when it done (so I know when to run downstairs and feel it another disc!).
 
@James
Please let me know what you think about this. Am I right and this is the solution, and can it be implemented?



I think I solved it.
Some weeks ago I decided to take a look at this again and found this site:
https://superuser.com/questions/972447/how-can-i-eject-a-cd-via-the-cmd

I tested around a bit, and it worked. Then I saved it as a script and when I double-click it, the tray opens. So it IS possible.

If there is no attachment to this comment, the forum did not allow me to upload the script.
If so, here is it, to be saved as an .vbs file:
Code:
WScript.Sleep 2000
dim oWMP
  Set oWMP = CreateObject("WMPlayer.OCX.7")
  Set colCDROMs = oWMP.cdromCollection
  colCDROMs.Item(0).Eject
  set oWMP = nothing

However, there is one problem: What if I use more than one drive? Because on my laptop, I have two drives (the internal one, and I use my external one to copy BDs).
In that case, just change the 0 in colCDROMs.Item(0).Eject to 1. It will then eject the other drive.
(0 seems to be for drive 1, no idea why. Similar to the streams in ffmpeg, you have to type 0 if you want stream 1. Makes no sense for me.)
I tried that with two drives on my computer and it worked. It always only ejected the drive I chose.

So, in order to make AnyDVD to work properly for more then one drive, it has to remember or to check for what drive the current copy window is, if I have two windows open at the same time (one for the internal, and a second one for the external drive).
First of all, you have to add scripts with 1, 2 and so on to the AnyDVD exe. Of course you could also make it to edit the script if neccessary, but it is easier to just include the finished scripts into the download instead of programming it, and both options will increase download size anyway.

Then, it has to find out on what script to use:
The internal drive is D:, the external one E:. So when the copy is done and the checkbox to eject the disc is still active, it will check if the drive it was copying from is drive 1 or drive 2. Then it will simply run the appropriate script. (The check should only happen at the end of the copy, because things can change in the meantime. For example, if both drives are external and I detach the first one because I don't need it anymore, then the second drive will become the first drive, so the script that is aimed to the second drive won't work anymore).

It might not be neccessary to do that, as I have seen someone on the linked site writing stuff with
Code:
WScript.Echo "No drive letter passed"
WScript.Echo "Usage: "
WScript.Echo " " & WScript.Arguments.Item(0) & " {LETTER|*}"
so I think it might be possible to determine the drive to eject using the letter instead of a number. But I have no idea what that code means and so I am not able to test it. If you can get it to work, then the former stuff is not needed at all, and AnyDVD can just pass the drive letter instead of the number. That would be safer, as the letter always stays the same even if I connect or disconnect something else.


I added "WScript.Sleep 2000" to the top of the script, so it does not eject the disc immediately. It will wait 2 seconds before ejecting the disc, just in case. If that is not neccessary, since AnyDVD will only run this script if the copy is done anyway, you can remove that part or change it to 1000/500, so it will only wait 1 sec etc.

It is neccessary to implement it in AnyDVD directly, because when I tried what would happen when I run the script during an active copy, it ejected the disc immediately and AnyDVD complained. So the script has to be run by AnyDVD when the copy is finished. There is no other way.
Yes, there is a way to start an external program when the media changes, but that seems to be only to set the display frequency. And also only when the media changes. But not when the copy is done. So even if you don't want to implement it directly into AnyDVD (although that would be the best way), then you'd still have to add support for it, because right now I can see no way to let AnyDVD run a script if the copy is done.

Of course I am happy to beta-test it before you release it, since I already tried the script and it is my request, so I know what I expect it to do.



About the two other things I asked in the edit of the first post:
-The green progress bar is only important, because I have it running in the background and I have to check the windows every now and then to see the progress. But if you implement the possibility to eject the disc, I will notice that it is done when the drive opens, so it is not that neccessary anymore in that case.
The eject feature is more important for me than the green progress indicator. And since I use two windows on my laptop, it wouldn't work anyway as I just noticed. Haven't thought about that back then.
-The question regarding the shortcuts is solved as well, as I just found out when testing it for this text.
I always had the AnyDVD Image Ripper pinned to my taskbar and since it opened AnyDVD itself instead of the copy window, I thought it doesn't work anymore. But I just tried it again and when clicking it a second time (after AnyDVD started), it opened the copy window. Silly me, why didn't I try that sooner? Normally things like these are the first thing I try when I have a problem like this and I should've figured it out way sooner.


P.S.
t is not possible and there are no plans to implement it at the moment.
What did you mean? Is it not possible OR are there no plans to implement it? Because if it is not possible, there is nothing to implement at all, but if you just didn't want to implement, then it is still possible. ;)
 
That's some very handy code there. I believe the reason you have to specify 0 for Stream/Drive 1, 1 for 2, etc. is the annoying fact that computers start counting at 0. I know I used to, in my programming, I'd sometimes purposefully add a +1 to counting variables so I, as a human, wouldn't get confused. My professors would note this and request I stop doing it. :)
 
What did you mean? Is it not possible OR are there no plans to implement it? Because if it is not possible, there is nothing to implement at all, but if you just didn't want to implement, then it is still possible. ;)

Of course could it eject a disc, if I would program it to do so. But AnyDVD is designed as a real-time decrypter similar to a real-time anti virus. You don't want it to eject discs as driver acting as part of the operating system. I actually didn't design it to... "rip". As I said: Use CloneCD. CloneBD. Something that is designed as a "ripper".
 
Of course could it eject a disc, if I would program it to do so. But AnyDVD is designed as a real-time decrypter similar to a real-time anti virus. You don't want it to eject discs as driver acting as part of the operating system. I actually didn't design it to... "rip". As I said: Use CloneCD. CloneBD. Something that is designed as a "ripper".
So you just don't want it to happen. While I can understand your intention, I cannot understand the decision.

It is very handy to have everything in one program, and AnyDVD is the easiest thing to use in ordner to create a full copy of the disc. I use CloneBD, sure, but only to create a single mp4 with german audio if neccessary, and that is less than 5%.
I don't think I can create a full copy of a disc with these programs (rip to iso yes, but not with copy protection) (yes, I know that it is not recommend to do so), and AnyDVD is much cleaner and easier to copy with than the other two. I can just open two of these small little windows and copy two discs at the same time. Much easier and faster. Imagine if I would need to open two CloneBD windows (if CloneBD even supports it) or, when I copy a DVD and a BD at the same time, two windows of two additional programs. While my PC could do it, it would be very inconvinient for me to change my process I'm used to for many many years now (not that I would do that, I did it once and dismissed everthing I did until then) and my laptop would most probably just melt (literally).

So again, while I can understand the intention of AnyDVD only being meant to be a decryptor, I can see absolutely no reason to not implement it. And I don't understand the driver part, as AnyDVD would just call the script that is saved on my computer. That script would run independently of AnyDVD. Or you mean a more elegant way by AnyDVD itself, then of course I most probably wouldn't get it, as I am no programmer. Right now, the script (although working) is useless for me, as it ejects the disc immediately without asking/waiting for AnyDVD.

AS doesn't officially support VPNs either, yet they work and are a very important part of it, as they have a big impact on the range of things you can access. And therefore, they do nothing more than supporting AS by the thing it is meant to do: downloading and preserving things from the providers.
The same way, the possibility to automatically eject the disc is no part of the original intention, but can have a (at least for me) huge impact on the copy experience as it removes the need to check the progress every now and then, since I will hear it when the tray opens. Sometimes the copy is done, but the disc keeps spinning, so I don't immediately notice it. Of course no problem if you copy only one disc today, but not if you have an entire series you want to save. Or maybe it was Prime Day and you bought five series to copy. Then it would become very handy, even more than that.
And now you even said it could be done for sure.


And as I said above, AnyDVD already can start things when the disc changes, but I cannot see how the option to change the refresh rate of your screen has anything to do with decrypting the disc. I just tried it and could set it to open "O&O ShutUp 10++.exe" when inserting a DVD without Video. And you cannot tell me that this has anything to do with decrypting the disc. So in my eyes, your point is invalid.


If you still don't want to implement this option, you should at least expand this already existing functionality to make it possible to run a script when the copy is done. The only important thing here is the possibility to set one script for each window, if you have more than one copy window open. So I can tell it to run the script for drive 0 in the window that is set to D and the script 1 on the drive that is set to E. (Or, if you understand the other example on how to use the drive letter instead, then you maybe could create one script for each drive and I could set it once, without the need to deal with the numbers.)
 
So you just don't want it to happen. While I can understand your intention, I cannot understand the decision.

It is very handy to have everything in one program, and AnyDVD is the easiest thing to use in ordner to create a full copy of the disc. I use CloneBD, sure, but only to create a single mp4 with german audio if neccessary, and that is less than 5%.
I don't think I can create a full copy of a disc with these programs (rip to iso yes, but not with copy protection) (yes, I know that it is not recommend to do so), and AnyDVD is much cleaner and easier to copy with than the other two. I can just open two of these small little windows and copy two discs at the same time. Much easier and faster. Imagine if I would need to open two CloneBD windows (if CloneBD even supports it) or, when I copy a DVD and a BD at the same time, two windows of two additional programs. While my PC could do it, it would be very inconvinient for me to change my process I'm used to for many many years now (not that I would do that, I did it once and dismissed everthing I did until then) and my laptop would most probably just melt (literally).

So again, while I can understand the intention of AnyDVD only being meant to be a decryptor, I can see absolutely no reason to not implement it. And I don't understand the driver part, as AnyDVD would just call the script that is saved on my computer. That script would run independently of AnyDVD. Or you mean a more elegant way by AnyDVD itself, then of course I most probably wouldn't get it, as I am no programmer. Right now, the script (although working) is useless for me, as it ejects the disc immediately without asking/waiting for AnyDVD.

AS doesn't officially support VPNs either, yet they work and are a very important part of it, as they have a big impact on the range of things you can access. And therefore, they do nothing more than supporting AS by the thing it is meant to do: downloading and preserving things from the providers.
The same way, the possibility to automatically eject the disc is no part of the original intention, but can have a (at least for me) huge impact on the copy experience as it removes the need to check the progress every now and then, since I will hear it when the tray opens. Sometimes the copy is done, but the disc keeps spinning, so I don't immediately notice it. Of course no problem if you copy only one disc today, but not if you have an entire series you want to save. Or maybe it was Prime Day and you bought five series to copy. Then it would become very handy, even more than that.
And now you even said it could be done for sure.


And as I said above, AnyDVD already can start things when the disc changes, but I cannot see how the option to change the refresh rate of your screen has anything to do with decrypting the disc. I just tried it and could set it to open "O&O ShutUp 10++.exe" when inserting a DVD without Video. And you cannot tell me that this has anything to do with decrypting the disc. So in my eyes, your point is invalid.


If you still don't want to implement this option, you should at least expand this already existing functionality to make it possible to run a script when the copy is done. The only important thing here is the possibility to set one script for each window, if you have more than one copy window open. So I can tell it to run the script for drive 0 in the window that is set to D and the script 1 on the drive that is set to E. (Or, if you understand the other example on how to use the drive letter instead, then you maybe could create one script for each drive and I could set it once, without the need to deal with the numbers.)
It's KISS. Keep it simple, stupid. AnyDVD focuses on ripping / decrypting discs. That's it. I tortured James already by supporting Libredrive and therefore also official drives. A lot of side effects may happen by supporting more functions. Just use your script. I never had any demand for such a function. But I think you could do it running a script using Imgburn with AnyDVD running in the background. Again - such a function is completely useless for me personally.
 
BTW- SamuriHL has some nice scripts ripping discs with Makemkv and Imgburn. You just need to extend them.
 
And as I said above, AnyDVD already can start things when the disc changes, but I cannot see how the option to change the refresh rate of your screen has anything to do with decrypting the disc. I just tried it and could set it to open "O&O ShutUp 10++.exe" when inserting a DVD without Video. And you cannot tell me that this has anything to do with decrypting the disc. So in my eyes, your point is invalid.
AnyDVD is part of the OS. The filesystem, other programs, badly written drivers, the OS itself... might have files open on a disc. Removing a disc is like pulling the rug from under others.
It might work, it might cause subtle problems, it might be dangerous.
 
It might work, it might cause subtle problems, it might be dangerous.
I can accept that you don't want to directly implement it into AnyDVD itself, but then please help me to get it to work in another way.
I wouldn't be that insistive about it, when I could just do it myself. So please read the thread entirely, as in the second part I try to explain why I still need your help (or what my issues are), regardless if you want to implement it into AnyDVD or not.


I looked again today and found Wizmo.
When creating a shortcut to the exe, paired with wizmo quiet open=f:, the drive will open immediately.
So the only thing to do is to expand the already existing functionality of running something when the media changes, to allow the user to specify this command for the event "copy done" and for each drive connected (D:, E: ...). Maybe AnyDVD can even pass the drive letter by itself, so I only paste the command with a wildcard wizmo quiet open=*:? If not, there has to add this command more than once, if you have more than one drive.

I can understand that you have more issues with this than me, since you are a programmer and the writer of AnyDVD, so you have a bigger unterstanding of the technical stuff. However, from the users perspective, there is no reason to not do it.
And by adding a warning (like you already do when copy to image and copy to protected image, but I can do so nevertheless) you can say that when another program should crash by this because it cannot access the disc anymore, it is not AnyDVDs fault.

In addition, I want to explain why I don't think that this will happen. When I copy a disc, AnyDVD is the only programm accessing the drive. Otherwise I would hear the laser moving around, since it has to read two things at the same time (as it happens when the copy is running and I open the disc in VLC). This never happend. Also, when I am in front of my computer, I check the progress every now and then (what I wouldn't have to do anymore if this function gets added) and when I see that there are only a few seconds left, I wait. Then, when AnyDVD tells it is done, I immediately eject the disc. Just like the script would do. And never did anything happen.
So I can understand your concerns, but I am asking you to also understand my point, because from my experience in the past few years I cannot see any issue with that. And I did not only copy a few discs.
So already by making it optional or by adding the warning as you do when copy to iso, no one can blame you if anything happens.


If you still don't want to implement it, then please tell me how I can expand the script I have to make it recognize the event "copy done". I already looked for automation programs. They can run the script, sure, but since I have no idea how to tell it what "copy done" looks like, I have no idea what to use as a trigger. I will now paste the text I already send to coopervid:
"In the german thread linked at the beginning, someone said there is an api or stuff like that, but not how I am supposed to use it. When I try to run AnyDVD.exe or AnyDVDtray.exe with things like --help, nothing happens. It just opens the AnyDVD settings window. And the two other things devcon and ADvdDiscHlp64 at least gave something back, but since I am no programmer, I have no idea what to do there or what that stuff that devcon gives me is supposed to mean (and the AnyDVD Helper only gives me "Invalid arg: --help")."
(I had this idea because the AnyDVD Scanner has to use some commands or this api (if existing) to tell AnyDVD to create a logfile, so I thought maybe I can expand my script using these commands, telling AnyDVD to copy the protected iso and then the script itself will know that AnyDVD is done and continues with the eject part).

I then found the Windows Taskscheduling (tl from german: Aufgabenplanung, no idea if it is called Taskscheduling in en) and it might be possible with that.
You can tell it to use a specific event as a trigger, either by Hardware events or Program (see screenshot), but since I have no idea what "copy done" is supposed to be (and because I can't find AnyDVD in the list there), I am stuck at this point.
2022-09-07_120614.png
If you could tell me what to do here, I could then set the script to be run. By using program as a trigger however, it might not recognize the drive that is done (unless the process IDs for both drives are different, even though it is the same event), so it could eject both drives instead of just the one it should.
So maybe Hardware-events is the better option, since it might recognize the drive itself to be done, but there I don't know what to choose from of the two existing options (screenshot). That's why I still need your help, even if you don't want to implement it in AnyDVD itself.
2022-09-07_121105.png

SamuriHL has some nice scripts ripping discs with Makemkv and Imgburn. You just need to extend them
It is nice that SamuriHL has scripts for it and that you send me them, but as you said they are for MakeMKV and ImageBurn, not for AnyDVD. And since I am no programmer, I have no idea how to rewrite them or if it is even possible to use commands with AnyDVD (as explained above).
So thanks for trying to help me, but sadly it was not successfull, at least for now.



@DrXenos In your comment you said that you have a script for it, using AutoIt. I took a look and it indeed looks like a program where you have to write code, so nothing for me.
Would you consider sending me this script?
Please remove the text-to-phone part though, as I don't need really need it. Or make two versions, with only one containing this text-to-phone part.
 
@DrXenos[/USER] In your comment you said that you have a script for it, using AutoIt. I took a look and it indeed looks like a program where you have to write code, so nothing for me.
Would you consider sending me this script?
Please remove the text-to-phone part though, as I don't need really need it. Or make two versions, with only one containing this text-to-phone part.

Hi, DeepSpace. It's already in a forum post somewhere, and has instructions removing text message part. If you have trouble finding it, let me know and I'll search.

Edit:
I found it.
https://forum.redfox.bz/threads/new-licence-new-feature.69406/#post-438948
 
Last edited:
Thank you, I will take a look and tomorrow I should get the 4k Discs of the first Star Trek movies, so I can directly try to use it.
I will update you whenever I was able to get it or not.
 
Thank you! :thankyou:
First, it didn't work. Probably because I messed something up. Then I tried it again, and it still didn't work. I thought that it uses some sort of OCR to get the status of AnyDVD, rendering it useless for me (since I always do something else while ripping, but that would cover the AnyDVD windows).
Luckily, this was easily resolved as it was just because I have AnyDVD set to german. As soon as I set it to english, it worked, also when running in the background!

Then I tried what happens when I use both drives I have. So I connected the second one, edited the script and re-run it. Then I let AnyDVD do it's work and again, it worked! The external drive was faster, but it only ejected this one drive, not both of them. It then ejected the Asus as soon as it was done too.


In the meantime, I got the message that the mentioned Star Trek discs got shipped, even the Collectors Edition of the first movie that was supposed to release next week?. So I will try it again with these discs and if it is working again, I will mark this thread as solved.

I have only one question: Are you interested in updating the script to other languages? I don't really care as I can speak english, it is only unfamiliar for me to use AnyDVD in another language, as I had it set to german for years now.
But other people, who can only speak their language, might have issues with that. And AnyDVD supports many languages.



What's not working though was the part to open the copy window with the script. It can start AnyDVD, but then it seems to be unable to find the tray icon. Sometimes I could see the right-click window, but that was at the left of the taskbar, where the Start menu button is located. Maybe this then broke my first version of the script, as I tried to comment it out. I always only get the error message "Ripping window failed to open."
That is no issue for me at all, as I always manually open the windows I need when ripping anyway and then, the script seems to skip this part and I get no error. So I only want to mention it as FYI.
 
Also I lerned that it is possible to use keys like r, i and e with AnyDVD tray. Never heard of that before.
 
Here is an updated version. I learned (the hard way) after writing it that there can be several systrays. Don't know why...
 

Attachments

  • anydvd.au3.zip
    1.9 KB · Views: 7
Here is an updated version. I learned (the hard way) after writing it that there can be several systrays. Don't know why...
Thanks. It is working now, but maybe only for one drive. It opened one window and then gave me the error message again. No need to worry though as I only did a quick test now to report back, I will look closer tomorrow.

Never heard of several systrays, but I am using Windows 11. If you have another version, there might be a difference. Also, I use the ExplorerPatcher to get the proper taskbar back, maybe the script is having issues with that. I would need to try it on my laptop, as I haven't used the Patcher there until now.

I will also try if this new version works with the german AnyDVD, just in case you changed anything (and out of interest).

One thing to notice: It seems that there are more lines in the new version now, so the line numbers on what to exclude to disable the mail stuff are different. I want to sleep now and maybe you update it again, so I will post the new line numbers tomorrow in case anyone needs them. You can just search the script for "mail" though, it should work as well.
 
Back
Top