Denaes Posted September 26, 2003 Posted September 26, 2003 This line: System.Diagnostics.Process.Start(Path) is used for vb to start another application. Apparently, this starts up the application with its' current directory being your applications directory. ex: your program is starting in "C:\MyVBNetDirectory\" System.Diagnostics.Process.Start(C:\ApplicationDirectory\Application.exe") It looks like this will result in the files 'working directory' being "C:\MyVBNetDirectory" If the application you're running uses absolute paths, then all works pretty well. Also having the dll's registered with the system makes it happy. Apparently I found a piece of professional (Novell) software which this isn't the case. I try to run a Novel Backup from another directory and I get an error that it can't find the Dll's, which are located in this applications directory. It works when I move my VB.Net application over to the Novell Directory, but when its in its own directory, I get the error. I'd much rather have one directory with ALL of my .net applications in it, rather than having them all spread to the winds in random directories. Is there another way to start an application or to insure the application starts in its own directory? Quote
dannyres Posted September 26, 2003 Posted September 26, 2003 you will have to do something like this: Dim P as New Process P.StartInfo.WorkingDirectory = "Novell Dir" P.StartInfo.FileName = "Novell Exe" P.Start() Dan Quote
Denaes Posted September 27, 2003 Author Posted September 27, 2003 I'm not at work until monday again, but that looks logically sound to me. Set the WorkingDirectory, exe and start it. I'll try that, thank you :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.