Jump to content
Tilman

Internal SDK Error from command line tool

Recommended Posts

I created the following batch script for my father to do regular backups of his irreplaceable data to CD/DVD using the command line version of CDBurnerXP. This has worked quite reliably for years on his desktop PC running Windows 7 Professional 64 bit.

@echo off
set CDCmd="%ProgramFiles(x86)%\CDBurnerXP\cdbxpcmd.exe"
REM -- for CD:
REM set CDOpts=-speed:24 -dao -close
REM -- for DVD:
set CDOpts=-close

for /f "tokens=1-3 delims=. " %%i in ('date /t') do (
set DAY=%%i
set MONTH=%%j
set YEAR=%%k
)

%CDCmd% --eject
cls
echo --- DVD Backup %YEAR%-%MONTH%-%DAY% ---
echo Please close Firefox and Thunderbird!
echo Insert an empty DVD and
pause
REM -- notebook drive cannot close programmatically
REM %CDCmd% --load
%CDCmd% --burn-data %CDOpts% -name:Sich%YEAR%%MONTH%%DAY% -folder[\Dietrich]:%UserProfile%\Dropbox\Dietrich -folder[\GeswSich]:C:\GeswSich -folder[\Firefox]:%APPDATA%\Mozilla\Firefox -folder[\Thunderbird]:%APPDATA%\Thunderbird -folder[\StarMoney]:"%ALLUSERSPROFILE%\StarMoney 9.0\profil"
%CDCmd% --eject
echo --- DONE ---
echo Please remove the disk and
pause
%CDCmd% --load

Now I have replaced his aging PC by a notebook computer also running Windows 7 Professional 64 bit. (He is reluctant to switch to either Windows 8 or Windows 10.) I installed the latest version 4.5.6 of CDBurnerXP and copied over my script, but it refuses to work on the new machine. Every attempt to burn a DVD fails with the message:

cdburnerxp An error (80040275) occured while executing the command: Internal SDK error:

Burning the data on the same machine with the GUI version of CDBurnerXP works fine.

What can I do to make my script work on the new machine?

Share this post


Link to post
Share on other sites

The error message doesn't really make it easy to determine the issue. One issue that I see is that you do not specify a drive number explicitly. I'd suggest to output the list of detected drives and then selecting the correct device per command line argument.

Share this post


Link to post
Share on other sites

The --list-drives command lists a single drive, with drive number 0. Here's the transcript:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\Dietrich>set CDCmd="%ProgramFiles(x86)%\CDBurnerXP\cdbxpcmd.exe"

C:\Users\Dietrich>%CDCmd% --list-drives
0: TSSTcorp CDDVDW SN-208AB  (D:\)

C:\Users\Dietrich>

Consequently, I added the argument -device:0 to all the cdbxpcmd commands in my script. That didn't change the behaviour in any way. The --burn-data command still outputs:

An error (80040275) occured while executing the command: Internal SDK error:

Note that the --eject command works fine, with and without the -device:0 argument. It outputs:

Ejecting disc...

and the DVD tray opens.

The --load command does not work either, but I expected that, as notebook drives cannot pull in their tray. That's why I commented it out in my script.

Is there any way to get additional diagnostic output from cdxpcmd to find out what's going wrong?

Share this post


Link to post
Share on other sites

Another potential issue could be missing files or folders...the command line version doesn't make all these safety checks you get in the GUI, so if there is a problem, it may result in an error like that (the StarBurn error reporting has never been great unfortunately).

Share this post


Link to post
Share on other sites

I'm afraid I don't quite get your point. Are you referring to files or folders belonging to or needed by the software, or to files or folders I'm trying to burn to the DVD? And what is StarBurn? Is it part of CDBurnerXP?

Share this post


Link to post
Share on other sites
On 15.3.2016 at 10:18 PM, Tilman said:

or to files or folders I'm trying to burn to the DVD?

This one. Maybe you could just try burning a single file or folder to check if it's the content that cause the issue?

On 15.3.2016 at 10:18 PM, Tilman said:

And what is StarBurn?

The burning library used by CDBurnerXP.

Share this post


Link to post
Share on other sites

Thanks for your suggestions. They helped me to narrow down the problem to a specific folder which cannot be burned. It's the StarMoney profile folder:

-folder[\StarMoney]:"%ALLUSERSPROFILE%\StarMoney 9.0\profil"

If I remove that argument from the list, the --burn-data command works fine. If I try to burn only this folder, the Internal SDK error message is triggered again.

As my father recently upgraded to StarMoney 10 I also tested:

-folder[\StarMoney]:"%ALLUSERSPROFILE%\StarMoney 10\profil"

That triggered exactly the same error. However if I burn only the documents subfolder with:

"-folder[\StarMoney]:%ALLUSERSPROFILE%\StarMoney 10\profil\document"

it works fine. So there seems to be something in the profile folder outside the document subfolder which causes CDBurnerXP to choke. Any idea what that might be?

I'm attaching a directory listing (dir /a /s) of the profile folder in case it provides a hint.

I'm inclined to exclude permission problems as copying the same folder to a USB stick with robocopy works without a problem.

Thanks, Tilman

dir-profil.txt

Share this post


Link to post
Share on other sites

