Link to home
Start Free TrialLog in
Avatar of Amirlit
Amirlit

asked on

How do I start cmd in a specific directory?

Hi,

I am calling

myproc.Start("cmd.exe", "/c " & Finline)

this calls wscript to run a vb script. But since the script is looking for files that don't exist in the directory that cmd defaults to

C:\Documents and Settings\userx>

the vbscript fails to run correctly. Does anyone have any idea's on how I can make it that the cmd shell starts off in a specific directory when it calls the vbscripts outside of creating a batch file?

I need it to start in

c:\myapp\myappinfo>

Thanks!

Amir
Avatar of vinnyd79
vinnyd79

use chdir.

ChDrive "D:"
ChDir "D:\SomeDir"
ASKER CERTIFIED SOLUTION
Avatar of vinnyd79
vinnyd79

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Amirlit

ASKER

Thank you...that did it!

Amir