Error "Invalid directory name" in Process.Start?
I am writing a launcher, and when I go to start the process, I get an "Invalid directory name" error. Here is the code that starts the process:
Const DEBUG_ROOT = _
"Z:\Kiosk_JC\KioskSignIn.root\KioskSignIn\KioskSignIn\KioskSignIn\bin\Debug"
Dim oKiosk As New System.Diagnostics.Process
oKiosk.StartInfo.UserName = oEnc.Decrypt(Username)
oKiosk.StartInfo.Password = oEnc.DecryptSecure(Password)
oKiosk.StartInfo.Domain = oEnc.Decrypt(Domain)
''// The AddBS function appends a '\' to the passed string if it is not present
oKiosk.StartInfo.WorkingDirectory = AddBS(DEBUG_ROOT)
oKiosk.StartInfo.FileName = "KioskSignIn.exe"
oKiosk.StartInfo.UseShellExecute = False
Dim proc As Process = Nothing
proc = System.Diagnostics.Process.Start(oKiosk.StartInfo)
I saw another question here: I needed to install WorkDirectory (before I started looking, I was getting an error). Although I have this property, I am still getting the error. Any thoughts?
More details
I should also note that my Z: \ is on my network. I have a function that resolves a UNC path. When I run this function on DEBUG_ROOT I get the same error.
I tried moving the app to c: \ kiosk. The same result. I am logged in as a user, I impersonate myself, so I have access to all shared folders and files.
Here is the link, for whatever reason the url generation wants to use all the text after the link:
+1
a source to share
3 answers