delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Date: | Wed, 15 May 2002 15:14:48 -0500 |
From: | David T-G <davidtg-cygwin AT justpickone DOT org> |
To: | "CygWin Users' List" <cygwin AT cygwin DOT com> |
Subject: | Re: Better solution for calling 'net use' from Cygwin Perl? |
Message-ID: | <20020515201448.GJ9220@justpickone.org> |
References: | <7BFCE5F1EF28D64198522688F5449D5A0AA30F AT xchangeserver2 DOT storigen DOT com> |
Mime-Version: | 1.0 |
In-Reply-To: | <7BFCE5F1EF28D64198522688F5449D5A0AA30F@xchangeserver2.storigen.com> |
User-Agent: | Mutt/1.3.99i |
--yr/DzoowOgTDcSCF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Scott, et al -- =2E..and then Scott Prive said... %=20 % Hello, Hello! %=20 % I had a .sh script that called Microsoft's "net use" command to mount dri= ves under Win2k, and this worked: % net use 't:' '\\myserver\share' Makes sense. %=20 % However I needed to do this in Cygwin Perl so I could leverage an existin= g set of Perl libraries I have. %=20 % For the life of me I could correctly execute the "net use" command from P= erl, because the characters would get escaped or not interpreted correctly. I take it you mean you *couldn't*, right? %=20 % The Perl workaround a coworker devised was: % my $cmd =3D "net use 't:' '\\"; % $cmd .=3D "\\storigen1u21\\sfstest'"; % print $cmd; % system $cmd; %=20 % and this DOES work. This would be the end of story, except we want to und= erstand what caused the problem in the first place. I suspect it was the br= ain dead Microsoft command processor getting involved with this system call. I hate to be picky, but it's worth checking since it certainly ought to work. Did you try my $cmd =3D "net use 't:' '\\\\storigen1u21\\sfstest'"; in the course of your efforts? %=20 % Anyone care to elaborate? Thanks, HTH & HAND %=20 % Scott :-D --=20 David T-G * It's easier to fight for one's principles (play) davidtg AT justpickone DOT org * than to live up to them. -- fortune cookie (work) davidtgwork AT justpickone DOT org http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! --yr/DzoowOgTDcSCF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD4DBQE84sG4Gb7uCXufRwARAgolAJitjdenx++8Gx46Qpf/HSHcT1VOAJ9WwiJI hayLRcqCiaMRd3oOPGjaww== =ArHS -----END PGP SIGNATURE----- --yr/DzoowOgTDcSCF--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |