Jump to content

Runwait is not working


GAM
 Share

Recommended Posts

HI,
 
I trying to copy a file from Host operating system to Guest operating system via VMWare-Workstation. The command prompt appears but disappears in a split of a second. Not sure where am going wrong. Can someone help please?
 
Here is the script that I have written...
 
$VWRunEXEPath = "C:Program Files (x86)VMwareVMware Workstation>vmrun.exe"
$GuestUserName = "agovada"
$GuestPwd = "Welcome2world"
$VMXPathOfTheOS = """C:VMImagesVista-64Vista x64.vmx"""
$SourcePathOfVSE = """C:dataVSE RP4 RTW.zip"""
$TargetPathOfVSE = """C:buildsrp4.zip"""
 
RunWait(@ComSpec  & " /c " & "'" & $VWRunEXEPath & " -T ws -gu " & $GuestUserName & " -gp " & $GuestPwd & " copyFileFromHostToGuest " & $VMXPathOfTheOS & " " & $SourcePathOfVSE & " " & $TargetPathOfVSE &"'")
 
NOTE : If I execute the command on cmd prompt then it works fine. Here's the actual command : "C:Program Files (x86)VMwareVMware Workstation>vmrun.exe" -T ws -gu agovada -gp Welcome2mcafee copyFileFromHostToGuest "C:VMImagesVista-64Vista x64.vmx" "C:dataVSE RP4 RTW.zip" "C:test1rp4.zip"
 
Thanks in advance.

Neil

Link to comment
Share on other sites

  • Developers

Are you sure you want the > in stead of a before vmrun.exe?

Change the /C to /K on your CMD.exe line to keep the CMD window open to check for messages.

Jos

ps this has similar quotations as your example commandline:

RunWait(@ComSpec  & ' /k "' & $VWRunEXEPath & '" -T ws -gu '  & $GuestUserName & ' -gp ' & $GuestPwd & ' copyFileFromHostToGuest "' & $VMXPathOfTheOS & '" "' & $SourcePathOfVSE & '" "' & $TargetPathOfVSE & '"')
Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

×
×
  • Create New...