v0.2.2
This commit is contained in:
parent
a3d1ead661
commit
cb2d33734e
28
LICENSE
28
LICENSE
@ -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
|
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
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, subject to the following conditions:
|
||||||
furnished to do so, 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.
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2. **Attribution Requirement**: Any public use or distribution of this Software,
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
modified or unmodified, must include a clear and visible attribution to the original author:
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
**Adam Skotarczak <adam@skotarczak.net>**
|
||||||
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
|
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
SOFTWARE.
|
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.
|
||||||
|
29
README.md
29
README.md
@ -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.
|
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)
|
- [Sammlung von Start- und Shutdown-Skripten](#sammlung-von-start--und-shutdown-skripten)
|
||||||
- [Inhalt:](#inhalt)
|
- [Inhalt](#inhalt)
|
||||||
- [Übersicht](#übersicht)
|
- [Übersicht](#übersicht)
|
||||||
- [Skripte](#skripte)
|
- [Skripte](#skripte)
|
||||||
- [`startup.bat`](#startupbat)
|
- [`startup.bat`](#startupbat)
|
||||||
- [Beispiel:](#beispiel)
|
- [Beispiel](#beispiel)
|
||||||
- [Funktionsweise:](#funktionsweise)
|
- [Funktionsweise](#funktionsweise)
|
||||||
- [Installation:](#installation)
|
- [Installation `startup.bat`](#installation-startupbat)
|
||||||
- [Hinweise](#hinweise)
|
- [Hinweise](#hinweise)
|
||||||
- [`shutdown.bat`](#shutdownbat)
|
- [`shutdown.bat`](#shutdownbat)
|
||||||
- [Installation:](#installation-1)
|
- [Installation `shutdown.bat`](#installation-shutdownbat)
|
||||||
- [Parameter:](#parameter)
|
- [Parameter](#parameter)
|
||||||
|
|
||||||
## Übersicht
|
## Ü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).
|
Erstellt beim Systemstart vordefinierte Verzeichnisse auf einem beliebigen Zielpfad (z. B. Ramdisk).
|
||||||
|
|
||||||
#### Beispiel:
|
#### Beispiel
|
||||||
|
|
||||||
```cmd
|
```cmd
|
||||||
|
|
||||||
startup.bat R:\
|
startup.bat R:\
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Funktionsweise:
|
#### Funktionsweise
|
||||||
|
|
||||||
- Beim ersten Start wird automatisch die Datei `dirlist.txt` im selben Verzeichnis erzeugt.
|
- Beim ersten Start wird automatisch die Datei `dirlist.txt` im selben Verzeichnis erzeugt.
|
||||||
- In `dirlist.txt` werden die Verzeichnisse aufgelistet, die erstellt werden sollen.
|
- In `dirlist.txt` werden die Verzeichnisse aufgelistet, die erstellt werden sollen.
|
||||||
- Die angegebene Ramdisk muss zum Zeitpunkt des Skriptaufrufs vorhanden sein.
|
- Die angegebene Ramdisk muss zum Zeitpunkt des Skriptaufrufs vorhanden sein.
|
||||||
- Es wird eine Logdatei `ramdisk_log.txt` angelegt, die alle Aktionen protokolliert.
|
- Es wird eine Logdatei `ramdisk_log.txt` angelegt, die alle Aktionen protokolliert.
|
||||||
|
|
||||||
#### Installation:
|
#### Installation `startup.bat`
|
||||||
|
|
||||||
> ⚠️ **Hinweis vorweg:**
|
> ⚠️ **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
|
```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.
|
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)
|
gpedit.msc → Computerkonfiguration → Windows-Einstellungen → Skripts (Herunterfahren)
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### Parameter:
|
#### Parameter
|
||||||
|
|
||||||
| Aufruf | Wirkung |
|
| Aufruf | Wirkung |
|
||||||
|---------------------------|--------------------------------------------------|
|
|---------------------------|--------------------------------------------------|
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal EnableDelayedExpansion
|
setlocal EnableDelayedExpansion
|
||||||
|
chcp 65001 >nul
|
||||||
|
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo [Fehler] UTF-8-Codepage konnte nicht gesetzt werden. Abbruch.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
:: === OPTIONALES LOGGING ===
|
:: === OPTIONALES LOGGING ===
|
||||||
set LOGFILE=
|
set LOGFILE=
|
||||||
@ -60,4 +66,5 @@ for /d %%u in ("C:\Users\*") do (
|
|||||||
)
|
)
|
||||||
|
|
||||||
call :log *** Cleanup abgeschlossen ***
|
call :log *** Cleanup abgeschlossen ***
|
||||||
|
endlocal
|
||||||
exit /b 0
|
exit /b 0
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal enabledelayedexpansion
|
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
|
:: (C) Adam Skotarczak 2025
|
||||||
@ -8,6 +14,7 @@ setlocal enabledelayedexpansion
|
|||||||
::
|
::
|
||||||
|
|
||||||
:: --- Konfiguration ---
|
:: --- Konfiguration ---
|
||||||
|
|
||||||
set "DIRS_FILE=%~dp0dirlist.txt"
|
set "DIRS_FILE=%~dp0dirlist.txt"
|
||||||
set "LOGFILE=%~dp0ramdisk_log.txt"
|
set "LOGFILE=%~dp0ramdisk_log.txt"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user