GAM Posted April 12, 2014 Posted April 12, 2014 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
GAM Posted April 12, 2014 Author Posted April 12, 2014 A correction : Please read $GuestPwd = "Welcome2world" as $GuestPwd = "Welcome2mcafee" Neil
Developers Jos Posted April 12, 2014 Developers Posted April 12, 2014 (edited) 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 April 12, 2014 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.
GAM Posted April 12, 2014 Author Posted April 12, 2014 Hey, it worked after I replaced "" with ">". Very bad on my part, it was a very silly mistake. Thanks a lot jos. Neil
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now