> -----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.

>
> 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

Reply via email to