Instead of the Command Prompt maybe a script in PowerShell would work? I think there's a several-part of a Tutorial about PowerShell uses.