[cpp-sp] 01/01: CPPSP-53 Replace Windows Installer with Bat and C program (for registry operations)

Codeberg noreply at shibboleth.net
Fri Apr 3 15:47:30 UTC 2026


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

codeberg pushed a commit to branch dev/CPPSP-53
in repository cpp-sp.

View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/39374ad278828052c31a00c178c415ca2c917723

commit 39374ad278828052c31a00c178c415ca2c917723
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Apr 3 16:47:31 2026 +0100

    CPPSP-53 Replace Windows Installer with Bat and C program (for registry operations)
    
    https://shibboleth.atlassian.net/browse/CPPSP-53
    
    More debugging
---
 WindowsInstall/install.bat   | 12 ++++++------
 WindowsInstall/uninstall.bat | 20 +++++++++++++-------
 WindowsInstall/update.bat    | 10 +++++++---
 3 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/WindowsInstall/install.bat b/WindowsInstall/install.bat
index 040ee31f..2cb96993 100644
--- a/WindowsInstall/install.bat
+++ b/WindowsInstall/install.bat
@@ -15,14 +15,14 @@ if "%TargetDir%" == "" set TargetDir=%loc%
 
 rem - Fail if lib or bin exist
 if exist "%TargetDir%\bin\shibboleth-sp" (
-   echo %TargetDir%\bin\shibboleth-sp exists.  Agent may already be installed
-   echo Did you mean %TargetDir%\bin\shibboleth-sp\update ?
-   exit /b
+    echo %TargetDir%\bin\shibboleth-sp exists.  Agent may already be installed
+    echo Did you mean %TargetDir%\bin\shibboleth-sp\update ?
+    exit /b
 )
 if exist "%TargetDir%\lib\shibboleth-sp" (
-   echo %TargetDir%\lib\shibboleth-sp exists.  Agent may already be installed
-   echo Did you mean %TargetDir%\bin\shibboleth-sp\update ?
-   exit /b
+    echo %TargetDir%\lib\shibboleth-sp exists.  Agent may already be installed
+    echo Did you mean %TargetDir%\bin\shibboleth-sp\update ?
+    exit /b
 )
 
 Rem Call generic "install/update" bar file shipped with this release
diff --git a/WindowsInstall/uninstall.bat b/WindowsInstall/uninstall.bat
index 4307f774..4b0314ee 100644
--- a/WindowsInstall/uninstall.bat
+++ b/WindowsInstall/uninstall.bat
@@ -5,20 +5,26 @@ REM
 
 Rem Goto root of install - we are running from %targetDir%\dist-4.x.7\dist-bin\
 
-cd %dp0..\.
+cd /d %1%
+set TargetDir=%cd%
+
+if not exist "%targetdir%\bin\shibboleth-sp" (
+   echo "No installation found %targetdir%
+   exit /b
+)
+
 if exist %SYSTEMROOT%\System32\INETSRV\appcmd.exe (
     echo Uninstalling ShibAgent module from IIS
     %SYSTEMROOT%\System32\INETSRV\appcmd.exe delete module ShibAgent
     %SYSTEMROOT%\System32\INETSRV\appcmd.exe uninstall module ShibAgent
 )
-set base=%cd%
 
-echo Removing %base%\bin\shibboleth-sp\
-rd /s /q "%base%\bin\shibboleth-sp"
+echo Removing %TargetDir%\bin\shibboleth-sp\
+rd /s /q "%TargetDir%\bin\shibboleth-sp"
 
-echo Removing %base%\lib\shibboleth-sp\
-rd /s /q "%base%\lib\shibboleth-sp"
+echo Removing %TargetDir%\lib\shibboleth-sp\
+rd /s /q "%TargetDir%\lib\shibboleth-sp"
 
-echo Not touching %base%\etc\shibboleth-sp\
+echo Not touching %TargetDir%\etc\shibboleth-sp\
 
 echo "just add code to remove [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D9DA52E3-F96E-4C84-B153-C3B17C34F730}]" and reg keys
diff --git a/WindowsInstall/update.bat b/WindowsInstall/update.bat
index 033efd0d..d9661548 100644
--- a/WindowsInstall/update.bat
+++ b/WindowsInstall/update.bat
@@ -4,15 +4,19 @@ setlocal
 
 rem fail if parameters is not a distribution
 
-if not exist "%1%\dist\dist-bin\doupdate.bat" (
+rem find kit root
+cd %1%
+set kit_root=%CD%
+
+if not exist "dist\dist-bin\doupdate.bat" (
    echo "%1% is not a Shibboleth agent distribution"
    exit /b
 )
 
 rem find root of install
-cd %~dp0..
+cd %~dp0..\..
 set install_path=%cd%
 
-cd "%1%\dist\dist-bin\"
+cd "%kit_root%\dist\dist-bin\"
 cmd /c doupdate.bat "%install_path%"
 

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


More information about the commits mailing list