This commit is contained in:
Adam Skotarczak 2025-05-01 02:50:44 +02:00
parent a3d1ead661
commit cb2d33734e
5 changed files with 45 additions and 28 deletions

28
LICENSE
View File

@ -1,21 +1,23 @@
MIT License
# MIT License with Attribution Requirement
Copyright (c) 2025 Adam Skotarczak
> Copyright (c) 2025 Adam Skotarczak <adam@skotarczak.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
copies of the Software, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
1. The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2. **Attribution Requirement**: Any public use or distribution of this Software,
modified or unmodified, must include a clear and visible attribution to the original author:
**Adam Skotarczak <adam@skotarczak.net>**
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -7,20 +7,20 @@
Diese Sammlung ist auf GitHUB unter der Adresse [https://github.com/realAscot/winstartstop.git](https://github.com/realAscot/winstartstop.git) zu finden.
## Inhalt:
## Inhalt
- [Sammlung von Start- und Shutdown-Skripten](#sammlung-von-start--und-shutdown-skripten)
- [Inhalt:](#inhalt)
- [Inhalt](#inhalt)
- [Übersicht](#übersicht)
- [Skripte](#skripte)
- [`startup.bat`](#startupbat)
- [Beispiel:](#beispiel)
- [Funktionsweise:](#funktionsweise)
- [Installation:](#installation)
- [Beispiel](#beispiel)
- [Funktionsweise](#funktionsweise)
- [Installation `startup.bat`](#installation-startupbat)
- [Hinweise](#hinweise)
- [`shutdown.bat`](#shutdownbat)
- [Installation:](#installation-1)
- [Parameter:](#parameter)
- [Installation `shutdown.bat`](#installation-shutdownbat)
- [Parameter](#parameter)
## Übersicht
@ -33,24 +33,25 @@ Ziel ist es, temporäre Ressourcen effizient zu verwalten (z.B. Ramdisk, Temp
Erstellt beim Systemstart vordefinierte Verzeichnisse auf einem beliebigen Zielpfad (z.B. Ramdisk).
#### Beispiel:
#### Beispiel
```cmd
startup.bat R:\
```
#### Funktionsweise:
#### Funktionsweise
- Beim ersten Start wird automatisch die Datei `dirlist.txt` im selben Verzeichnis erzeugt.
- In `dirlist.txt` werden die Verzeichnisse aufgelistet, die erstellt werden sollen.
- Die angegebene Ramdisk muss zum Zeitpunkt des Skriptaufrufs vorhanden sein.
- Es wird eine Logdatei `ramdisk_log.txt` angelegt, die alle Aktionen protokolliert.
#### Installation:
#### Installation `startup.bat`
> ⚠️ **Hinweis vorweg:**
Microsoft liefert den Gruppenrichtlinien-Editor nur in den Pro, Enterprise und Education-Versionen von Windows aus nicht in der Home-Edition. Man kann das ganze alternativ aber auch über die Aufgabenplanung `taskschd.msc` steuern oder notfalls sogar über die gute alte `autostart.bat`
Microsoft liefert den Gruppenrichtlinien-Editor nur in den Pro, Enterprise und Education-Versionen von Windows aus nicht in der Home-Edition.
Man kann das ganze alternativ aber auch über die Aufgabenplanung `taskschd.msc` steuern oder notfalls sogar über die gute alte `autostart.bat`
```text
@ -73,15 +74,15 @@ Die Skripte aus dem Paket hier an beliebige Stelle kopieren und dort einpflegen.
Bereinigt temporäre Pfade unter Windows. Ideal für den Einsatz beim Herunterfahren des Systems.
#### Installation:
#### Installation `shutdown.bat`
```text
```plaintext
gpedit.msc → Computerkonfiguration → Windows-Einstellungen → Skripts (Herunterfahren)
```
![Screenshot gpedit.msc](./assets/gpedit.png)
#### Parameter:
#### Parameter
| Aufruf | Wirkung |
|---------------------------|--------------------------------------------------|

View File

@ -1 +1 @@
0.2.1
0.2.2

View File

@ -1,5 +1,11 @@
@echo off
setlocal EnableDelayedExpansion
chcp 65001 >nul
if errorlevel 1 (
echo [Fehler] UTF-8-Codepage konnte nicht gesetzt werden. Abbruch.
exit /b 1
)
:: === OPTIONALES LOGGING ===
set LOGFILE=
@ -60,4 +66,5 @@ for /d %%u in ("C:\Users\*") do (
)
call :log *** Cleanup abgeschlossen ***
endlocal
exit /b 0

View File

@ -1,5 +1,11 @@
@echo off
setlocal enabledelayedexpansion
chcp 65001 >nul
if errorlevel 1 (
echo [Fehler] UTF-8-Codepage konnte nicht gesetzt werden. Abbruch.
exit /b 1
)
::
:: (C) Adam Skotarczak 2025
@ -8,6 +14,7 @@ setlocal enabledelayedexpansion
::
:: --- Konfiguration ---
set "DIRS_FILE=%~dp0dirlist.txt"
set "LOGFILE=%~dp0ramdisk_log.txt"