[cpp-sp] branch main updated: Probe for admin before running the install

Codeberg noreply at shibboleth.net
Mon Jun 15 14:11:44 UTC 2026


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository cpp-sp.

View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/15c7723c407ba54ad568caa194561b627e38f0f3

The following commit(s) were added to refs/heads/main by this push:
     new 15c7723c Probe for admin before running the install
15c7723c is described below

commit 15c7723c407ba54ad568caa194561b627e38f0f3
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Jun 15 15:11:55 2026 +0100

    Probe for admin before running the install
---
 WindowsInstall/install.bat | 7 +++++++
 WindowsInstall/update.bat  | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/WindowsInstall/install.bat b/WindowsInstall/install.bat
index 7b7a7f53..64dc8392 100644
--- a/WindowsInstall/install.bat
+++ b/WindowsInstall/install.bat
@@ -1,6 +1,13 @@
 @echo off
 Rem Install SP agent
 
+Rem probe for admin
+net session 1> nul 2> nul
+if %errorlevel% NEQ 0 (
+   Echo Cannot install kit.  This command needs to be run with administrative rights.
+   exit /b
+)
+
 setlocal
 
 Rem Find FQP for root of installation
diff --git a/WindowsInstall/update.bat b/WindowsInstall/update.bat
index 739c7947..2b1f3dc3 100644
--- a/WindowsInstall/update.bat
+++ b/WindowsInstall/update.bat
@@ -1,6 +1,13 @@
 @echo off
 setlocal
 
+Rem probe for admin
+net session 1> nul 2> nul
+if %errorlevel% NEQ 0 (
+   Echo Cannot update installation.  This command needs to be run with administrative rights.
+   exit /b
+)
+
 Rem fail if parameters is not a distribution
 
 Rem find kit root

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list