Results 1 to 4 of 4

Thread: RESOLVED: SHELL command - having trouble using parameters

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Krass's Avatar
    Join Date
    Aug 2000
    Location
    Montreal
    Posts
    489

    RESOLVED: SHELL command - having trouble using parameters

    Hello,

    I want to convert a line of code that's been using within a batchfile, to vb6:
    Code:
    C:
    cd "\Program Files (x86)\VMware\VMware Workstation" 
    call vmrun stop "C:\__VMWARE MACHINES\Machine1\Machine1.vmx" hard
    This works! It runs vmrun.exe, using the parameter 'stop', then the path of the file... (which successfully stops a virtual machine)

    In vb6 I've tried the following:
    Shell "C:\Program Files (x86)\VMware\VMware Workstation\vmplayer.exe", vbNormalFocus
    ...this works. I tried running vmplayer.exe just to make sure I'm heading the right way.

    Then tried the following:
    Shell "C:\Program Files (x86)\VMware\VMware Workstation\vmrun stop C:\__VMWARE MACHINES\Machine1\Machine1.vmx", vbNormalFocus
    ...This didn't work. I've tried many alterations, adding quotation marks here and there (to encapsulate the .vmx part), trying double-quotes, even 8dot3 paths.

    So easy from a batch file... but still clueless on how to do it straight from vb6..

    Any help greatly appreciated!
    Last edited by Krass; Feb 26th, 2014 at 05:37 PM. Reason: *Resolved*
    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width