> -----Original Message----- > From: André Warnier [mailto:a...@ice-sa.com] > Sent: Saturday, March 23, 2013 8:10 PM > To: Tomcat Users List > Subject: Re: runtime.exec "cmd.exe /C net use" > > Harris, Jeffrey E. wrote: > > > >> -----Original Message----- > >> From: Patrick Flaherty [mailto:pflah...@rampageinc.com] > >> Sent: Saturday, March 23, 2013 5:22 PM > >> To: Tomcat Users List > >> Subject: runtime.exec "cmd.exe /C net use" > >> > >> Hi, > >> > >> I'm trying to run the following command ( runtime.exec "cmd.exe /C > >> net use" ) from my tomcat app and it's returning : > >> > >> net use > >> New connections will be remembered. > >> > >> There are no entries in the list. > >> > >> This only happen when I run as a Windows service. If I run the > tomcat > >> batch file to start tomcat then "net use" returns all my mapped > >> network drives. The service login is an account that has access to > >> the network shares as my app uses those shares, but the service > login > >> should not preclude the command from executing properly. If I > >> substitute "dir" for "net use" > >> that works and I get a directory listing. The combo of "net use" > >> command using cmd.exe and running as a service seems to be the > >> conflict. > >> > >> Any input much appreciated. > >> > >> Thanks > >> Pat > > I would add that it is kind of doubtful that this has anything directly > to do with Tomcat, or even Java. Maybe that question would belong more > to some Windows forum. > > > > > ---------------------------------------------------------------------
I absolutely agree. I would expect to see the same behavior with Apache HTTPD, IIS, or any other service that accesses mapped drives. It is a question of how service accounts behave in the windows architecture, rather than something specific with Tomcat. Jeffrey Harris This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org