Re: Process.Start() on Terminal Server.
John Warner <[email protected]> Thu, 19 Nov 2009 14:55:06 -0500
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Organization | House |
| Message-ID | <04c601ca6952$312cba10$93862e30$@com> |
Have you tried the 'last' overload of Start() It takes a user name and ID, I wonder if that would make a difference? John Warner > -----Original Message----- > From: Discussion of advanced .NET topics. [mailto:ADVANCED- > [email protected]] On Behalf Of Phil Sayers > Sent: Thursday, November 19, 2009 1:43 PM > To: [email protected] > Subject: [ADVANCED-DOTNET] Process.Start() on Terminal Server. > > We have a line of business, Winforms client/server application. > > .Net 3.5 SP1. > > > > One of our customers is a heavy terminal services user. We've found that as > soon as 1 person has started our application on the terminal server, no one > else can start it up. > > > > I think the same problem is described here (not my ee post): > > http://www.experts- > exchange.com/Programming/Languages/C_Sharp/Q_24726101.htm > l > > But the "accepted solution" isn't really a solution. > > > > Our application is launched with small stub on the end user machine > (installed via elevated MSI per-machine into "program files"), and we use > file copy & process.start() fairly liberally so that the stub will download > any updates to itself, and restart itself with the most current version > before continuing to download the real application and then finally launch > that with process.Start. > > > > I'm wondering if our liberal usage of process.start() is killing us. > > > > Our code for Process.Start usage is.. > > > > 'copy stub to a user specific temp folder and restart. > > Dim Mydir As New DirectoryInfo(My.Application.Info.DirectoryPath) > > Dim tempDir As New DirectoryInfo(Path.Combine(New > IO.DirectoryInfo(Application.LocalUserAppDataPath).Parent.FullName, > "temp")) > > Dim thisExecFile As New FileInfo(New > Uri(Assembly.GetExecutingAssembly.CodeBase).LocalPath) > > > > Dim newExePath As String = String.Empty > > newExePath = Path.Combine(tempDir.FullName, thisExecFile.Name) > > Process.Start(newExePath, "arguments") > > Application.Exit() > > > > (there's a different code path for when the stub is started with args passed > in, but I don't think that is part of the problem at the moment) > > > > Is anyone aware of issues and workarounds with process.start and terminal > services? > > > > Thanks > > Phil > > > > > =================================== > View archives and manage your subscription(s) at > http://peach.ease.lsoft.com/archives =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives