X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 71ACF385E00F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1692324113; bh=i//+ndJLWoREo8QLwcDcITsBfv8w7nOk7eUUW9/7/70=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Xr+jfYpwbwsC55w41N44Xqa6vFBgtSBqLVSI4/wsH1cbuQBy8Wwusi8NBG65Ta8Gb FzCRF2ggoGI1xk4bzvh71BNEBvZP5OBqfucw3klOPN09V7DNiKIgSHULD1iy06Kvw5 g/uS+mCNpu8zb2ayB0+CLlSDZZ+j0sB/5sSjMBx0= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 369363858C74 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692324073; x=1692928873; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=W9BtJDlCIP1uwvEh8+36ZbnOWtuIhG7cD+EwlBkbNQs=; b=WIuwNIqQrxib3v/1wnxKG4GJyOoVYanEI4lvbWo7Rc7hi3FrKjqKB2xFBIfSNtxuS3 YtE256VD9DNigZNR2ULEQOGRiKU/L6Zxg6dczQ9hVnySvOJzZzd3l1O+QHc4a3X9PPjr CiWP6IxO+dyfkBuErWYWucMmruyPf5/quEtiTKqbJTAcxiX5PyyUmdgQ8JbQa7XjSlhB kSpDJ+qn4mkDeCtl/CqOCYgt/e0gMYOzN2eZCirFdKLPqhYy3nKW+9iPSI4cnITZ/Nt1 T+o2UIxEcljU2vb9AXW7/U6/th1RQotST7N+FrWOW75BPmhfRmBhYEaaT+9+CE0sRuEV VHNA== X-Gm-Message-State: AOJu0YwgN9/DbpGyo45CSNC7U1nT3jIHgbA42pdPBE0rUDO2VWSM1mX4 7Ya74fqVLHJjdwg6ZdBRshuxV5YTdqmeBkggQpMOwdZ6L8A= X-Google-Smtp-Source: AGHT+IGlaGZmL10cs3tcoqIW5zmMThgCglbjC6glG7Ub7w2lO+RZ06QMBAsACfFMnWnHN3Ni26N7T5bWqbUeAGHW/SM= X-Received: by 2002:aca:1c07:0:b0:3a7:c2e8:5e7c with SMTP id c7-20020aca1c07000000b003a7c2e85e7cmr1270321oic.43.1692324073174; Thu, 17 Aug 2023 19:01:13 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 18 Aug 2023 04:01:01 +0200 Message-ID: Subject: Test for Windows Administrator permissions from Cygwin terminal|script? To: cygwin AT cygwin DOT com X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Martin Wege via Cygwin Reply-To: Martin Wege Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Hello, How can I find out whether the current Cygwin terminal has Administrator rights? I want to safeguard our admin scripts with a simple test and bail out with an error if someone wants to do admin stuff (say: regtool) without admin privileges. Thanks, Martin -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple