473,378 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Opening a DOS window with some path

48
Hi there,

Can anyone tell me how to open a DOS window from a VB.NET app pointing to my own path which I pass as a parameter. For ex: I want the DOS window to be opened with D:\TestBed\MyApp\. All I want to know is how do I pass the path "D:\TestBed\MyApp" to the DOS window.

Thanks in advance,
Aads
Apr 5 '09 #1
2 1110
Enij
13
Hi,

I found this works:

Expand|Select|Wrap|Line Numbers
  1. System.Diagnostics.Process.Start("cmd", "/k cd\test")
  2.  
where 'cd\test' navigates to the folder you want to start in. (using VB.net 2003 Standard Ed. with Windows XPsp2)

EDIT:

You can also use:
Expand|Select|Wrap|Line Numbers
  1. System.Diagnostics.Process.Start("cmd", "/k h: && cd\test")
  2.  
after /k you can write additional arguments separated by 2 ampersands - the above example takes me to my H: drive and changes the folder to H:\TEST\
Apr 5 '09 #2
Aads
48
Cheers buddy - that solved my problem.

Thanks,
Aads
Apr 6 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Evan Kontos | last post by:
I am using the window.open function to open a small window and I am using GET to get values back from that window. I want to be able to open another from the second window but I get an error...
44
by: Carlos Andr?s | last post by:
Hi everybody. I've got a problem. I'd like to avoid opening a new window when you have pressed the shift key and you click in the left button of the mouse. I've tried the next solution, in the...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
1
by: Westbrook, Christopher L (WESTBCL04) | last post by:
I am having some trouble, and I can't figure out why. I'm trying to use the simple keylogger project from source forge, and then create a web interface to open the resulting files, so people from...
5
by: Cedric | last post by:
Hi Folks, I'm wondering if someone has already succeed to open a word2000 document located on server side with javascript code executed by a web browser on client side. In fact, i make it...
0
by: Lyle Fairfield | last post by:
I was prompted to think about this by a couple of MLH's recent posts. Whether this is what he !!!!really!!!! wanted, I don't know. This code is supposed to open an e-mail in edit mode, although I...
1
by: hemsla29 | last post by:
Open1.Attributes.Add("onclick", "window.open('" + path + "' ); return false;") i am using an button name open1 while clicking i have to do some process and have to open the processed file in...
34
by: Alexnb | last post by:
Gerhard Häring wrote: No, it didn't work, but it gave me some interesting feedback when I ran it in the shell. Heres what it told me: Traceback (most recent call last): File...
0
by: bbrewder | last post by:
I am struggling with some MSAccess automation issues. Basically, we have a .Net application that uses MSAccess for reporting (legacy code). We are able to launch MSAccess fine and even work with...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.