473,406 Members | 2,549 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,406 software developers and data experts.

Launch an app from inside a vb program

Jm
Hi all

Im using System.Diagnostics.Process.Start to launch external apps from my
app but the working directory seems to point to where my app is located. How
can i get around this and basically say the working directory is the path of
the app that im launching ? I used shellexec api under vb6 is there an
equivalent built into .net ? Any help is greatly apprecuated

Thanks

Nov 21 '05 #1
3 3219
Have a look at the ProcessStartInfo class.

http://msdn.microsoft.com/library/de...classtopic.asp

Hope this helps.
Chris.

"Jm" wrote:
Hi all

Im using System.Diagnostics.Process.Start to launch external apps from my
app but the working directory seems to point to where my app is located. How
can i get around this and basically say the working directory is the path of
the app that im launching ? I used shellexec api under vb6 is there an
equivalent built into .net ? Any help is greatly apprecuated

Thanks

Nov 21 '05 #2
"Jm" <ja*****@ihug.com.au> schrieb:
Im using System.Diagnostics.Process.Start to launch external apps from my
app but the working directory seems to point to where my app is located.
How
can i get around this and basically say the working directory is the path
of
the app that im launching ?


\\\
Dim psi As New ProcessStartInfo()
psi.FileName = "C:\foo.exe"
psi.WorkingDirectory = Path.GetDirectoryName(psi.FileName)
Process.Start(psi)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
Jm
Hi Herfried

Just what i needed

Thanks

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:#H**************@TK2MSFTNGP09.phx.gbl...
"Jm" <ja*****@ihug.com.au> schrieb:
Im using System.Diagnostics.Process.Start to launch external apps from my app but the working directory seems to point to where my app is located.
How
can i get around this and basically say the working directory is the path of
the app that im launching ?


\\\
Dim psi As New ProcessStartInfo()
psi.FileName = "C:\foo.exe"
psi.WorkingDirectory = Path.GetDirectoryName(psi.FileName)
Process.Start(psi)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: nushin | last post by:
Try to launch a test program that prints hello world for a minute or so using, spawnv( ) or spawnl( ). Check to see the process state code that the program is running. I am using RedHat Linux 7.3...
0
by: Jeff Cooper | last post by:
Hi folks, I have a small VB app and I've created a deployment project for it. At the end of installation I would like the user to get a prompt like "Run your new program now? yes/no" -- or...
2
by: Peter Ignarson | last post by:
Hi there - I am writing a paint program (I am following a learning tutorial, there is no point to writing a paint program) and I want to extend it so that I can copy the contents of my drawing and...
4
by: Ernesto | last post by:
I'm trying to launch a seperate telnet window from within my python program. The command I thought I was supposed to use is below: os.system("telnet.exe -f C:\Folder\output.txt localhost 6000")...
1
by: sylsau | last post by:
Hello, I wrote a JAVA program which uses the JAVA API JDOM 1.0 (of this site www.jdom.org) I put the archive jdom.jar in the directory /usr/share/java/jdom.jar and I added this path in the...
5
by: jmsxp | last post by:
Hi all, I am in my infancy with programming, so please forgive stupid questions... I am attempting to write a C# program that will launch Trillian (well, that is just a part of the overall...
8
by: Marcus | last post by:
I have this application I have made that I launch when the user logs into Windows XP. I would like to delay the launch of the application so that it starts 1 minute after the user has logged in. ...
0
by: salad | last post by:
I took the Bart down to San Francisco and joined a couple thousand other nerds to watch the Vista/Office launch. The receptionist was quite pleasant and getting the event packets a smooth...
1
BezerkRogue
by: BezerkRogue | last post by:
I have created a VB Script to synchronize software versions and then launch an application on the system it is run against. The script runs and generates no errors but will not launch the second...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.