?
Solved

How do I start  cmd in a specific directory?

Posted on 2003-02-25
3
Medium Priority
?
114 Views
Last Modified: 2010-05-01
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
0
Comment
Question by:Amirlit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 28

Expert Comment

by:vinnyd79
ID: 8021849
use chdir.

ChDrive "D:"
ChDir "D:\SomeDir"
0
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 400 total points
ID: 8021853
ChDir "c:\myapp\myappinfo"
0
 

Author Comment

by:Amirlit
ID: 8021873
Thank you...that did it!

Amir
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question