I receive this same error, when any of the files in that directory is opened in another application. Try to make sure that no running application is accessing any file in any of the directories you have specified on the command line for burning with CDBurnerXP's command line interface. Let us know, if that solves the problem.

Share this post


Link to post
Share on other sites

The problematic folder belongs to a specific application, StarMoney. That application wasn't running when I did the tests, so I'm reasonably sure no running application was accessing any file in that folder.

On Linux I'd just use the lsof command to verify. Are you aware of an equivalent command on Windows?

Share this post


Link to post
Share on other sites

You could use the "Process Explorer" by SysInternals. It features a search function (look out for a toolbar button with a spy glass), where you can enter a fragment of a file name (or directory name I think) and it will show you all matching processes. That might help... It's a pity that CDBurnerXP doesn't provide more information about such error conditions. :-(

Share this post


Link to post
Share on other sites

It could still be that files are in use, as there might be background processes running. Suggestion: Try deleting the folder. If some files are locked by other applications, Windows should give you an error message possibly even mentioning the process.

The GUI version of CDBurnerXP should give you a list of all affected files too though. If you don't get an error there, maybe it also matters which file system you use. The files don't look like there should be a file name issue, but it's worth checking both file systems.

 

Share this post


Link to post
Share on other sites

After another remote debugging session, the mystery is solved thanks to SysInternals Process Explorer. (Thanks to darkchamber for the suggestion.)

The file "C:\ProgramData\StarMoney 10\profil\ou.lck" is being kept open by a process called StarMoneyOnlineUpdate.exe, apparently StarMoney's update service.

Of course there's really no need to back up that file. It's a simple lock file of size 0. Is there a way to tell cdbxpcmd to skip that file and just burn everything else in the "profil" folder?

Share this post


Link to post
Share on other sites

Good to see that you was able to find out about the culprit using Process Explorer. :)

I'm afraid there is no command line option available for CDBurnerXP to exclude individual files. What I would probably do is copying the folder to another location before calling CDBurnerXP. Using the command line tool Robocopy for that would allow you to exclude files easily. Then you could burn the copied folder and specify the desired location in the CD's folder hierarchy. It's a workaround, but it would help you getting the result you are looking for.

Share this post


Link to post
Share on other sites

Pity. It would be a nice enhancement for cdbxpcmd to either skip specific files, or any files it cannot access (because they are held open by another process, because of lacking permissions, or for whatever other reason there may be).

Absent that, although your suggestion of making a copy with robocopy is a good one, I guess the easier solution might be to stop the StarMoneyOnlineUpdate service in my script before the --burn-data command, and start it again after the burning is completed. That's of course assuming it is a proper service which can be controlled through the sc command. I'll have to check that.

Share this post


Link to post
Share on other sites
On 4.4.2016 at 9:03 PM, Tilman said:

Pity. It would be a nice enhancement for cdbxpcmd to either skip specific files, or any files it cannot access (because they are held open by another process, because of lacking permissions, or for whatever other reason there may be).

I wouldn't want it to skip all files it cannot access and store on CD/DVD. This would finally mean that an unknown number of files wouldn't be backed up without my knowledge. Of course there could be some specific error code and error/warning output with a lost of files that haven't been stored to the medium, but that would still be a mediocre solution to the problem. The main question would be to have CDBurnerXP access the shadow copies of such files on Windows. This would allow it to read the files even if they are opened in another program.

Share this post


Link to post
Share on other sites

Well, I didn't say I'd want it to skip them silently. But I insist it would be much better to at least back up the files it can, instead of aborting the whole operation and leaving me with no backups at all as it does now.

In the case I presented, it would be the perfect solution if cdbxpcmd wrote a line "file ou.lck in use - skipped" to standard error or a log file and burned the remaining files and folders. Nothing would be lost. There's no need to back up a lock file anyway. There are many similar cases where the file that's kept open can be reproduced easily and doesn't constitute a reason for aborting the whole operation.

Using shadow copies would certainly be nice, but I fear that's asking too much from a CD burning tool.

Share this post


Link to post
Share on other sites

I fully agree with you, Tilman. I also found it extremely annoying that CDBurnerXP wouldn't burn anything in that case. Even worse: it doesn't tell you, why. It could at least print a list of locked files in such situations. That would have been very helpful for tracking down the issue.

Share this post


Link to post
Share on other sites
2 hours ago, floele said:

I will add a check to the next version of CDBurnerXP, so that files in use will be listed in the command line window.

That would be great. Could you also print the name of the process, which locks the files? Or more importantly: skip these files and burn all the other files?

Thanx for your great work! :)

Share this post


Link to post
Share on other sites

Nope, getting the blocking process isn't that easy and not always possible either.

But these files will be skipped and not abort the burning process.

Share this post


Link to post
Share on other sites

That's great. Thanks for your work!

As for the blocking process, once you know which file is in use you can either guess which program is using it, or find out using Sysinternals Process Explorer. That's good enough for me.

Share this post


Link to post
Share on other sites
42 minutes ago, floele said:

Nope, getting the blocking process isn't that easy and not always possible either.

But these files will be skipped and not abort the burning process.

I agree with Tilman. This is great news and definitely a huge improvement for everybody, who is using the command line API of CDBurnerXP.

Thanx so much for listening to our feedback and implementing this changed behavior. :-)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.