@echo off cd /d %0\.. mode con lines=80 cols=160 setlocal enableDelayedExpansion pushd for /F %%i in ('cd^|findstr ":"') do set ibin=%%i echo|set /p= :main title #################Reinis-PC-Information################## echo\ call :SubPfad call :SubNode if defined wnode call :owner if defined wowner call :passwd call :Start call :finish goto :end :finish echo ^^Reinis-PC-Information^<^/marquee^>^<^/font^> >> %Pfad%\index.html echo ^<^/BR^> >> %Pfad%\index.html echo ^<^/BR^> >> %Pfad%\index.html for /f "delims=" %%i in ('dir /a:d /b %Pfad%') do echo ^%%i^<^/^>^<^/BR^> >> %Pfad%\index.html echo ^<^/HTML^>^ >> %Pfad%\index.html start %Pfad%\index.html goto :eof :Start echo\ echo Subordner %Pfad% wird verwendet. echo\ echo Bitte Geduld, Informationen werden ermittelt echo\ echo Informationserstellung kann mehrere Minuten dauern ..... for /F %%i in ('wmic os get muilanguages ^| findstr {') do set LocSpra=%%i set LocSprache=%LocSpra:~2,5% for /F %%i in ('wmic %wnode%%wowner%%wpasswd%os get muilanguages ^| findstr {') do set Spra=%%i set Sprache=%Spra:~2,5% set outdir=%Pfad%\%node% mkdir %outdir% for /f "skip=1 tokens=2 delims=," %%a in ('wmic alias list brief /format:"%WINDIR%\System32\wbem\%LocSprache%\csv"^|findstr -V Software^|findstr -V Produkt^|findstr -V FSDir^|findstr -V DataFile^|findstr -V Server^|findstr -V NTEvent') do wmic %wnode%%wowner%%wpasswd%%%a list full /format:"%WINDIR%\System32\wbem\%LocSprache%\hform" 2>NUL > %outdir%\%%a.html echo ^^ > %outdir%\index.html echo ^^Reinis-PC-Information^<^/marquee^>^<^/font^> >> %outdir%\index.html echo ^<^/BR^> >> %outdir%\index.html echo ^<^/BR^> >> %outdir%\index.html for /f "delims=" %%i in ('dir /s /b %outdir%\^|findstr -V index.html') do if %%~zi geq 200 echo ^%%~ni^<^/^>^<^/BR^> >> %outdir%\index.html echo ^<^/HTML^>^ >> %outdir%\index.html echo ^^ > %Pfad%\index.html goto :eof :passwd echo\ set /p passwd=Passwort fuer RPC User?: if not defined passwd goto nopasswd set "wpasswd=/password:%passwd% " goto pwaus :nopasswd set "wpasswd=" :pwaus goto :eof :owner echo\ for /f %%a in ('wmic ComputerSystem get PrimaryOwnerName^|find " "') do set defowner=%%a echo Username vom zu durchsuchenden System mit RPC Rechten Default="%defowner%" set /p owner=User?: if not defined owner goto noowner set "wowner=/user:%owner% " goto pwaus :noowner set "wowner=" set "wpasswd=" :pwaus goto :eof :SubNode echo\ set "node=" set /p node=Welche Node soll verwendet werden? Return = localhost: if not defined node set node=localhost if '%node%' == 'localhost' goto locset set "wnode=/node:%node% " goto locend :locset set "wnode=" :locend goto :eof :SubPfad :Nein set "Pfad=" set /p Pfad=In welchen Ordner sollen die Informationen gesammelt werden? Default = ".\reinis-pc-info-temp": IF not defined Pfad set Pfad=%ibin%\reinis-pc-info-temp if not exist "%Pfad%" goto Ja echo %Pfad% ist nicht leer! :nochmal set /p wahl=Trotzdem verewenden [j/n]? if '%wahl%' == 'n' goto Nein if '%wahl%' == 'j' goto Ja goto nochmal :Ja if not exist "%Pfad%" mkdir %Pfad% goto :eof :end