X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7750E3857BA4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1691744145; bh=SYhUZAX7Qc9LD82FCb8GWeOI7mxjsCwR6vndkrv945Y=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=obL32pYMponBvtmF3ufCu1gob22ww8TbA5+DISnUKmmTfr/aL54adjEcQ3OkPCuGg zc53i2lT1FGfjh+fFVQlbag2SRG6HwXnLzLIe0ukNSgdInOOmwY5J4QNcE62JQvVDc giiNY0ciJFmUqraGJmY5JdIvxxEVDILse0F5szfw= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 546FF3858CD1 Date: Fri, 11 Aug 2023 10:55:07 +0200 To: Martin Wege Subject: Re: Cygwin breaks net use Z: /delete in scripts? Message-ID: Mail-Followup-To: Martin Wege , cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen , cygwin AT cygwin DOT com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" First of all, do not send unsolicited email to my private address. Especially, please don't use my company email address. Keep Cygwin stuff on the cygwin list. On Aug 11 10:25, Martin Wege wrote: > Hello, > > Cygwin somehow breaks unmounting of network shares, but ONLY if the > net use /delete happens in a bash shell script. > > Example: > Mount SMB network share on Z: > Do not touch Z:! > > Then do a net use /delete in a bash script: > net use Z: /delete > Systemfehler 1794 aufgetreten. > Der Redirector wird verwendet und kann nicht aus dem Speicher entfernt werden. > > If I execute the net use Z: /delete in an interactive bash shell it works. > > Can anyone explain this? Something is wrong on your side, but no, I can't explain it. It's not related to Cygwin: $ cat > b.sh <