modernrocketry
12-05-2007, 07:17 PM
Using version 5.7
I have a "Run Script" step that works fine outside of Visual Build Pro, but not within.
The failure is on the line "Call objVirtualServer.CreateVirtualMachine("APP_%BUILDNUM%", VMFolderPath)
What am I doing wrong?
Full script as follows
Builder.LogMessage "BEGIN: Create the Virtual PC"
VMFolderPath = "%VIRTPCDIR%\%BUILDNUM%"
Builder.LogMessage "The Virtual PC location is: %VIRTPCDIR%\%BUILDNUM%"
Set objVirtualServer = CreateObject("VirtualServer.Application")
Set objShell = CreateObject("Wscript.Shell")
objShell.CurrentDirectory = "%VIRTPCDIR%\%BUILDNUM%"
Builder.LogMessage "The current directory is: "+objShell.CurrentDirectory
'Create a new VM
Builder.LogMessage "The Virtual PC name is: JMPS_%BUILDNUM%"
Call objVirtualServer.CreateVirtualMachine("JMPS_%BUILDNUM%", VMFolderPath)
Set objVirtualMachine = objVirtualServer.FindVirtualMachine("JMPS_%BUILDNUM%")
Builder.LogMessage "END: Create the Virtual PC"
I have a "Run Script" step that works fine outside of Visual Build Pro, but not within.
The failure is on the line "Call objVirtualServer.CreateVirtualMachine("APP_%BUILDNUM%", VMFolderPath)
What am I doing wrong?
Full script as follows
Builder.LogMessage "BEGIN: Create the Virtual PC"
VMFolderPath = "%VIRTPCDIR%\%BUILDNUM%"
Builder.LogMessage "The Virtual PC location is: %VIRTPCDIR%\%BUILDNUM%"
Set objVirtualServer = CreateObject("VirtualServer.Application")
Set objShell = CreateObject("Wscript.Shell")
objShell.CurrentDirectory = "%VIRTPCDIR%\%BUILDNUM%"
Builder.LogMessage "The current directory is: "+objShell.CurrentDirectory
'Create a new VM
Builder.LogMessage "The Virtual PC name is: JMPS_%BUILDNUM%"
Call objVirtualServer.CreateVirtualMachine("JMPS_%BUILDNUM%", VMFolderPath)
Set objVirtualMachine = objVirtualServer.FindVirtualMachine("JMPS_%BUILDNUM%")
Builder.LogMessage "END: Create the Virtual PC"