On Mar 24, 2013, at 3:46 PM, Harris, Jeffrey E. wrote:
-----Original Message-----
From: Patrick Flaherty [mailto:pflah...@rampageinc.com]
Sent: Sunday, March 24, 2013 3:37 PM
To: Tomcat Users List
Subject: Re: runtime.exec "cmd.exe /C net use"
On Mar 24, 2013, at 2:56 PM, André Warnier wrote:
Harris, Jeffrey E. wrote:
-----Original Message-----
From: Patrick Flaherty [mailto:pflah...@rampageinc.com]
Sent: Sunday, March 24, 2013 12:18 PM
To: Tomcat Users List
Subject: Re: runtime.exec "cmd.exe /C net use"
On Mar 24, 2013, at 10:24 AM, Harris, Jeffrey E. wrote:
-----Original Message-----
From: Patrick Flaherty [mailto:pflah...@rampageinc.com]
Sent: Sunday, March 24, 2013 10:20 AM
To: Tomcat Users List
Subject: Re: runtime.exec "cmd.exe /C net use"
On Mar 23, 2013, at 10:00 PM, David Kerber wrote:
(**) Maybe this is a hint to the OP : what happens if you ignore the
result of the first command call, and try the same command a second
time ?
And I agree : there a bit of hocus-pocus here, but then many things
are, in a Windows environment.
You are not hearing me. The drives are mapped and set to reconnect at
logon. Therefore if I reboot my machine the network drive mapping are
in place after logging in. I *do not* try and map a drive from within
my app. My app has full access to the network shares as soon as my
app
is up. No problem with network shares and my app ! My app needs to
read
and write to those network share to function and has no problems.
I think we have a failure to communicate here.
Mappings set to reconnect are NOT the same as having access to a
share.
If you have access to the share, it is does not depending on a
mapping. The
mapping only assigns a particular drive letter to a UNC.
Within your application, do you actually access the mappings by
letter, or by
UNC?
The problem is after I'm up and running, I try to run "cmd.exe /C net
use" from within the app it does not return any mapped drives. it
returns:
net use
New connections will be remembered.
There are no entries in the list.
We understand that. What we are trying to tell you if you want
those mappings
to appear (regardless of whether they are already mapped or not), we
think you
need to dynamically map them within your application. Otherwise, we
think you
will continue to experience the situation you describe above.
Again, the return above happen only when running as a service but
works fine when tomcat starts from startup.bat in a console. Works
fine
means it returns drive letter, unc equivalent etc ... basically what
you normally see when you have mapped network drives and run "net
use"
from cmd.exe.
It make no sense I know but I'm at a loss.
I think it makes sense (pending further information on how you
actually access the
shares from within your application) because the application is not
actually using
a mapped drive, but using its access rights from a UNC.
Hi Jeffrey,
I think I'm getting what you might be saying. Because "net use"
returns a drive letter in its return
then the service cannot deal with it? To answer your question about
how we access shares from
within our app, we *have to* use UNC paths that already have the
proper credentials provided by
a common username & password that the service uses to login (local
account with same username
and password as an account already on the file server) So when the app
accesses the UNC path
for the first time it tries to use it's service login credentials
which we require to exist on the file
server with the shares. Therefore when we do our first network access
the service login account
is used to authenticate with the file server and because we create an
account on the file server
with the same username and password we get clean access to the shares.
I never liked having this
rule (service login name and password must exist on the file server
matching exactly) but it has
work for us for years. But getting back to net use, because drive
letters are not usable by code
running in the service, we don't get anything back from "net use"
because part of its return is
a drive letter? I hope I'm making sense, but is that the gist of what
you are saying? If it is then
it starts to make a lot more sense now.
Thanks for hanging in there with me.
Pat
Thanks again
Pat
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org