RBFfile = "v1190_Rev0.7.rbf"
ba = InputBox ("Insert Base Address (Hex 32 bit)")
cmd = "CVUpgrade " & RBFfile & " " & ba

set WshShell = WScript.CreateObject("WScript.shell")
ret = wshShell.run(cmd, 1, true)

if ret = -2 then
  MsgBox "Can't open file CVupgrade_params.txt", 64, "CAEN VME Upgrade"
elseif ret = -3 then
  MsgBox "Can't open file " & RBFfile, 64, "CAEN VME Upgrade"
elseif ret = -4 then
  MsgBox "Can't open the VME controller", 64, "CAEN VME Upgrade"
elseif ret = -5 then
  MsgBox "VME Error: the board at Base Address " & ba & " does not respond", 64, "CAEN VME Upgrade"
else
  MsgBox "Firmware upgraded successfully. Power cycle to load it", 64, "CAEN VME Upgrade"
end if


