Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21096

RESOLVED: SHELL command - having trouble using parameters

$
0
0
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!

Viewing all articles
Browse latest Browse all 21096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>