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

Where to insert "application.startuppath" code?

Hello experts,
I want my external application run from the root folder where my
project (.exe) resides. For example, my main project (.exe) should be
in the same directory with my external file works with parameter "-b".
But i couldn't know where to insert application.startuppath. That code
block works OK but "doit.exe" only runs from "c:\". I want it to run
in any directory as enough to be in the same directory with my
compiled exe project. Here is my code:

Dim psInfo As New System.Diagnostics.ProcessStartInfo("c:\doit.exe", "-
b")
psInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal
Dim myProcess As Process =
System.Diagnostics.Process.Start(psInfo)
myProcess.WaitForExit()
MsgBox("Completed", MsgBoxStyle.Information, "Completed")
How can i configure or put application.startup line?

Thank you.

Oct 6 '07 #1
3 1606
Kimi,

I assume you mean this one?

http://msdn2.microsoft.com/en-us/lib...artuppath.aspx

Cor

Oct 7 '07 #2
On Oct 7, 6:10 pm, "Cor Ligthert[MVP]" <notmyfirstn...@planet.nl>
wrote:
Kimi,

I assume you mean this one?

http://msdn2.microsoft.com/en-us/lib....forms.applica...

Cor
Hello Cor,
Thanks for your response. Good article but i couldn't know where to
put, i get some errors when debugging about "overload failed because
no acceptable "new"...bla bla".

How can i re-organize my code and make my external process run from
root folder where my main project resides?

Thanks.
Oct 7 '07 #3
Hi again :)

Ok i've fixed by typing:

psinfo.workingdirectory = application.startuppath before
process start line.

Now it's OK. Very thanks.

Oct 7 '07 #4

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

Similar topics

4
by: Microsoft | last post by:
I'm trying to display a word document inside a web page, but everytime I do I get this error: Error Type: Microsoft VBScript runtime (0x800A0046) Permission denied: 'CreateObject' Does...
4
by: Darryl Kerkeslager | last post by:
Below is a section of the code I use to open Word with late binding, insert text at the selected bookmarks, and make Word visible. Everything works fine. However, I also have some Word check...
4
by: Julie | last post by:
I stumbled across Application from someone else's code, and I can't find out squat about by searching MS, Google, or Google Groups. For the most part, this is returning the fully-qualified name...
5
by: KC | last post by:
Hi, I have code similar to this.. Dim xlApp As Object xlApp = CreateObject("Excel.Application", "\\MyServer") The call is from a asp.net (Intranet) application. \\Myserver is a network...
2
by: Arjen | last post by:
Hello, I want to check if an directory exist. Directory.Exists(Application + "/Uploads/") I'm doing this inside a asp.net web project in a class file. Here is the error message. The name...
4
by: Keith Chadwick | last post by:
I am having some trouble referencing an Application("myVar") variable from within a module.vb file on my ASP.NET site. According to the documentation I should be able to reference...
0
by: CWogksch | last post by:
Hello, Everyone... My name is Chris Wogksch. I have a point of sale application developed in VB6 using MS Access 2003 as the database. I've been running versions of this app for over eight...
2
by: Fredrik Lundh | last post by:
Dudeja, Rajat wrote: A Python program consists of a script file (the py file you run to start the program), and usually one or more additional module files (py files that you import). The...
3
by: Joca | last post by:
I'm making a program that at some point needed to know what the path to it's own directory was, so i quickly made a side project just to test how this works ending up with the use of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.