Jump to content
Sign in to follow this  

cdbxpcmd - SendTo - ISO (using for VMs)

Recommended Posts

Hi there,


I wrote a VBScript for burning an ISO from a number of files for mounting "local files" in a Virtual Machine.

Perhaps there is someone who might need this, too. I'm absolutely new to VBS, but the result works fine for me.

Just link the vbs-Script to your "Windows SendTo folder", set the correct exe in variable cdbxpcmd and it should work.

Option Explicit
Dim openCMD, tomp, home, defisoname, isoname, verz, WSShell, WSShellProcess, UserName, iCount, currentArg, outputarray, xvar, cdbxpcmd

cdbxpcmd = "C:\Portables\CDBurnerXP-\cdbxpcmd.exe"

Set openCMD = CreateObject("WScript.Shell")
Set WSShell = CreateObject("WScript.Shell")
Set WSShellProcess = WSShell.Environment("PROCESS")
UserName = WSShellProcess("USERPROFILE")

home = UserName & "\Desktop\"
defisoname = Year(Date) & Right("0" & Month(Date),2) & Right("0" & Day(Date),2)

isoname = 0
isoname=InputBox("Iso will be created at: " & vbCRLF & vbCRLF & home & vbCRLF & vbCRLF & "","Enter a file name or accept",defisoname )

If isoname = "" then
  defisoname = "" & isoname & ""
End If

iCount = wScript.Arguments.Count
if not iCount = 0 then
  for currentArg=0 to iCount-1
  outputArray = split(wScript.Arguments(currentArg),"\")
    for each xvar in outputArray
    verz = "" & xvar & ""
  tomp=tomp & " -folder[" & chr(34) & chr(92) & verz & chr(34) & "]:" & chr(34) & wScript.Arguments(currentArg) & chr(34)

openCMD.Run "" & cdbxpcmd & " --burn-data" & tomp & " -iso:" & chr(34) & home & defisoname & chr(34) & ".iso"

End If

I'm sure you could do this better, so just leave a comment.




- mark the files/folders you want to have in the iso

- right (mouse) click on one of the files/folders

- navigate to "SendTo" in the contextmenu (or wherever you have the script) or drag/drop the files/folders on the script-file

- enter a name for the iso (without extension "iso") or use the default (YYYYMMDD) and click the OK-Button (CANCEL now cancels the process - before it continued with the defaultname.)

- the iso-file should now be found on your user's desktop


Share this post

Link to post
Share on other sites

Didn't try, but if it works: Nice one ;)

Thank you!


Perhaps you can make this kind of a built-in feature (ISO via contextmenu). This was a rebuilt from a feature from another (non-free) ISO-Software (M*g*c ISO).

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


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.