The complete folder structure has been changed or updated
This commit is contained in:
205
dev/Backup-PostgresSQLDatabase/Backup-SQLDatabase.ps1
Normal file
205
dev/Backup-PostgresSQLDatabase/Backup-SQLDatabase.ps1
Normal file
@@ -0,0 +1,205 @@
|
||||
cls
|
||||
#MK / 15.11.2024
|
||||
|
||||
import-module SQLPS -Scope Local -Force
|
||||
|
||||
Set-Variable Servername -Value "DD-VMP02-DB01\ZEIT" -Scope global
|
||||
Set-Variable SicherungsPfad -Value "E:\Sicherung\SQL" -Scope global
|
||||
Set-Variable holedatum -Value (get-date -Format 'yyyyMMdd_HHmm') -Scope global
|
||||
Set-Variable SicherungsPfadTemp -Value "$($SicherungsPfad)\$holedatum" -Scope global
|
||||
Set-Variable SicherungsPfadTempExists -Value $False -Scope global
|
||||
Set-Variable SicherungsPfadTempIsClean -Value $False -Scope global
|
||||
Set-Variable SicherungsPfadFinal -Value "\\dd-sto01\f$\DD-STO01-A3\Backup\Computer\DD-VMP02-DB01\SQL\" -Scope global
|
||||
|
||||
$dbs = Get-SqlDatabase -ServerInstance $Servername
|
||||
#######################################################################################################################
|
||||
Function Backup-SQLDatabases {
|
||||
|
||||
# Parameter definieren
|
||||
param(
|
||||
[parameter(mandatory=$true)]
|
||||
[validatecount(1, 10)]
|
||||
[string[]]$instanzen,
|
||||
[parameter(mandatory=$true)]
|
||||
[validatepattern("[A-Z]")]
|
||||
[validatecount(1,99)]
|
||||
[string]$dbs
|
||||
)
|
||||
|
||||
if( -not (test-path -Path $SicherungsPfadTemp)){
|
||||
try {
|
||||
new-item -path $SicherungsPfad -Name $holedatum -ItemType Directory -ErrorAction Stop | Out-Null
|
||||
$SicherungsPfadTempExists = $True
|
||||
|
||||
} catch {
|
||||
write-host "Ordner für Backup konnte nicht erstellt werden" -ForegroundColor Yellow
|
||||
$SicherungsPfadTempExists = $False
|
||||
}
|
||||
|
||||
} else{
|
||||
write-host "Backup-Ordner existiert bereits" -ForegroundColor Yellow
|
||||
$SicherungsPfadTempExists = $True
|
||||
}
|
||||
|
||||
IF ($SicherungsPfadTempExists = $True) {
|
||||
|
||||
# For-Schleife für mehrere Instanzen
|
||||
for($i = 0; $instanzen.count -gt $i; $i++){
|
||||
write-host "Backup von der Datenbank $dbs auf der Instanz $($instanzen[$i]) wird erstellt" -ForegroundColor Yellow
|
||||
|
||||
# Backup für remote Instanzen
|
||||
if($instanzen[$i] -ne $Servername -and !$instanzen[$i] -eq $false){
|
||||
|
||||
Write-host $args[1].Substring(1, 15)
|
||||
Write-Host $args[0]
|
||||
Invoke-Command -ComputerName $instanzen[$i].Substring(1, 15) -ScriptBlock {
|
||||
|
||||
Backup-SqlDatabase -ServerInstance $args[1].Substring(1, 15) -Database $args[0] -BackupFile "$($args[2])\$($args[0]).bak"
|
||||
|
||||
} -ArgumentList $dbs, $instanzen[$i], $pfadzumbackup, $holedatum
|
||||
}
|
||||
# Backup für eine lokale Instanz
|
||||
elseif($instanzen[$i] -eq $Servername -and !$instanzen[$i] -eq $false){
|
||||
Backup-SqlDatabase -ServerInstance $instanzen[$i] -Database $dbs -BackupFile "$SicherungsPfadTemp\$($dbs).bak"
|
||||
|
||||
} else{
|
||||
write-host "$($instanzen[$i]) existiert nicht"
|
||||
}
|
||||
} # ende von for-schleife
|
||||
|
||||
}
|
||||
}
|
||||
#######################################################################################################################
|
||||
#Call backup task for every db
|
||||
|
||||
#target must be online
|
||||
if ((test-path -Path $SicherungsPfadFinal) -and (New-Item -Path $SicherungsPfadFinal -Name "AccessTest.tmp" -ItemType "file" -Force -ErrorAction Stop)) {
|
||||
|
||||
Write-Host "Final Path is reachable"
|
||||
Remove-Item -Path "$SicherungsPfadFinal\AccessTest.tmp" -Force -ErrorAction Continue
|
||||
|
||||
Write-Host "Checking for garbage in: $SicherungsPfad"
|
||||
$Items = Get-ChildItem -LiteralPath $SicherungsPfad -Recurse:$False -Force -ErrorAction SilentlyContinue | Where-Object { $_.PSIsContainer }
|
||||
If ($Items) {
|
||||
Try {
|
||||
FOREACH ($Item in $Items) {
|
||||
Write-Host "Moving '$($Item.FullName)' to '$SicherungsPfadFinal'"
|
||||
Move-Item -Path $($Item.FullName) -Destination $SicherungsPfadFinal -Force -ErrorAction Stop
|
||||
}
|
||||
$SicherungsPfadTempIsClean = $True
|
||||
|
||||
} Catch {
|
||||
Write-Host "Cannot clean up temp dir!"
|
||||
Write-Host $Error[0].ToString()
|
||||
$SicherungsPfadTempIsClean = $False
|
||||
}
|
||||
|
||||
} Else {
|
||||
$SicherungsPfadTempIsClean = $True
|
||||
}
|
||||
|
||||
If ($SicherungsPfadTempIsClean -eq $True) {
|
||||
|
||||
FOREACH ($db in $dbs) {
|
||||
|
||||
[string]$db = $db
|
||||
$db = ($db.replace("[",""))
|
||||
$db = ($db.replace("]",""))
|
||||
|
||||
If ($db -ne "tempdb" -and $db -ne "master" -and $db -ne "model" -and $db -ne "msdb") {
|
||||
Write-Host "Sicherung von $db"
|
||||
Backup-SQLDatabases -instanzen $Servername -dbs $db
|
||||
}
|
||||
}
|
||||
#######################################################################################################################
|
||||
#move dir incl. backup files to sto01
|
||||
|
||||
Try {
|
||||
write-host $SicherungsPfadTemp
|
||||
Move-Item -Path $SicherungsPfadTemp -Destination $SicherungsPfadFinal -Force -ErrorAction Stop
|
||||
} Catch {
|
||||
Write-Host "Error moving files!"
|
||||
Write-Host $Error[0].ToSting()
|
||||
}
|
||||
}
|
||||
|
||||
} Else {
|
||||
|
||||
Write-Host "Target is offline!"
|
||||
|
||||
}
|
||||
|
||||
#################################################################
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Sichert alle PostgreSQL-Datenbanken per pg_dump.
|
||||
|
||||
.DESCRIPTION
|
||||
Dieses Skript liest alle Datenbanken vom Server aus und erstellt
|
||||
für jede ein komprimiertes SQL-Dump-File mit Zeitstempel im Dateinamen.
|
||||
|
||||
.PARAMETER Host
|
||||
Hostname oder IP-Adresse des PostgreSQL-Servers.
|
||||
|
||||
.PARAMETER Port
|
||||
Port, auf dem PostgreSQL-Verbindungen akzeptiert (Standard: 5432).
|
||||
|
||||
.PARAMETER User
|
||||
Benutzername für die Authentifizierung.
|
||||
|
||||
.PARAMETER Password
|
||||
Passwort für den Benutzer (wird in Umgebungsvariable PGPASSWORD abgelegt).
|
||||
|
||||
.PARAMETER BackupPath
|
||||
Verzeichnis, in dem die Backup-Dateien abgelegt werden.
|
||||
|
||||
.EXAMPLE
|
||||
.\Backup-Postgres.ps1 -Host "db-server" -Port 5432 `
|
||||
-User "backupuser" -Password "geheimesPasswort" `
|
||||
-BackupPath "C:\Backups\Postgres"
|
||||
#>
|
||||
|
||||
param (
|
||||
[Parameter(Mandatory = $true)] [string]$Host,
|
||||
[Parameter(Mandatory = $false)] [int] $Port = 5432,
|
||||
[Parameter(Mandatory = $true)] [string]$User,
|
||||
[Parameter(Mandatory = $true)] [string]$Password,
|
||||
[Parameter(Mandatory = $true)] [string]$BackupPath
|
||||
)
|
||||
|
||||
# Datum und Uhrzeit für Dateinamen
|
||||
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
|
||||
|
||||
# Umgebungsvariable für pg_dump-Passwort
|
||||
$env:PGPASSWORD = $Password
|
||||
|
||||
# Backup-Verzeichnis anlegen, falls nicht vorhanden
|
||||
if (!(Test-Path -Path $BackupPath)) {
|
||||
New-Item -ItemType Directory -Path $BackupPath | Out-Null
|
||||
}
|
||||
|
||||
# Liste aller Datenbanken abrufen (ohne Template-DBs)
|
||||
$databases = & psql -h $Host -p $Port -U $User -t -c "SELECT datname FROM pg_database WHERE datistemplate = false;" `
|
||||
| ForEach-Object { $_.Trim() } | Where-Object { $_ -ne "" }
|
||||
|
||||
foreach ($db in $databases) {
|
||||
Write-Host "Sichere Datenbank '$db'..." -ForegroundColor Cyan
|
||||
|
||||
$dumpFile = Join-Path $BackupPath "$($db)_$($timestamp).sql.gz"
|
||||
|
||||
# pg_dump mit gzip komprimieren
|
||||
& pg_dump -h $Host -p $Port -U $User -F p -d $db `
|
||||
| gzip > $dumpFile
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host " Backup erfolgreich: $dumpFile" -ForegroundColor Green
|
||||
}
|
||||
else {
|
||||
Write-Host " Fehler bei Backup von $db" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
# Passwort aus Umgebungsvariable entfernen
|
||||
Remove-Item Env:\PGPASSWORD
|
||||
Write-Host "Alle Backups abgeschlossen." -ForegroundColor Yellow
|
||||
|
||||
45
dev/Backup-PostgresSQLDatabase/Backup-SQLDatabase_Caller.cmd
Normal file
45
dev/Backup-PostgresSQLDatabase/Backup-SQLDatabase_Caller.cmd
Normal file
@@ -0,0 +1,45 @@
|
||||
@ECHO OFF
|
||||
TITLE DIGITAL DATA - Run all files in directory with current permissions
|
||||
ECHO -
|
||||
ECHO Batch Script
|
||||
ECHO Run all files in directory with current permissions
|
||||
ECHO -
|
||||
ECHO Digital Data
|
||||
ECHO Ludwig-Rinn-Strasse 16
|
||||
ECHO 35452 Heuchelheim
|
||||
ECHO Tel.: 0641 / 202360
|
||||
ECHO E-Mail: info@didalog.de
|
||||
ECHO -
|
||||
ECHO Version 1.0.0.0
|
||||
ECHO Date: 13.08.2015
|
||||
ECHO -
|
||||
ECHO Program Startup %date% at %time:~0,8% oclock, on %computername%.
|
||||
|
||||
REM --------------------------------------------------------------
|
||||
REM ------------------------set variables-------------------------
|
||||
REM --------------------------------------------------------------
|
||||
|
||||
setlocal enableextensions
|
||||
|
||||
SET DIRECTORY="%cd%"
|
||||
SET FILEEXTENSION=*.ps1
|
||||
SET COUNT=0
|
||||
|
||||
REM --------------------------------------------------------------
|
||||
REM ---------------------Program 1 / Script 1---------------------
|
||||
REM --------------------------------------------------------------
|
||||
|
||||
FOR /F "tokens=*" %%f in ('dir /S /b %FILEEXTENSION%') do (ECHO %%f && set /a count+=1)
|
||||
ECHO -
|
||||
ECHO Found %count% File(s) with File Extension %FILEEXTENSION% in Directory:
|
||||
ECHO %DIRECTORY%.
|
||||
|
||||
ECHO -
|
||||
ECHO Running this/them now, with your permissions!
|
||||
FOR /F "tokens=*" %%f in ('dir /S /b %FILEEXTENSION%') do (PowerShell.exe -Command "& {Start-Process PowerShell.exe -WindowStyle hidden '-ExecutionPolicy Bypass -File "%%f"'}")
|
||||
|
||||
ECHO -
|
||||
ECHO This Window will close in:
|
||||
#timeout /T 10
|
||||
endlocal
|
||||
exit
|
||||
Binary file not shown.
103
dev/Digital Data Exporter/.$DDEX.drawio.bkp
Normal file
103
dev/Digital Data Exporter/.$DDEX.drawio.bkp
Normal file
@@ -0,0 +1,103 @@
|
||||
<mxfile host="Electron" modified="2025-02-21T18:31:40.073Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.5.0 Chrome/112.0.5615.204 Electron/24.5.1 Safari/537.36" etag="ozOkLooUrvtU3FSzy9CG" version="21.5.0" type="device">
|
||||
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
|
||||
<mxGraphModel dx="1099" dy="828" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
|
||||
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="WIyWlLk6GJQsqaUBKTNV-3" target="Pj3-XqvsJGA5nLsvHgkQ-2">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="WIyWlLk6GJQsqaUBKTNV-3" value="Aufruf von SQL Prozedur:<br>[PRDEX_COLLECT_SOURCE]" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="305" y="160" width="190" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-0" target="WIyWlLk6GJQsqaUBKTNV-3">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-0" value="START<br>Zeitplan oder <br>externer Auslöser" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="340" y="42" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-2" target="Pj3-XqvsJGA5nLsvHgkQ-4">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-2" value="Lese von SQL Tabelle:<br>[TBDEX_JOB_CONFIG]<br><br>Job Parameter: Name, LogLevel,..." style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="305" y="229" width="190" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-4" target="Pj3-XqvsJGA5nLsvHgkQ-6">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-4" target="Pj3-XqvsJGA5nLsvHgkQ-9">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-4" value="Daten für Export vorhanden?" style="rhombus;whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="340" y="341.5" width="120" height="99.5" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-6" value="EXIT<br>ggf. Log" style="ellipse;whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="560" y="351.25" width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-8" value="Nein" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="466" y="362" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-9">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="400" y="616.625" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-9" value="Schreibe in SQL Tabelle:<br style="border-color: var(--border-color);">[TBDEX_QUEUE]<br><br>PK zu Daten für Export" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="305" y="492" width="190" height="70" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-11" value="Ja" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="386" y="462" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-22" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-14" target="Pj3-XqvsJGA5nLsvHgkQ-21">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-24" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-14" target="Pj3-XqvsJGA5nLsvHgkQ-23">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-14" value="Aufruf von SQL Prozedur:<br>[PRDEX_EXECUTION_MASTER]" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="305" y="601.75" width="190" height="41.25" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;dashed=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-15" target="WIyWlLk6GJQsqaUBKTNV-3">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="246" y="181" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;dashed=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-15">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="300" y="610" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="135" y="610" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-15" value="Lese von SQL Tabelle:<br>[TBDEX_RESOURCES]<br><br>Variablen und Funktionen" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="60" y="134" width="150" height="93" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-30" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-21" target="Pj3-XqvsJGA5nLsvHgkQ-29">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-21" value="Schreibe in SQL Tabelle:<br>[TBDEX_TEMP_PROCESS]<br><br>Zähler zum Export Vorgang" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="190" y="720" width="170" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-28" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-23" target="Pj3-XqvsJGA5nLsvHgkQ-27">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-23" value="Schreibe in SQL Tabelle:<br>[TBDEX_TEMP_CONTENT]<br><br>Daten zum Export Vorgang" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="440" y="720" width="160" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;dashed=1;strokeColor=default;startArrow=classic;startFill=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-25" target="Pj3-XqvsJGA5nLsvHgkQ-14">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-25" value="Lese/Schreibe SQL Tabelle:<br>[TBDEX_NUMBER_RANGE]" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="60" y="640" width="170" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-27" value="" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="460" y="890" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-29" value="" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="215" y="890" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
139469
dev/Digital Data Exporter/CreateDEX_V0.0.1.sql
Normal file
139469
dev/Digital Data Exporter/CreateDEX_V0.0.1.sql
Normal file
File diff suppressed because it is too large
Load Diff
127
dev/Digital Data Exporter/DDEX.drawio
Normal file
127
dev/Digital Data Exporter/DDEX.drawio
Normal file
@@ -0,0 +1,127 @@
|
||||
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.0.4 Chrome/128.0.6613.186 Electron/32.2.5 Safari/537.36" version="26.0.4">
|
||||
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
|
||||
<mxGraphModel dx="1434" dy="844" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
|
||||
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="WIyWlLk6GJQsqaUBKTNV-3" target="Pj3-XqvsJGA5nLsvHgkQ-2" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="WIyWlLk6GJQsqaUBKTNV-3" value="Aufruf von SQL Prozedur:<br>[PRDEX_COLLECT_INPUT]" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="305" y="160" width="190" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-0" target="WIyWlLk6GJQsqaUBKTNV-3" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-0" value="START<br>Zeitplan oder <br>externer Auslöser" style="ellipse;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="340" y="42" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-2" target="Pj3-XqvsJGA5nLsvHgkQ-4" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-2" value="Lese von SQL Tabelle:<br>[TBDEX_CONFIG_PROFILE]<br><br>Parameter: Name, LogLevel,..." style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="305" y="229" width="190" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-4" target="Pj3-XqvsJGA5nLsvHgkQ-6" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-4" target="Pj3-XqvsJGA5nLsvHgkQ-9" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-4" value="Daten für Export vorhanden?" style="rhombus;whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="340" y="341.5" width="120" height="99.5" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-6" value="EXIT<br>ggf. Log" style="ellipse;whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="560" y="351.25" width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-8" value="Nein" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="466" y="362" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-9" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="400" y="616.625" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-9" value="Schreibe in SQL Tabelle:<br style="border-color: var(--border-color);">[TBDEX_INPUT]<br><br>PK zu Daten für Export" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="305" y="492" width="190" height="70" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-11" value="Ja" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="386" y="462" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-22" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-14" target="Pj3-XqvsJGA5nLsvHgkQ-21" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-24" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-14" target="Pj3-XqvsJGA5nLsvHgkQ-23" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-14" value="Aufruf von SQL Prozedur:<br>[PRDEX_PROFILE_EXECUTION]" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="305" y="601.75" width="190" height="41.25" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;dashed=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-15" target="WIyWlLk6GJQsqaUBKTNV-3" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="246" y="181" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-15" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="300" y="610" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="135" y="610" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-15" value="Lese von SQL Tabelle:<br>[TBDEX_CONFIG_RESOURCES]<br><br>Variablen und Funktionen" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="60" y="134" width="200" height="93" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-30" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-21" target="Pj3-XqvsJGA5nLsvHgkQ-29" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-21" value="Schreibe in SQL Tabelle:<br>[TBDEX_TEMP_PROCESS]<br><br>Zähler zum Export Vorgang" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="190" y="720" width="170" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-28" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-23" target="Pj3-XqvsJGA5nLsvHgkQ-27" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-23" value="Schreibe in SQL Tabelle:<br>[TBDEX_TEMP_CONTENT]<br><br>Daten zum Export Vorgang" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="440" y="720" width="160" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;dashed=1;strokeColor=default;startArrow=classic;startFill=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-25" target="Pj3-XqvsJGA5nLsvHgkQ-14" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-25" value="Lese/Schreibe SQL Tabelle:<br>[TBDEX_CONFIG_NUMBER_RANGE]" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="10" y="640" width="220" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4reIC0GdjGwffdaKzI53-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-27" target="4reIC0GdjGwffdaKzI53-0">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="380" y="1030" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="520" y="990" />
|
||||
<mxPoint x="399" y="990" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-27" value="Schreibe in SQL Tabelle:<br>[TBDEX_OUTPUT_REFERENCES]" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="410" y="890" width="220" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4reIC0GdjGwffdaKzI53-1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="Pj3-XqvsJGA5nLsvHgkQ-29" target="4reIC0GdjGwffdaKzI53-0">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Pj3-XqvsJGA5nLsvHgkQ-29" value="Schreibe in SQL Tabelle:<br>[TBDEX_OUTPUT]" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="190" y="890" width="170" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4reIC0GdjGwffdaKzI53-0" value="Abruf über SQL View:<br>[VWDEX_OUTPUT]" style="whiteSpace=wrap;html=1;rounded=1;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="339" y="1030" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4reIC0GdjGwffdaKzI53-3" value="Lese SQL Tabellen:<br>[TBDEX_CONFIG_OUTPUT_XXX]" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="570" y="630" width="220" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="4reIC0GdjGwffdaKzI53-6" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="4reIC0GdjGwffdaKzI53-3" target="Pj3-XqvsJGA5nLsvHgkQ-14">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="470" y="401" as="sourcePoint" />
|
||||
<mxPoint x="570" y="401" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
BIN
dev/Invoke-WindowsService/Install-WindowsService.ps1
Normal file
BIN
dev/Invoke-WindowsService/Install-WindowsService.ps1
Normal file
Binary file not shown.
129
dev/Invoke-WindowsService/Install-WindowsService_Caller.cmd
Normal file
129
dev/Invoke-WindowsService/Install-WindowsService_Caller.cmd
Normal file
@@ -0,0 +1,129 @@
|
||||
TITLE DIGITAL DATA - Run all files in directory
|
||||
@ECHO OFF
|
||||
REM ----------------------------------------------------------------------------
|
||||
REM This script runs all specified files in the current directory
|
||||
REM
|
||||
REM Returns: <NOTHING>
|
||||
REM ----------------------------------------------------------------------------
|
||||
REM Copyright (c) 2024 by Digital Data GmbH
|
||||
REM
|
||||
REM Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
||||
REM Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
||||
REM ----------------------------------------------------------------------------
|
||||
REM Creation Date / Author: 13.08.2015 / MK
|
||||
REM Version Date / Editor: 24.11.2024 / MK
|
||||
REM Version Number: 2.0.0.0
|
||||
|
||||
REM --------------------------------------------------------------
|
||||
REM ------------------------set variables-------------------------
|
||||
REM --------------------------------------------------------------
|
||||
|
||||
SET /A ADMINMODE=1
|
||||
SET FILEEXTENSION=*.ps1
|
||||
|
||||
SET POWERSHELL7EXE="C:\Program Files\PowerShell\7\pwsh.exe"
|
||||
SET POWERSHELL6EXE="C:\Program Files\PowerShell\6\pwsh.exe"
|
||||
SET POWERSHELLBUILDINEXE="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
|
||||
|
||||
SET DIRECTORY="%cd%"
|
||||
SET /A COUNT=0
|
||||
SET LOGFILE="%cd%\error.log"
|
||||
|
||||
REM --------------------------------------------------------------
|
||||
REM ------------------------preparing part------------------------
|
||||
REM --------------------------------------------------------------
|
||||
|
||||
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
ECHO Program Startup %date% at %time:~0,8% o'clock, on %computername%.
|
||||
|
||||
ECHO -
|
||||
IF !ADMINMODE! EQU 1 (ECHO WARNING: In AdminMode, network drives/files will maybe be unavailable! && timeout /T 15)
|
||||
|
||||
ECHO -
|
||||
ECHO Searching for PowerShell 7...
|
||||
IF EXIST "!POWERSHELL7EXE!" (
|
||||
ECHO Found PowerShell 7 on this system.
|
||||
SET POWERSHELLEXE=!POWERSHELL7EXE!
|
||||
) ELSE (
|
||||
ECHO WARNING: Did not found PowerShell 7 on this system
|
||||
ECHO This could lead to malfunctions. Check the ..._Readme.txt file
|
||||
timeout /T 15
|
||||
ECHO Searching for PowerShell 6...
|
||||
IF EXIST "!POWERSHELL6EXE!" (
|
||||
ECHO Found PowerShell 6 on this system.
|
||||
SET POWERSHELLEXE=!POWERSHELL6EXE!
|
||||
) ELSE (
|
||||
ECHO WARNING: Did not found PowerShell 6 on this system.
|
||||
ECHO This could lead to malfunctions. Check the ..._Readme.txt file.
|
||||
timeout /T 15
|
||||
ECHO Searching for old PowerShell buildin version...
|
||||
IF EXIST "!POWERSHELLBUILDINEXE!" (
|
||||
ECHO Found old PowerShell buildin version on this system.
|
||||
SET POWERSHELLEXE=!POWERSHELLBUILDINEXE!
|
||||
) ELSE (
|
||||
ECHO ERROR: Did not found any PowerShell on this system.
|
||||
ECHO Exiting, because of this issue...
|
||||
timeout /T 15
|
||||
GOTO exit
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
REM --------------------------------------------------------------
|
||||
REM ---------------------Running Scripts---------------------------
|
||||
REM --------------------------------------------------------------
|
||||
|
||||
FOR /F "tokens=*" %%f in ('dir /S /b %FILEEXTENSION%') do (
|
||||
SET /a COUNT+=1
|
||||
)
|
||||
|
||||
ECHO -
|
||||
ECHO Found %COUNT% File(s) with File Extension %FILEEXTENSION% in Directory:
|
||||
ECHO %DIRECTORY%
|
||||
|
||||
ECHO -
|
||||
ECHO Running these scripts now:
|
||||
FOR /F "tokens=*" %%f in ('dir /S /b %FILEEXTENSION%') do (
|
||||
|
||||
ECHO -
|
||||
SET "SCRIPT=%%f"
|
||||
ECHO Running script:
|
||||
ECHO !SCRIPT!
|
||||
|
||||
ECHO -
|
||||
SET "ARGUMENTS=-NoProfile -ExecutionPolicy Bypass -File \""!SCRIPT!\"""
|
||||
ECHO With Arguments:
|
||||
ECHO !ARGUMENTS!
|
||||
|
||||
ECHO -
|
||||
SET "SUBCOMMAND=Start-Process -FilePath '!POWERSHELLEXE!' -WindowStyle hidden -ArgumentList '!ARGUMENTS!' "
|
||||
ECHO Subcommand:
|
||||
ECHO !SUBCOMMAND!
|
||||
|
||||
ECHO -
|
||||
IF !ADMINMODE! EQU 1 (
|
||||
SET "COMMAND=Start-Process powershell.exe -WindowStyle hidden -Verb runas {!SUBCOMMAND!} "
|
||||
) ELSE (
|
||||
SET "COMMAND=Start-Process powershell.exe -WindowStyle hidden {!SUBCOMMAND!} "
|
||||
)
|
||||
ECHO In nested command:
|
||||
ECHO !COMMAND!
|
||||
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "!COMMAND!"
|
||||
|
||||
IF ERRORLEVEL 1 (
|
||||
ECHO There was an error running the script: !SCRIPT! >> !LOGFILE!
|
||||
)
|
||||
)
|
||||
|
||||
REM --------------------------------------------------------------
|
||||
REM -------------------------final part---------------------------
|
||||
REM --------------------------------------------------------------
|
||||
|
||||
:exit
|
||||
ENDLOCAL
|
||||
ECHO -
|
||||
ECHO Program Complete %date% at %time:~0,8% o'clock, on %computername%.
|
||||
ECHO This Window will close in:
|
||||
timeout /T 10
|
||||
exit
|
||||
15
dev/Invoke-WindowsService/Install-WindowsService_History.txt
Normal file
15
dev/Invoke-WindowsService/Install-WindowsService_History.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Version 1.0.0.0 - 21.11.2024
|
||||
NEW: -
|
||||
FIX: -
|
||||
CHG: -
|
||||
REM: -
|
||||
|
||||
-------------------------------------legend------------------------------------
|
||||
NEW: = Added a new functionality
|
||||
FIX: = Fixed a Issue with existing functionality
|
||||
CHG: = Changed a existing functionality
|
||||
REM: = Removed a functionality
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,5 @@
|
||||
System Requirements
|
||||
|
||||
- PowerShell Version 6 or higher needs to be installed
|
||||
The path of the Powershell Exe needs to be set in the "Install-WindowsService_Caller.cmd" file.
|
||||
Like: SET POWERSHELLEXE="C:\Program Files\PowerShell\7\pwsh.exe"
|
||||
123
dev/Invoke-WindowsService/Install-WindowsService_Settings.ini
Normal file
123
dev/Invoke-WindowsService/Install-WindowsService_Settings.ini
Normal file
@@ -0,0 +1,123 @@
|
||||
####################################################################################################
|
||||
# Digital Data Configuration File (Template Date: 30.07.2016) #
|
||||
# UTF-8 Coding required! #
|
||||
# incl. FailSafe functions that are active when information is missing. #
|
||||
####################################################################################################
|
||||
|
||||
#==================================================================================================#
|
||||
########################################## General Setup ###########################################
|
||||
#==================================================================================================#
|
||||
|
||||
####################################################################################################
|
||||
# Path in which the log files will be stored. #
|
||||
# Example: E:\LogFiles\<ScriptName> #
|
||||
# FailSafe Setting is: <ScriptPath>\Logs #
|
||||
####################################################################################################
|
||||
LogPath =
|
||||
|
||||
####################################################################################################
|
||||
# Numerical value how long (in days) log files will be kept. ValidateRange is 0 - 1000 #
|
||||
# Setting the Value to 0 disables this Function. #
|
||||
# FailSafe Setting is: 60 #
|
||||
####################################################################################################
|
||||
LogFileKeepTime = 30
|
||||
|
||||
#==================================================================================================#
|
||||
########################################## Profile Setup ###########################################
|
||||
#==================================================================================================#
|
||||
|
||||
####################################################################################################
|
||||
# Define Profiles in this config file for the executing Script. #
|
||||
# Syntax: #
|
||||
# UninstallServiceProfile | InstallServiceProfile #
|
||||
####################################################################################################
|
||||
|
||||
####################################################################################################
|
||||
# UninstallServiceProfile #
|
||||
# This profile type stops and uninstalls existing services. #
|
||||
####################################################################################################
|
||||
# First Parameter: <ServiceName> #
|
||||
# Set the service name, you want to uninstall. #
|
||||
# Dont confuse name with display name! Check it via PS cmdlet "Get-Service" #
|
||||
# Example: DigitalDataServiceNr1 #
|
||||
####################################################################################################
|
||||
|
||||
####################################################################################################
|
||||
# InstallServiceProfile #
|
||||
# This profile type installs or updates existing services and starts them if needed. #
|
||||
# Updating a service can not overwrite the <FullPathToEXE>, in case a path needs to be changed, #
|
||||
# uninstall and install the service again! #
|
||||
####################################################################################################
|
||||
# First Parameter: <ServiceDisplayName> #
|
||||
# Set the service display name, you want to install. #
|
||||
# In the background the display name will be used for the service name, by removeing blank in it. #
|
||||
# Example: Digital Data Service Nr1 #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Second Parameter: <FullPathToEXE> #
|
||||
# Set the absolut path the the service EXE: #
|
||||
# Example: D:\ProgramFiles\DigitalData\ServiceNr1 #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Third Parameter: <StartupParameter> #
|
||||
# Set a parameter which will be used by starting the service. #
|
||||
# Keep empty if no parameter is needed. #
|
||||
# Example: -k netsvcs #
|
||||
# Example: /debug #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Fourth Parameter: <StartupType> #
|
||||
# Set one of the following examples: #
|
||||
# Example: Automatic #
|
||||
# Example: Manual #
|
||||
# Example: Disabled #
|
||||
# Example: AutomaticDelayedStart #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Fifth Parameter: <Action> #
|
||||
# Set if the new installed service should start immediately after installation. #
|
||||
# Example: InstallOnly #
|
||||
# Example: InstallAndStart #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Sixth Parameter: <Description> #
|
||||
# Set the description of the service. #
|
||||
# Example: This is a nice service which helps you with some stuff. #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Seventh Parameter: <ServiceUserName> #
|
||||
# Set the username which should run this service. #
|
||||
# Can only used in combination with <ServiceUserPassword>. #
|
||||
# By keeping this parameter emtpy, the local system account will run the service. #
|
||||
# Example: UserAccount #
|
||||
# Example: Administrator #
|
||||
# Example: domain\UserAccount #
|
||||
# Example: domain\Administrator #
|
||||
#--------------------------------------------------------------------------------------------------#
|
||||
# Eight Parameter: <ServiceUserPassword> #
|
||||
# Set the password which should run this service. #
|
||||
# Can only used in combination with <ServiceUserName>. #
|
||||
# By keeping this parameter emtpy, the local system account will run the service. #
|
||||
# Example: 12345 #
|
||||
# Example: password #
|
||||
# Example: securepassword #
|
||||
####################################################################################################
|
||||
|
||||
UninstallServiceProfile = DigitalDataEmail-Service
|
||||
#InstallServiceProfile = Digital Data Email-Service ; D:\ProgramFiles\Digital Data\Debug\DDEmailService.exe ; ; Manual ; InstallAndStart ; Sends emails from the Digital Data email pool.
|
||||
|
||||
#Example:
|
||||
#UninstallServiceProfile = MyNiceService
|
||||
|
||||
#InstallServiceProfile = My nice service ; D:\ProgramFiles\Myniceservice\program.exe ; ;Automatic ; InstallOnly ; This is a very nice service
|
||||
#InstallServiceProfile = My nice service ; D:\ProgramFiles\Myniceservice\program.exe ; -parameter1 ;Automatic ; InstallAndStart ; This is a very nice service ; domain\user ; password
|
||||
|
||||
#UninstallServiceProfile = DigitalDataEB-Creator
|
||||
#UninstallServiceProfile = DigitalDataEmail-Profiler
|
||||
#UninstallServiceProfile = DigitalDataeInvoice-Parser
|
||||
#UninstallServiceProfile = DigitalDataJobRunner
|
||||
#UninstallServiceProfile = DigitalDataEmail-Service
|
||||
#UninstallServiceProfile = DigitalDataWM-ResultHandler
|
||||
#UninstallServiceProfile = DigitalDataEDMI-Service
|
||||
|
||||
#InstallServiceProfile = Digital Data EB-Creator ; D:\ProgramFiles\Digital Data\DDEBCreator\SERVICE\EB_Creator.exe ; ; Manual ; InstallOnly ; Creates result reports for released documents.
|
||||
#InstallServiceProfile = Digital Data Email-Profiler ; D:\ProgramFiles\Digital Data\DDEmailProfiler\SERVICE\EmailProfiler.Service.exe ; ; Manual ; InstallOnly ; Monitors email inboxes and processes incoming emails and their attachments.
|
||||
#InstallServiceProfile = Digital Data eInvoice-Parser ; D:\ProgramFiles\Digital Data\DDZUGFeRDService\DDZUGFeRDService.exe ; ; Manual ; InstallOnly ; Validates electronic invoices and extracts data.
|
||||
#InstallServiceProfile = Digital Data JobRunner ; D:\ProgramFiles\Digital Data\DDJobRunner\SERVICE\DigitalData.Services.JobRunner.exe ; ; Manual ; InstallOnly ; Executes defined and configured jobs to synchronize master and transaction data.
|
||||
#InstallServiceProfile = Digital Data Email-Service ; D:\ProgramFiles\Digital Data\DDEmailService\SERVICE\DDEmailService.exe ; ; Manual ; InstallOnly ; Sends emails from the Digital Data email pool.
|
||||
#InstallServiceProfile = Digital Data WM-ResultHandler ; ; ; Manual ; InstallOnly ; Executes windream searches and processes the results according to profile specifications.
|
||||
#InstallServiceProfile = Digital Data EDMI-Service ; ; ; Manual ; InstallOnly ; Proxy Service for Digital Data Applications.
|
||||
Binary file not shown.
Reference in New Issue
Block a user