.bat example
Previous  Top  Next

' This script will execute an external .bat file from a network share inside of the virtual environment
' The .bat file can make modifications to the virtual environment by copying files, deleting files, or
' apply registry changes using regedit /s regfile.reg

' We need to make sure we only execute this for the first parent process
' otherwise each copy of cmd.exe will execute the script and we'll have infinite recursion

Function OnFirstParentStart
Set Shell = CreateObject("Wscript.Shell")
Shell.Run "\\jcdesk2\test\test.bat"
End Function